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 44 45 46 47 48 49 50 51 52 53 54
|
#!/usr/bin/make -f
# DH_VERBOSE := 1
export LC_ALL=C.UTF-8
BUILT_USING_SECRECY = $(shell \
dpkg-query \
-f '$${source:Package} (= $${source:Version}), ' \
-W 'libsecrecy-dev' \
)
include /usr/share/dpkg/architecture.mk
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
dh $@
# We go extra lengths to try to pinpoint test failures on arm64, but
# autoarraytrace is also causing issues of its own on at least i386, so
# it needs to be enabled only on the affected platform.
ifeq ($(DEB_HOST_ARCH),arm64)
override_dh_auto_configure:
dh_auto_configure -- --enable-autoarraytrace
endif
override_dh_install:
dh_install
# following override suggestion from suggestion of Andreas to Michael
# to overcome d-shlibmove bug on Jan 4, 2019
d-shlibmove --commit \
--multiarch \
--devunversioned \
--exclude-la \
--override s/libdeflate0-dev/libdeflate-dev/ \
--override s/libmaus2_.*-dev/libmaus2-dev/ \
--override 's/libnettle.*-dev/nettle-dev/' \
--movedev debian/tmp/usr/include/* usr/include \
--movedev "debian/tmp/usr/lib/*/pkgconfig/*.pc" \
usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
debian/tmp/usr/lib/*/*.so
# Remove unneeded options from *.pc files
find debian -name "*.pc" \
-exec sed -i -e 's/-Wdate-time *//' \
-e 's/-D_FORTIFY_SOURCE=2 *//' \{\} \;
# avoid noise from dh-missing by deleting unneeded files
find debian/tmp -type f -name "*.la" -delete
# Changelog is installed via dh_installchangelogs
rm -f debian/tmp/usr/share/doc/libmaus2/changelog.gz
override_dh_installchangelogs:
dh_installchangelogs ChangeLog
override_dh_gencontrol:
dh_gencontrol -- -Vlibsecrecy:Built-Using="$(BUILT_USING_SECRECY)"
|