mirror of https://github.com/sipwise/rtpengine.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.5 KiB
74 lines
2.5 KiB
#!/usr/bin/make -f
|
|
# -*- makefile -*-
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
# export DH_VERBOSE=1
|
|
|
|
## kernel package specific stuff
|
|
# Name of the source package
|
|
psource:=ngcp-rtpengine-kernel-source
|
|
# Name of the dkms package
|
|
pdkms:=ngcp-rtpengine-kernel-dkms
|
|
# short upstream name, used for module source directory
|
|
sname:=ngcp-rtpengine
|
|
# Source version
|
|
sversion:=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[^:]\+://;s/-[^-]\+$$//')
|
|
|
|
PACKAGE=ngcp-rtpengine-kernel
|
|
## end of kernel package specific stuff
|
|
|
|
XTABLES_DIR:=$(shell pkg-config xtables --variable=xtlibdir || echo /lib/xtables)
|
|
|
|
%:
|
|
dh $@ --parallel
|
|
|
|
override_dh_auto_build-arch:
|
|
$(MAKE) -C iptables-extension
|
|
$(MAKE) -C daemon
|
|
$(MAKE) -C recording-daemon
|
|
|
|
override_dh_auto_clean:
|
|
(cd daemon && $(MAKE) clean)
|
|
(cd recording-daemon && $(MAKE) clean)
|
|
(cd iptables-extension && $(MAKE) clean)
|
|
rm -f daemon/build_time.h kernel-module/.xt_RTPENGINE.o.d
|
|
rm -rf kernel-module/.tmp_versions
|
|
rm -f debian/README.html.gz debian/README.md.gz
|
|
dh_auto_clean
|
|
|
|
override_dh_auto_install-indep:
|
|
# Create the directories to install the source into
|
|
dh_installdirs -p$(psource) usr/src/modules/$(sname)/debian
|
|
dh_installdirs -p$(pdkms) usr/src/$(sname)-$(sversion)
|
|
|
|
# Copy only the driver source to the proper locations
|
|
cd kernel-module && cp Makefile *.c *.h ../debian/$(psource)/usr/src/modules/$(sname)
|
|
cd kernel-module && cp Makefile *.c *.h ../debian/$(pdkms)/usr/src/$(sname)-$(sversion)
|
|
|
|
# Copy the needed debian/ pieces to the proper location
|
|
cp debian/*.modules.in* debian/$(psource)/usr/src/modules/$(sname)/debian
|
|
cp debian/control debian/changelog debian/copyright \
|
|
debian/compat debian/$(psource)/usr/src/modules/$(sname)/debian/
|
|
install -m 0755 debian/rules.modules debian/$(psource)/usr/src/modules/$(sname)/debian/rules
|
|
cd debian/$(psource)/usr/src && tar c modules | bzip2 -9 > $(sname).tar.bz2 && rm -rf modules
|
|
|
|
# Prepare dkms.conf from the dkms.conf.in template
|
|
sed "s/__VERSION__/$(sversion)/g" debian/dkms.conf.in > debian/$(pdkms)/usr/src/$(sname)-$(sversion)/dkms.conf
|
|
|
|
# markdown README
|
|
markdown README.md | gzip -9 > debian/README.html.gz
|
|
gzip -9 < README.md > debian/README.md.gz
|
|
|
|
dh_auto_install
|
|
|
|
override_dh_install:
|
|
dh_install
|
|
dh_installdirs -pngcp-rtpengine-iptables $(XTABLES_DIR)
|
|
install -m 0644 iptables-extension/libxt_RTPENGINE.so debian/ngcp-rtpengine-iptables/$(XTABLES_DIR)
|
|
|
|
.PHONY: override_dh_strip
|
|
override_dh_strip:
|
|
dh_strip --dbgsym-migration='ngcp-rtpengine-dbg (<= 6.0.0.0+0~mr6.0.0.0)'
|
|
|
|
override_dh_auto_test:
|