| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
# Uncomment this to turn on verbose mode. |
| 4 |
export DH_VERBOSE=1 |
| 5 |
|
| 6 |
export LC_ALL=C.UTF-8 |
| 7 |
|
| 8 |
export PYBUILD_NAME=biom-format |
| 9 |
export PYBUILD_DESTDIR=debian/python3-$(PYBUILD_NAME) |
| 10 |
export PYBUILD_AFTER_INSTALL= rm -fr {destdir}/usr/lib/python3*/dist-packages/biom_format*/top_level.txt \ |
| 11 |
rm -fr {destdir}/usr/lib/python3*/dist-packages/doc \ |
| 12 |
rm -fr {destdir}/usr/lib/python3*/dist-packages/licenses \ |
| 13 |
rm -fr {destdir}/usr/lib/python3*/dist-packages/examples |
| 14 |
|
| 15 |
## When trying better hardening the build fails |
| 16 |
# export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 17 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow |
| 18 |
|
| 19 |
%: |
| 20 |
dh $@ --with bash-completion,numpy3 --buildsystem=pybuild |
| 21 |
|
| 22 |
execute_before_dh_install: |
| 23 |
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) |
| 24 |
PYTHONPATH=$(CURDIR)/debian/python3-biom-format/usr/lib/python$(shell py3versions -dv)/dist-packages \ |
| 25 |
http_proxy='127.0.0.1:9' sphinx-build -N -b html doc build/html |
| 26 |
PYTHONPATH=$(CURDIR)/debian/python3-biom-format/usr/lib/python$(shell py3versions -dv)/dist-packages \ |
| 27 |
http_proxy='127.0.0.1:9' sphinx-build -N -b man doc build/man |
| 28 |
endif |
| 29 |
|
| 30 |
execute_after_dh_fixperms: |
| 31 |
find debian -name exercise_cli.sh -exec chmod +x \{\} \; |
| 32 |
|
| 33 |
execute_after_dh_installexamples: |
| 34 |
find debian -name "*.c" -delete |
| 35 |
find debian -name "*.pyx" -delete |
| 36 |
# move tests from Python3 package to examples package |
| 37 |
if [ ! -d biom/tests ] ; then \ |
| 38 |
mv `find debian/python*$(PYBUILD_NAME) -name tests -type d` biom ; \ |
| 39 |
else \ |
| 40 |
find debian/python*$(PYBUILD_NAME) -name tests -type d | xargs rm -rf ; \ |
| 41 |
fi |