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
|
#!/usr/bin/make -f
# Recommendations in https://wiki.debian.org/Hardening, motivated by lintian warnings.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
# To run the first test program in `make check', mpirun is called.
# This may fail if run as root, e.g. during automated building in
# a chroot gaol. So for debian builds, running mpirun as root - on a single
# processor - is allowed.
#
export MPI_ALLOW_RUN_AS_ROOT = --allow-run-as-root
%:
dh $@
# https://lintian.debian.org/tags/binary-or-shlib-defines-rpath.html
# https://wiki.debian.org/RpathIssue
# TODO: Where is r(un)path inserted in upstream? [not obvious]
override_dh_install:
chrpath -d $(CURDIR)/debian/mpgrafic/usr/bin/mpgrafic
dh_install
# 2017-01-17: debian/0.3.7.5-1: Data on failures of the test script
# regression-0.3.7.sh on various architectures is needed in order to
# make both the source code and the test reproducible. This override
# is intended to be temporary only, while obtaining data on failures
# from the log files of builds.
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# since v0.3.7.8: log a diagnostic, and then return a fail if
# dh_auto_test failed
if dh_auto_test ; then \
printf "+++regression test diagnostic+++\n"; \
grep ARCH_DEFAULT_MPI_IMPL /usr/share/mpi-default-dev/debian_defaults; \
printf "diff:\n"; \
diff -u Output.stdout.np32 Output.stdout.np32.tmp; \
printf "+++/regression test diagnostic+++\n"; else \
printf "+++regression test diagnostic+++\n"; \
grep ARCH_DEFAULT_MPI_IMPL /usr/share/mpi-default-dev/debian_defaults; \
printf "diff:\n"; \
diff -u Output.stdout.np32 Output.stdout.np32.tmp; \
uname -a; \
printf "Processors on this machine:\n"; \
grep processor /proc/cpuinfo; \
printf "+++/regression test diagnostic+++\n"; \
false ; fi
endif
|