File: rules

package info (click to toggle)
electrum 4.5.8%2Bds-6
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 24,428 kB
  • sloc: python: 91,359; sh: 1,150; java: 116; xml: 51; makefile: 25
file content (49 lines) | stat: -rwxr-xr-x 2,392 bytes parent folder | download | duplicates (2)
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
38
39
40
41
42
43
44
45
46
47
48
49
#!/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.  <https://github.com/spesmilo/electrum/issues/8030>
	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+')"