#!/usr/bin/make -f # -*- makefile -*- DPKG_EXPORT_BUILDFLAGS := yes include /usr/share/dpkg/buildflags.mk # Which MPI implementation (requested by libhdf5-mpi-dev) ifneq (,$(shell ls /usr/share/mpi-default-dev/debian_defaults)) include /usr/share/mpi-default-dev/debian_defaults INCMED+=-I/usr/include/$(ARCH_DEFAULT_MPI_IMPL) endif ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/$(ARCH_DEFAULT_MPI_IMPL)/libhdf5.so),) HDF5_DIR := /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/$(ARCH_DEFAULT_MPI_IMPL) else HDF5_DIR := /usr endif # Disable libsyrthes_cfd on s390x where openmpi isn't available ifneq (s390x,$(DEB_HOST_ARCH)) CFD := yes else CFD := no endif ERRLOG := src/syrthes-install/ERREUR.log SYRTHES_HOME=usr/lib/syrthes INSTALL_DIR=$(CURDIR)/debian/syrthes ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) endif %: dh $@ --with python2 override_dh_auto_configure: sed -i.orig src/syrthes-install/setup.ini \ -e 's/@MPI@/$(ARCH_DEFAULT_MPI_IMPL)/g' \ -e 's/@MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \ -e 's:@HDF5_DIR@:$(HDF5_DIR):g' \ -e 's:@CFD@:$(CFD):g' ifneq (,$(NUMJOBS)) sed -i src/syrthes-install/setup.ini \ -e 's/^#specific_makej.*/specific_makej= -j$(NUMJOBS)/' endif override_dh_auto_build: cd src/syrthes-gui/src && ./Install.sh cd src/syrthes-install && ./syrthes_install.py # ERREUR.log should be empty if [ -s "$(ERRLOG)" ]; then \ cat "$(ERRLOG)" && false; \ fi override_dh_auto_clean: [ ! -f src/syrthes-install/setup.ini.orig ] || \ mv src/syrthes-install/setup.ini.orig src/syrthes-install/setup.ini override_dh_auto_install: mv src/syrthes-gui/src/install arch/Debian/syrthes-gui sed -i 's:$(CURDIR)/arch/Debian:/usr/lib/syrthes:;s/-I -I/-I/;s/-L -L/-L/' \ arch/Debian/bin/syrthes.profile \ arch/Debian/share/syrthes/Makefile.in # Fix unwanted exec flags (not catched by dh_fixperms) chmod -R a-x arch/Debian/syrthes-gui/* chmod -R a+X arch/Debian/syrthes-gui/* chmod -R a-x arch/Debian/share/syrthes/tests/* chmod -R a+X arch/Debian/share/syrthes/tests/* chmod a+x arch/Debian/share/syrthes/tests/*/syrthes/syrthes.py chmod a-x arch/Debian/share/syrthes/*.c chmod a-x arch/Debian/include/* # Remove extra license file rm arch/Debian/syrthes-gui/22x22/license override_dh_python2: dh_python2 -N syrthes-tests