File: rules

package info (click to toggle)
pyspf 2.0.12t-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 664 kB
  • ctags: 324
  • sloc: python: 1,420; makefile: 36; sh: 18
file content (55 lines) | stat: -rwxr-xr-x 1,586 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/make -f

export DH_VERBOSE=1
%:
	dh $@ --with python2,python3

override_dh_auto_install:

	set -e && for pyvers in $(shell pyversions -vr); do \
		python$$pyvers setup.py install --install-layout=deb \
			--root $(CURDIR)/debian/python-spf; \
	done

	set -e && for py3vers in $(shell py3versions -sv); do \
		python$$py3vers setup.py install --install-layout=deb \
			--root $(CURDIR)/debian/python3-spf; \
	done

	# Make dirs for the tools package (then move scripts from python-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/python3-spf/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/python3-spf/usr/bin/type99.py	 debian/spf-tools-python/usr/bin/pyspf-type99
	rm -rf $(CURDIR)/debian/python*-spf/usr/bin

override_dh_installdocs:

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

override_dh_auto_clean:

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

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

override_dh_python2:
	dh_python2 -N spf-tools-python

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