File: rules

package info (click to toggle)
python-xlib 0.23-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,540 kB
  • sloc: python: 20,366; awk: 89; makefile: 66; sh: 2
file content (41 lines) | stat: -rwxr-xr-x 975 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
#!/usr/bin/make -f
#-*- makefile -*-

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

export PYBUILD_NAME=xlib

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

override_dh_auto_build:
	dh_auto_build
	make -C doc html
	# for some reason makeinfo doesn’t create toc on the first run
	make -C doc html

override_dh_auto_clean:
	dh_auto_clean
	make -C doc clean

override_dh_installdocs:
	dh_installdocs
	rm -f debian/*/usr/share/doc/*/*/Makefile

override_dh_installexamples:
	dh_installexamples
	# adjust python3 examples hashbang
	sed -i '1 s/python$$/python3/' debian/python3-xlib/usr/share/doc/*/examples/*.py
	# set all examples executable
	chmod +x debian/python*-xlib/usr/share/doc/*/examples/*.py

override_dh_compress:
	dh_compress -X.py

override_dh_auto_test:
ifeq (,$(filter nocheck, $(DEB_BUILD_OPTIONS)))
	xvfb-run dh_auto_test
endif

.PHONY: override_dh_auto_build override_dh_auto_clean override_dh_installexamples override_dh_compress