1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
# For DEB_HOST_MULTIARCH and DEB_VERSION_UPSTREAM
include /usr/share/dpkg/default.mk
# On older distros +pie will add -fPIE -pie to the library linkage, which breaks
# it, -fPIC is enough
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
ifeq (,$(findstring terse,$(DEB_BUILD_OPTIONS)))
WAF = ./waf -v
else
WAF = ./waf
endif
ifneq (,$(filter hurd,$(DEB_HOST_ARCH_OS)))
STATIC_LIBS="-lpcap"
else
STATIC_LIBS=""
endif
%:
dh $@ --parallel
override_dh_auto_configure:
$(WAF) configure --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
override_dh_auto_build:
$(WAF) build --enable-static-library
override_dh_auto_install:
$(WAF) install --destdir=$(CURDIR)/debian/tmp --enable-static-library
install -d debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
sed -e "s/@VERSION@/$(DEB_VERSION_UPSTREAM)/" \
-e "s|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|g" \
-e "s|@STATIC_LIBS@|$(STATIC_LIBS)|g" \
debian/norm.pc.in > \
debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/norm.pc
override_dh_auto_clean:
$(WAF) distclean
find waflib -name "*.pyc" -delete
|