From 54d9736893ecba7faf191e8be7ed32a660082d51 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Tue, 8 Jan 2002 08:44:56 +0000 Subject: [PATCH] generate versioned python dependency, install to "default" version ofpython's dirs, build-depend on python --- debian/control | 4 ++-- debian/python-dep | 3 +++ debian/rules | 7 +++++-- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 debian/python-dep diff --git a/debian/control b/debian/control index 5bd5d9ff..aebfd235 100644 --- a/debian/control +++ b/debian/control @@ -1,13 +1,13 @@ Source: katie Section: misc Priority: extra -Build-Depends: postgresql-dev, libapt-pkg-dev, sp, docbook, docbook-utils +Build-Depends: postgresql-dev, libapt-pkg-dev, sp, docbook, docbook-utils, python Maintainer: James Troup Standards-Version: 3.5.6.0 Package: katie Architecture: any -Depends: python, python-pygresql, python-zlib, python-apt, apt-utils, gnupg (>= 1.0.6-1), postgresql (>= 7.1.0), ${shlibs:Depends} +Depends: ${python:Depends}, python-pygresql, python-zlib, python-apt, apt-utils, gnupg (>= 1.0.6-1), postgresql (>= 7.1.0), ${shlibs:Depends} Suggests: lintian, binutils-multiarch, symlinks Description: Debian's archive maintenance scripts This is a collection of archive maintenance scripts used by the diff --git a/debian/python-dep b/debian/python-dep new file mode 100644 index 00000000..27ca72ff --- /dev/null +++ b/debian/python-dep @@ -0,0 +1,3 @@ +import sys; + +print "python:Depends=python (>= %s), python (<< %s)" % (sys.version[:3],float(sys.version[:3])+0.1) diff --git a/debian/rules b/debian/rules index 8af895b7..8f183a24 100755 --- a/debian/rules +++ b/debian/rules @@ -9,6 +9,8 @@ # paternity under the Copyright, Designs and Patents Act 1988.) # This file may have to be extensively modified +PYTHONVER := `/usr/bin/python -c 'import sys;print sys.version[:3]'` + build: build-stamp build-stamp: $(MAKE) @@ -47,8 +49,8 @@ binary-indep: checkroot build ln -s melanie debian/tmp/usr/bin/da_remove ln -s ziyi debian/tmp/usr/bin/da_mkrelease - install -d -m 755 debian/tmp/usr/lib/python1.5/site-packages/ - install -m 644 db_access.py utils.py claire.py logging.py debian/tmp/usr/lib/python1.5/site-packages/ + install -d -m 755 debian/tmp/usr/lib/python$(PYTHONVER)/site-packages/ + install -m 644 db_access.py utils.py claire.py logging.py debian/tmp/usr/lib/python$(PYTHONVER)/site-packages/ install -d -m 755 debian/tmp/usr/share/man/man1/ install -m 644 docs/*.1 debian/tmp/usr/share/man/man1/ gzip -9v debian/tmp/usr/share/man/man1/* @@ -70,6 +72,7 @@ binary-indep: checkroot build gzip -9v debian/tmp/usr/share/doc/katie/examples/* dpkg-shlibdeps sql-aptvc.so + /usr/bin/python debian/python-dep >> debian/substvars dpkg-gencontrol -isp chown -R root.root debian/tmp chmod -R go=rX debian/tmp -- 2.39.5