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 55 56
|
#!/usr/bin/make -f
# DH_VERBOSE := 1
export LC_ALL=C.UTF-8
include /usr/share/dpkg/default.mk
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
dh $@
# Only disable extended cpu flags support when they break the build
# process, or are not properly probed at run time on the platform.
# See mail exchanges on debian-med@l.d.o[1] for the rationale.
#
# [1]: https://lists.debian.org/debian-med/2022/10/msg00010.html
execute_after_dh_auto_configure:
ifeq ($(DEB_HOST_ARCH),i386)
@ echo 'I: Disable 64-bit SIMD on i386.'
sed -i -e '/HAVE_AVX2/d' \
-e '/HAVE_AVX512/d' \
-e '/HAVE_POPCNT/d' \
-e '/HAVE_SSE4_1/d' \
-e '/HAVE_SSSE3/d' config.h
endif
ifneq (,$(filter armel armhf,$(DEB_HOST_ARCH)))
@ echo 'I: Disable NEON on $(DEB_HOST_ARCH).'
echo '#undef __ARM_NEON' >> config.h
endif
# dh_missing warned about files not installed
override_dh_auto_install:
dh_auto_install
d-shlibmove --commit \
--multiarch \
--devunversioned \
--exclude-la \
--movedev debian/tmp/usr/include usr \
debian/tmp/usr/lib/*/*.so
find debian -name "lib*.la" -delete
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
make check
endif
override_dh_installexamples:
rm -Rf tests/.libs tests/tok* tests/test.out tests/*.o tests/*log \
tests/Makefile tests/Makefile.in tests/arith_dynamic tests/fqzcomp_qual \
tests/rans4x16pr tests/rans4x8 tests/varint tests/entropy
dh_installexamples
override_dh_auto_clean:
dh_auto_clean
find . -name "*.o" -o -name "*.lo" -delete
|