#!/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