#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed export F77=gfortran-8 export FC=gfortran-8 PYVERS=$(shell pyversions -vr) PY3VERS=$(shell py3versions -vr) %: dh $@ --with python2,python3,fortran_mod override_dh_auto_configure: dh_auto_configure -Bbuild-main -- --disable-python --with-perl-dir=vendor cp src/*.h build-main/src/ for v in $(PYVERS) $(PY3VERS); do \ dh_auto_configure -Bbuild-py$$v -- --disable-bindings --enable-python --with-python=/usr/bin/python$$v; \ cp src/*.h build-py$$v/src/; \ done #trick from python-ldns # magic is: PYTHON_VERSION=$$v dh_auto_configure -Bbuild-py$$v # and later dh_auto_build -Bbuild-py$$v override_dh_auto_build: dh_auto_build -Bbuild-main for v in $(PYVERS) $(PY3VERS); do \ dh_auto_build -Bbuild-py$$v; \ done override_dh_auto_install: dh_auto_install -Bbuild-main for v in $(PYVERS) $(PY3VERS); do \ dh_auto_install -Bbuild-py$$v; \ done dh_numpy dh_numpy3 override_dh_auto_clean: dh_auto_clean -Bbuild-main for v in $(PYVERS) $(PY3VERS); do \ dh_auto_clean -Bbuild-py$$v; \ done