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
|
#!/usr/bin/make -f
# DH_VERBOSE := 1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/default.mk
export PYBUILD_NAME=unicycler
# copy all nacessary data before testing and make clean after the testing
export PYBUILD_BEFORE_TEST=cp -a unicycler-runner.py {build_dir}; \
cp -a unicycler/cpp_functions.so {build_dir}/unicycler; \
cp -a sample_data {build_dir}
export PYBUILD_AFTER_TEST=rm {build_dir}/unicycler-runner.py; \
rm -r {build_dir}/sample_data; \
rm -r {build_dir}/unicycler/__pycache__
# Set $TEMR to a known value to avoid "tput: No value for $TERM and no -T specified"
export TERM=linux
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_clean:
find . -name __pycache__ -type d | xargs rm -rf
make distclean
override_dh_auto_build:
make
dh_auto_build
override_dh_auto_install:
dh_auto_install --destdir=debian/$(PYBUILD_NAME)
override_dh_python3:
dh_python3 --no-ext-rename
|