1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#!/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)
|