File: rules

package info (click to toggle)
pyxb 1.2.6%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 42,668 kB
  • sloc: python: 239,437; sh: 905; xml: 690; makefile: 60
file content (40 lines) | stat: -rwxr-xr-x 1,086 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_build:
	set -e ; \
	for doc in pyxbdump pyxbgen pyxbwsdl; do \
	  docbook-to-man debian/manpage.$$doc.sgml > $$doc.1; \
	  docbook-to-man debian/manpage.$$doc-py3.sgml > $$doc-py3.1; \
	done
	dh_auto_build
	PYTHONPATH=.:doc sphinx-build -b html -d _build/.doctrees -N doc _build/html

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -e; \
	for py in $(shell pyversions -r) $(shell py3versions -r); do \
		$$py setup.py test; \
	done
endif

override_dh_auto_install:
	dh_auto_install
	set -e ; \
	for script in pyxbdump pyxbgen pyxbwsdl ; do \
		cp debian/tmp/usr/bin/$$script debian/tmp/usr/bin/$$script-py3 ; \
		sed -i '1s/\#\!.*/#!\/usr\/bin\/python/' debian/tmp/usr/bin/$$script ; \
		sed -i '1s/\#\!.*/#!\/usr\/bin\/python3/' debian/tmp/usr/bin/$$script-py3 ; \
	done

override_dh_clean:
	rm -rf _build
	dh_clean

override_dh_installchangelogs:
	dh_installchangelogs -- doc/releases.txt