#!/usr/bin/make -f # Ignore tests that don't apply to the Debian packaging. # test_qml_types.py is used for testing the QML Android GUI. export PYBUILD_TEST_ARGS = --ignore tests/test_qml_types.py # Ignore graphics and .mo files in addition to the default debian files DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(locale/.*/.*\.mo|data/dark/.*\.png|icons/.*\.png|LICENSE|debian/(changelog|copyright(|_hints|_newhints)|electrum.translations))$ %: dh $@ --buildsystem=pybuild execute_before_dh_auto_build: # Generate paymentrequest_pb2.py from paymentrequest.proto. contrib/generate_payreqpb2.sh override_dh_installchangelogs: # Move RELEASE-NOTES to changelog. dh_installchangelogs RELEASE-NOTES execute_after_dh_auto_install: # Remove redundant license files whose information has been copied to debian/copyright. rm debian/tmp/usr/lib/python3*/dist-packages/electrum/_vendor/distutils/LICENSE rm debian/tmp/usr/lib/python3*/dist-packages/electrum/_vendor/pyperclip/LICENSE.txt rm debian/tmp/usr/lib/python3*/dist-packages/electrum/plugins/payserver/www/LICENCE # Remove the unnecessary plugin README files. rm debian/tmp/usr/lib/python3*/dist-packages/electrum/_vendor/pyperclip/README.md rm debian/tmp/usr/lib/python3*/dist-packages/electrum/lnwire/README.md rm debian/tmp/usr/lib/python3*/dist-packages/electrum/plugins/README rm debian/tmp/usr/lib/python3*/dist-packages/electrum/plugins/coldcard/README.md rm debian/tmp/usr/lib/python3*/dist-packages/electrum/plugins/jade/jadepy/README.md rm debian/tmp/usr/lib/python3*/dist-packages/electrum/plugins/payserver/www/README.md # Remove QML, which is only used for Android. rm -r debian/tmp/usr/lib/python3*/dist-packages/electrum/gui/qml/ # Remove a payserver file to correct for an upstream tarball packaging problem. rm debian/tmp/usr/lib/python3*/dist-packages/electrum/plugins/payserver/www/pay # Remove upstream cruft. rm debian/tmp/usr/lib/python3*/dist-packages/electrum/plugins/payserver/www/.editorconfig rm debian/tmp/usr/lib/python3*/dist-packages/electrum/plugins/payserver/www/.gitignore # Remove bundled executable in the python directory. rm debian/tmp/usr/lib/python3*/dist-packages/electrum/electrum override_dh_gencontrol: dh_gencontrol -- -Vlibdep="$(shell dpkg-query -f '$${Depends}' -W libsecp256k1-dev | grep -oE 'libsecp256k1-\S+')"