#!/usr/bin/make -f export PYBUILD_NAME=amp export DEB_FFLAGS_MAINT_APPEND=-fPIC export DEB_LDFLAGS_MAINT_APPEND=-shared export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk GIT = 'https://bitbucket.org/andrewpeterson/amp' # The full changelog version number, used for the orig.tar.gz VER=$(shell dpkg-parsechangelog -ldebian/changelog -SVersion | cut -d- -f1) export PYBUILD_DISABLE_python3=test export PYBUILD_BEFORE_BUILD=make -C amp $(shell py3versions -s) export PYBUILD_AFTER_INSTALL=cp -r '{dir}/tests' '{destdir}/{install_dir}/amp' %: dh $@ --with python3 --buildsystem=pybuild override_dh_python3: dh_python3 dh_numpy3 dh_fixperms override_dh_auto_test: PYBUILD_SYSTEM=custom \ PYBUILD_TEST_ARGS="cd {build_dir}; {interpreter} /usr/bin/nosetests3 tests" \ dh_auto_test override_dh_auto_clean: dh_auto_clean rm -rf amp.egg-info/ find . -name "*.json" -delete find . -name "*-train-log.txt" -delete find . -name "*.pyc" -delete find . -name "*.o" -delete find . -name "*.mod" -delete find . -name "*.so" -delete get-orig-source: rm -rf amp-$(VER) git clone $(GIT) amp-$(VER) cd amp-$(VER) git archive --format=tar --prefix=amp-$(VER)/ HEAD > amp_$(VER).orig.tar gzip --best amp_$(VER).orig.tar mv amp_$(VER).orig.tar.gz .. rm -rf amp-$(VER)