File: rules

package info (click to toggle)
hovercraft 2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,148 kB
  • ctags: 426
  • sloc: python: 1,747; makefile: 143; sh: 2
file content (32 lines) | stat: -rwxr-xr-x 1,141 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
#!/usr/bin/make -f
#export DH_VERBOSE=1
#export DEB_BUILD_OPTIONS=nocheck
export PYBUILD_NAME=hovercraft

DEBDATE := $(shell dpkg-parsechangelog -Sdate | date -u +%F -f -)

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

override_dh_auto_build:

override_dh_auto_test:
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} -Wd -m pytest -v -x" dh_auto_test

override_dh_auto_install:
	python3 setup.py install --root=debian/hovercraft --install-layout=deb --install-lib=/usr/share/hovercraft --install-scripts=/usr/share/hovercraft
	# strip tests from binary
	find debian/hovercraft -type d -name tests -print | xargs /bin/rm -rf
	# use packaged impress.js instead of covenience code for binary:
	find debian/hovercraft -name impress.js -exec ln -sfv /usr/share/javascript/impress/impress.js '{}' \;

override_dh_installdocs:
	PYTHONPATH=. sphinx-build -N -bhtml docs debian/hovercraft/usr/share/doc/hovercraft/html
	dh_installdocs

override_dh_installman:
	PYTHONPATH=. sphinx-build -N -bman -D today_fmt="$(DEBDATE)" docs .pybuild
	dh_installman .pybuild/hovercraft.1

override_dh_compress:
	dh_compress -X.rst # save examples