#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk export PYBUILD_NAME=pycryptodome # DESTDIR export variable is used hereunder in execute_after_dh_auto_install export DESTDIR=$(CURDIR)/debian/python3-pycryptodome py3versions = $(shell py3versions -rv) %: dh $@ --with python3,sphinxdoc --buildsystem=pybuild override_dh_auto_test: PYBUILD_SYSTEM=custom \ PYBUILD_TEST_ARGS="python{version} -m Cryptodome.SelfTest {build_dir}/" dh_auto_test execute_before_dh_auto_build: export http_proxy=127.0.0.1:9 export https_proxy=127.0.0.1:9 touch .separate_namespace execute_after_dh_auto_build: PYTHONPATH=. python3 -m sphinx -N -bhtml Doc/ build/html # HTML generator PYTHONPATH=. python3 -m sphinx -N -bman Doc/ build/man # Manpage generator # Do this until it becomes clearer where documentation should live post Python 2 override_dh_installdocs: dh_installdocs -p python3-pycryptodome dh_installdocs --doc-main-package=python-pycryptodome-doc -p python-pycryptodome-doc execute_after_dh_auto_install: set -e ; for pyver in $(py3versions); do \ rm $(DESTDIR)/usr/lib/python$$pyver/dist-packages/Cryptodome/SelfTest/Cipher/test_vectors/AES/README.txt; \ rm $(DESTDIR)/usr/lib/python$$pyver/dist-packages/Cryptodome/SelfTest/Cipher/test_vectors/TDES/README.txt; \ rm $(DESTDIR)/usr/lib/python$$pyver/dist-packages/Cryptodome/SelfTest/Hash/test_vectors/keccak/readme.txt; \ rm $(DESTDIR)/usr/lib/python$$pyver/dist-packages/Cryptodome/SelfTest/Signature/test_vectors/ECDSA/README.txt; \ rm $(DESTDIR)/usr/lib/python$$pyver/dist-packages/Cryptodome/SelfTest/PublicKey/test_vectors/ECC/gen_ecc_p256.sh; \ rm $(DESTDIR)/usr/lib/python$$pyver/dist-packages/Cryptodome/SelfTest/PublicKey/test_vectors/ECC/gen_ecc_p384.sh; \ rm $(DESTDIR)/usr/lib/python$$pyver/dist-packages/Cryptodome/SelfTest/PublicKey/test_vectors/ECC/gen_ecc_p521.sh; \ rm $(DESTDIR)/usr/lib/python$$pyver/dist-packages/Cryptodome/SelfTest/PublicKey/test_vectors/RSA/gen_rsa_2048.sh; \ done