File: rules

package info (click to toggle)
pyspf 2.0.14-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 764 kB
  • sloc: python: 1,486; makefile: 23; sh: 18
file content (37 lines) | stat: -rwxr-xr-x 1,176 bytes parent folder | download
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
#!/usr/bin/make -f

export DH_VERBOSE=1

export PYBUILD_TEST_CUSTOM := 1
export PYBUILD_TEST_ARGS := cd test && {interpreter} testspf.py

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_install:
	# Make dirs for the tools package (then move scripts from python3-spf)
	mkdir -p debian/spf-tools-python/usr/bin/
	# Rename the `spfquery` tool for the alternatives system
	# (omitting the ".py" language extension):
	mv $(CURDIR)/debian/tmp/usr/bin//spfquery.py debian/spf-tools-python/usr/bin/spfquery.pyspf
	# Give the `type99` tool a more specific name
	# (omitting the ".py" language extension):
	mv $(CURDIR)/debian/tmp/usr/bin//type99.py	 debian/spf-tools-python/usr/bin/pyspf-type99
	rm -rf $(CURDIR)/debian/tmp/usr/bin

override_dh_installdocs:
	cp $(CURDIR)/CHANGELOG $(CURDIR)/changelog
	dh_installdocs
	rm $(CURDIR)/changelog

override_dh_auto_clean:
	set -e && for py3vers in $(shell py3versions -sv); do \
	        python$$py3vers setup.py clean -a; \
	done
	find . -name \*.pyc -exec rm {} \;

execute_after_dh_fixperms:
	chmod +x $(CURDIR)/debian/python3-spf/usr/lib/python3*/dist-packages/spf.py

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3