debian swirl logo

Back to the packages list mpich

#! /usr/bin/make -f
%:
		dh $@  --parallel --with autoreconf

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export MPICHLIB_CFLAGS= $(shell dpkg-buildflags --get CFLAGS)
export MPICHLIB_CXXFLAGS= $(shell dpkg-buildflags --get CXXFLAGS)
export MPICHLIB_FFLAGS= $(shell dpkg-buildflags --get FFLAGS)
export MPICHLIB_FCFLAGS= $(shell dpkg-buildflags --get FFLAGS)
export FC= gfortran
export F77= gfortran

extra_flags += \
		--enable-shared \
		--prefix=/usr \
		--enable-fc \
		--disable-rpath \
  --disable-wrapper-rpath \
		--sysconfdir=/etc/mpich \
		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
		--includedir=/usr/include/mpich \
		--docdir=/usr/share/doc/mpich \
		--with-hwloc-prefix=system

# BLCR checkpointing support
ifneq (,$(findstring $(DEB_HOST_ARCH),amd64 armel i386 powerpc))
	extra_flags += --enable-checkpointing --with-hydra-ckpointlib=blcr
endif

# On sparc and sh4, OPA isn't available, so we need to fallback to
# emulation mode. There's a performance penalty, unfortunately.
ifneq (,$(findstring $(DEB_HOST_GNU_CPU),sparc sh4))
	extra_flags += --with-atomic-primitives=no
endif

override_dh_autoreconf:
		dh_autoreconf
		autoreconf -f -i src/mpl src/openpa src/mpi/romio src/pm/hydra

override_dh_auto_configure:
		dh_auto_configure -- $(extra_flags)

override_dh_auto_build-indep:
		dh_auto_build -i
		cd $(CURDIR)/doc/installguide; rm *.pdf; $(MAKE) install.pdf
		cd $(CURDIR)/doc/logging; rm *.pdf; $(MAKE) logging.pdf
	#cd $(CURDIR)/doc/smpd; rm *.pdf; $(MAKE) smpd_pmi.pdf
		cd $(CURDIR)/doc/userguide; rm *.pdf; $(MAKE) user.pdf

override_dh_auto_install-arch:
		dh_auto_install -a
		for i in mpicc mpicxx mpif77 mpif90; do \
		  (cd debian/tmp/usr/bin/ && mv $$i $$i.mpich); \
		  (cd debian/tmp/usr/share/man/man1/ && mv $$i.1 $$i.mpich.1);\
		done
	# Fix incorrect paths in /usr/bin/mpi{cc,cxx,f77,f90}.mpich
		for fn in debian/tmp/usr/bin/mpicc.mpich debian/tmp/usr/bin/mpicxx.mpich \
			debian/tmp/usr/bin/mpif77.mpich debian/tmp/usr/bin/mpif90.mpich; do \
			sed -i 's:$(CURDIR)/debian/tmp/::g' $$fn ;\
		done
		mv debian/tmp/usr/share/man/man1/mpiexec.1 debian/tmp/usr/share/man/man1/mpiexec.mpich.1

override_dh_installchangelogs:
		dh_installchangelogs README

# Correct lib*.so multiarch paths in libmpich-dev.postinst
override_dh_installdeb:
		dh_installdeb
		sed -i 's:TRIPLET:$(DEB_HOST_MULTIARCH):g' debian/libmpich-dev/DEBIAN/postinst

# Some tests are failing on hurd-i386.
# Disable them, to be investiated later
disable_test_archs = hurd-i386
ifneq (,$(filter $(DEB_HOST_ARCH),$(disable_test_archs)))
override_dh_auto_test:

endif

Builds:

libmpich12
shared libraries for mpich
libmpich2-dev
transitional dummy package for mpich development files
libmpich-dev
development files for mpich
libmpl1
shared libraries for mpl part of mpich
libmpl-dev
development files for mpl part of mpich
libopa1
shared libraries for opa part of mpich
libopa-dev
development files for opa part of mpich
mpich2-doc
transitional dummy package for mpich documentation
mpich2
transitional dummy package
mpich-doc
documentation for mpich
mpich
implementation of the mpi message passing interface standard