summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Carrillo <ben@futeisha.org>2013-01-28 20:14:06 +0900
committerBen Carrillo <ben@futeisha.org>2013-01-28 20:14:06 +0900
commit1a79317292270dbca81cb4893a7f411286bcea0e (patch)
treec1dfce34c18b61ab22da56d969c0165a5d89e337
parentc10ba9626b64175553af9a65bdbfa6fdb3df4004 (diff)
working package with sphinx-built documentation
-rw-r--r--debian/control24
-rw-r--r--debian/docs1
-rwxr-xr-xdebian/rules43
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 <ben@futeisha.org>
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