File: rules

package info (click to toggle)
hovercraft 2.6-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,228 kB
  • sloc: python: 1,948; makefile: 157; sh: 2
file content (36 lines) | stat: -rwxr-xr-x 1,214 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
#!/usr/bin/make -f
#export DH_VERBOSE=1

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:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -e; for PY in $(shell py3versions -r); do \
		http_proxy='127.0.0.1:9' https_proxy='127.0.0.1:9' python3 setup.py test; \
	done
endif

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=. python3 -m sphinx -N -bhtml docs debian/hovercraft/usr/share/doc/hovercraft/html
	dh_installdocs

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

override_dh_compress:
	dh_compress -X.rst # save examples