#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS include /usr/share/dpkg/architecture.mk # Hardened flags export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 -include /usr/share/dpkg/buildflags.mk CPPFLAGS += -I$(CURDIR)/debian/include # Don't accidentally build the lorene plug-in unexport HOME_LORENE # Make sure we build with the right MPI implementation include /usr/share/mpi-default-dev/debian_defaults MPICXX := /usr/bin/mpic++.$(ARCH_DEFAULT_MPI_IMPL) export MPICXX CXX := $(shell readlink -e $(shell which $(firstword $(shell $(MPICXX) -show)))) # For python*-gyoto.install DEB_GYOTO_SOVERS := $(shell expr \ $(shell grep VERSINFO_C= configure.ac | sed s/VERSINFO_C=//) \ - $(shell grep VERSINFO_A= configure.ac | sed s/VERSINFO_A=//)) export DEB_GYOTO_SOVERS configure_flags = --with-yorick=/usr/bin/yorick --with-udunits --with-xerces \ --enable-static --enable-shared \ --with-boost --with-arblib --enable-c++11 --enable-release \ --with-mpi --without-virtualenv --enable-doc \ --with-lorene=/usr/lib/$(DEB_HOST_MULTIARCH)/lorene \ --includedir=/usr/include/$(DEB_HOST_MULTIARCH) %: dh $@ --with python2,python3,autoreconf override_dh_auto_install-arch: ifneq ($(wildcard plugins/python/Makefile),) make -C plugins/python distclean endif dh_auto_install -a -- SUBDIRS="lib bin doc yorick" sh debian/install_for_all_pythons dh_numpy -a dh_numpy3 -a override_dh_auto_install-indep: override_dh_install-arch: dh_install -a -N yorick-gyoto dh_installyorick --no-make-install -pyorick-gyoto dh_makeshlibs -a override_dh_install-indep: dh_install -i override_dh_auto_build-arch: $(MAKE) COPT_DEFAULT="" \ Y_CFLAGS="$(CFLAGS) $(CPPFLAGS)" \ Y_LDFLAGS="$(LDFLAGS)" \ lib bin yorick for badflag in -g -O2 -Werror=format-security -Wformat ; do \ sed "s/ $${badflag}//" -i lib/gyoto.pc ; \ done mkdir -p python-plugins set -e; \ for python in `pyversions -s` `py3versions -s`; do \ make -C python PYTHON=$$python ; \ make -C plugins/python distclean ; \ cd plugins/python ; \ ./configure PYTHON=`which $$python` ; \ make ; \ cd ../../ ; \ cp plugins/python/lib/.libs/libgyoto-$$python.so python-plugins/ ; \ done cd python-plugins ; \ set -e; \ for python in python python2 python3 ; do \ ln -s libgyoto-`which $${python} | xargs readlink | xargs basename`.so libgyoto-$${python}.so ; \ done override_dh_auto_build-indep: $(MAKE) doc override_dh_auto_configure: if sha1sum -c debian/boost.sha1sums; then \ mkdir -p debian/include/boost/multiprecision/detail/functions/;\ cp /usr/include/boost/multiprecision/detail/functions/trig.hpp \ debian/include/boost/multiprecision/detail/functions/;\ cd debian/include; \ patch -p1 < ../patches/no-fp-ilogb0;\ echo "************ Patching Boost.multiprecision ************";\ else \ echo "********** NOT Patching Boost.multiprecision **********";\ fi dh_auto_configure -- $(configure_flags) sed -i 's|^CXX=.*|CXX=$(CXX)|' lib/gyoto.pc override_dh_makeshlibs: dh_makeshlibs -Xstdplug -Xpython override_dh_auto_clean: [ ! -f python/Makefile ] || make -C python clean rm -Rf python-plugins debian/include python/_*.so dh_auto_clean --no-parallel override_dh_auto_test-indep: override_dh_auto_test-arch: ifeq (,$(filter $(DEB_HOST_ARCH), mips)) # skip on mips as lucatelli2 fails on it (but the binary works on other boxes) LC_ALL=C.UTF-8 dh_auto_test -- check-lorene endif override_dh_strip: dh_strip --dbgsym-migration='gyoto-dbg (<< 1.3.0~rc1-1~)'