#!/usr/bin/make -f export PYBUILD_NAME=pyzbar # The upstream project by default installs two files into /usr/bin: # - read_zbar, which is a thin wrapper calling the main function of # /usr/lib/python3/dist-packages/pyzbar/scripts/read_zbar.py # - read_zbar.py which is basically a copy of # /usr/lib/python3/dist-packages/pyzbar/scripts/read_zbar.py # The only difference being a different shebang # Removed the tests/ directory because I would argue they are only useful # for the build. If the tests passed during build time I don't see any # reason to include them for the user export PYBUILD_AFTER_INSTALL=rm '{destdir}/usr/bin/read_zbar.py' ;\ rm -rf '{destdir}/{install_dir}/pyzbar/tests' %: dh $@ --with python3 --buildsystem=pybuild # Generate manpage with help2man override_dh_installman: mkdir -p debian/python3-pyzbar/usr/share/man/man1 # Set PYTHONPATH so that the wrapper script read_zbar can find the installed modules PYTHONPATH=debian/python3-pyzbar/usr/lib/$(shell py3versions -d)/dist-packages \ help2man --no-info --name "Command line utility for reading barcodes and QR-codes" \ --section=1 \ debian/python3-pyzbar/usr/bin/read_zbar > \ debian/python3-pyzbar/usr/share/man/man1/read_zbar.1