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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
BUILDDIR = obj-$(DEB_HOST_GNU_TYPE)
COMMON_BUILD_DEFS = -DZZIP_TESTCVE=OFF -DZZIPTEST=$(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),OFF,ON)
%:
dh $@ --buildsystem=cmake
override_dh_auto_clean:
dh_auto_clean -B $(BUILDDIR)
dh_auto_clean -B $(BUILDDIR)-static
rm -rf Makefile Linux_*.d/ testdata.d/ docs/zzipdoc/*.pyc
find . -name "*.pyc" -exec rm -f {} \;
override_dh_auto_configure:
# dynamically linked
dh_auto_configure -B $(BUILDDIR) -- -DCMAKE_BUILD_TYPE=Release $(COMMON_BUILD_DEFS)
# statically linked
dh_auto_configure -B $(BUILDDIR)-static -- -DBUILD_SHARED_LIBS=OFF $(COMMON_BUILD_DEFS)
override_dh_auto_build:
# dynamically linked
dh_auto_build -B $(BUILDDIR)
# statically linked
dh_auto_build -B $(BUILDDIR)-static
execute_before_dh_install:
# put the static libs together with the rest of the stuff
cp -v $(BUILDDIR)-static/zzipwrap/*.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
cp -v $(BUILDDIR)-static/zzip/*.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
override_dh_install:
# need to refresh patch and do it in debian/tmp/usr/share/man/man3
#cd $(CURDIR)/debian/libzzip-dev/usr/share/man/ \
# && tar xf $(CURDIR)/docs/zziplib-manpages.tar
#cd $(CURDIR)/debian/libzzip-dev/usr/share/man/man3/ \
# && patch -p1 < $(CURDIR)/debian/man3.patch
dh_install
# remove pkg-config-bad-directive
sed -i "s/\-D_FORTIFY_SOURCE=2//" `find debian/ -name '*.pc'`
|