File: rules

package info (click to toggle)
python-stetl 1.0.9%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 89,428 kB
  • ctags: 720
  • sloc: python: 3,527; xml: 699; sql: 428; makefile: 153; sh: 45
file content (51 lines) | stat: -rwxr-xr-x 1,098 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
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/make -f
# -*- makefile -*-

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

export PYBUILD_NAME=stetl

BUILD_DATE=$(shell dpkg-parsechangelog | sed -ne 's/^Date: //p' | LC_ALL=C date -u "+%d %B %Y" -f -)

MANPAGES := $(wildcard debian/man/*.*.xml)

%:
	dh $@ \
		--buildsystem=pybuild \
		--with python2 \
		--parallel

override_dh_clean:
	dh_clean debian/man/*.1

override_dh_auto_clean:
	dh_auto_clean
	(cd docs && make clean)

override_dh_auto_build:
	# Create man page from DocBook XML
	for x in $(MANPAGES) ; do \
	    docbook2x-man --string-param header-3="$(BUILD_DATE)" $$x ; \
	    mv `basename $$x | sed 's/.xml$$//'` `dirname $$x` ; \
	done

	dh_auto_build
	(cd docs && make html)

override_dh_auto_test:
	dh_auto_test || echo "Ignoring test failures"

override_dh_auto_install:
	dh_auto_install

	# Move usr/bin/stetl to stetl package
	mkdir -p debian/stetl/usr
	mv debian/python-stetl/usr/bin debian/stetl/usr

override_dh_installexamples:
	dh_installexamples

	# Remove executable bit
	find debian/*/usr/share/doc/*/examples/ -type f -exec chmod 644 {} \;