diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules index 7c49f0e..7d4bf07 100755 --- a/debian/rules +++ b/debian/rules @@ -4,10 +4,51 @@ # 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 +docpkg=python-srp-doc %: - dh $@ --with python2 --buildsystem=python_distutils + 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 + + # XXX should remove the duplicated doc + #rm -rf debian/$(package)/usr/share/pyshared/srp/doc + #rm -rf usr/share/pyshared/srp/doc + #rm -rf debian/$(package)/usr/share/pyshared/srp/doc + #rm -rf debian/$(package)/usr/share/doc + +override_dh_install: + dh_install -X"srp/doc" + +override_dh_installdocs: + echo "Skipping the docs in the tree, they are installed in -doc package" +override_dh_sphinxdoc: +ifneq "$(shell dh_listpackages | grep -- -doc)" "" + mkdir -p debian/$(docpkg)/usr/share/doc/$(docpkg) + cp -r srp/doc/build/* debian/$(docpkg)/usr/share/doc/$(docpkg)/ + dh_sphinxdoc usr/share/doc/$(docpkg)/ +endif + +override_dh_auto_clean: + dh_auto_clean + rm -rf srp/doc/build |