summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 706fc3e6a8103e8c9cd8e98e9795782f38917377 (plain)
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
#!/usr/bin/make -f
# -*- makefile -*-

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

PYVERS := $(shell pyversions -r)

export DEB_CFLAGS_MAINT_APPEND = -Wl,-z,relro

package=python-srp

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

override_dh_auto_build:
	sphinx-build $(CURDIR)/srp/doc $(CURDIR)/srp/doc/build

	set -ex; \
	for python in $(PYVERS);  do \
		$$python setup.py build; \
	done

override_dh_auto_install:
	set -ex; \
	for python in $(PYVERS); do \
		$$python setup.py install --skip-build \
			--root debian/$(package)\
			--install-layout deb; \
	done

override_dh_install:
	dh_install -Xsrp/doc/

override_dh_installdocs:
	mkdir -p debian/$(package)/usr/share/doc/$(package)
	cp debian/copyright debian/$(package)/usr/share/doc/$(package)/

override_dh_sphinxdoc:
	cp -r srp/doc/build/* debian/$(package)/usr/share/doc/$(package)/
	dh_sphinxdoc usr/share/doc/$(package)/
	
override_dh_auto_clean:
	dh_auto_clean
	rm -rf srp/doc/build
	rm -rf build