From 1a79317292270dbca81cb4893a7f411286bcea0e Mon Sep 17 00:00:00 2001 From: Ben Carrillo Date: Mon, 28 Jan 2013 20:14:06 +0900 Subject: working package with sphinx-built documentation --- debian/control | 24 ++++++++++++++++++++++-- debian/docs | 1 - debian/rules | 43 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 53996fd..f389dfa 100644 --- a/debian/control +++ b/debian/control @@ -2,15 +2,22 @@ Source: srp Maintainer: Ben Carrillo Section: python Priority: optional -Build-Depends: python-all-dev (>= 2.6.6-3), debhelper (>= 9) +Build-Depends: + python-all-dev (>= 2.6.6-3), + debhelper (>= 9), + python-sphinx (>= 1.0.7+dfsg), Standards-Version: 3.9.4 +X-Python-Version: >= 2.6 Vcs-Hg: https://code.google.com/p/pysrp/ Vcs-Browser: http://code.google.com/p/pysrp/source/browse/ Homepage: http://code.google.com/p/pysrp/ Package: python-srp Architecture: any -Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} +Depends: + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} Description: Secure Remote Password protocol implementation This package provides an implementation of the Secure Remote Password protocol (SRP). SRP is a cryptographically strong authentication @@ -33,3 +40,16 @@ Description: Secure Remote Password protocol implementation the authenticated connection. However, successful authentication does result in a cryptographically strong shared key that can be used for symmetric-key encryption. + +Package: python-srp-doc +Architecture: all +Section: doc +Depends: ${misc:Depends}, ${sphinxdoc:Depends} +Suggests: python-doc +Description: Secure Remote Password protocol implementation + This package provides an implementation of the Secure Remote Password + protocol (SRP). SRP is a cryptographically strong authentication + protocol for password-based, mutual authentication over an insecure + network connection. + . + This package provides detailed documentation on python-srp usage. diff --git a/debian/docs b/debian/docs index 8f9baa1..71dfd5b 100644 --- a/debian/docs +++ b/debian/docs @@ -1,2 +1 @@ README.txt -srp/doc/* 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 -- cgit v1.2.3