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
|
#!/usr/bin/make -f
export DH_VERBOSE=1
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
VERSION:=$(shell dpkg-parsechangelog --show-field Version)
LIBDIR:=/usr/lib/$(DEB_HOST_MULTIARCH)
AUTOGENERATED:= libcoarrays-openmpi-dev.install libcoarrays-mpich-dev.install \
libcoarrays-openmpi-dev.links libcoarrays-mpich-dev.links \
libcaf-mpich-3.install libcaf-openmpi-3.install \
caf-mpich.pc caf-openmpi.pc
# The magic debhelper rule
%:
dh $@ --buildsystem=cmake --no-parallel --with fortran_mod
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
# DISABLED_TESTS:= "powerpc alpha"
override_dh_auto_configure:
for f in ${AUTOGENERATED} ; do \
sed -e 's%@TRIPLET@%${DEB_HOST_MULTIARCH}%g' < debian/$$f.in | \
sed -e 's%@VERSION@%${VERSION}%g' > debian/$$f ; \
done
CXX=mpicxx.mpich CC=mpicc.mpich FC=mpif90.mpich \
dh_auto_configure --builddirectory=build-mpich -- \
-DCAF_LIB_NAME=caf_mpich
CXX=mpicxx.openmpi CC=mpicc.openmpi FC=mpif90.openmpi \
dh_auto_configure --builddirectory=build-openmpi -- \
-DCAF_LIB_NAME=caf_openmpi
override_dh_auto_build:
dh_auto_build --builddirectory=build-mpich
dh_auto_build --builddirectory=build-openmpi
mv build-mpich/lib/*/libcaf_mpi.a build-mpich/lib/$(DEB_HOST_MULTIARCH)/libcaf_mpich.a
mv build-openmpi/lib/*/libcaf_mpi.a build-openmpi/lib/$(DEB_HOST_MULTIARCH)/libcaf_openmpi.a
override_dh_auto_install:
dh_auto_install --builddirectory=build-mpich
dh_auto_install --builddirectory=build-openmpi
override_dh_auto_clean:
dh_clean
rm -f $(patsubst %, debian/%, ${AUTOGENERATED})
rm -rf build-*
override_dh_auto_test:
ifneq (,$(findstring "$(DEB_HOST_ARCH)",$(DISABLED_TESTS)))
@echo "Tests disabled on this arch: known failures being investigated"
else
@echo "Tests may hang/timeout due to lack of processors. "
-dh_auto_test --timeout 30
endif
|