From 82dd59bf397f3d334d945312d9f628cce75e559f Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Wed, 16 May 2012 20:34:52 +0200 Subject: [PATCH] Add binary package for Python3 Based on a patch from #606898. --- debian/control | 33 ++++++++++++++++++++++++++++++++- debian/rules | 37 ++++++++++++++++++++++++++----------- 2 files changed, 58 insertions(+), 12 deletions(-) diff --git a/debian/control b/debian/control index 43f003a..a57fcd7 100644 --- a/debian/control +++ b/debian/control @@ -4,12 +4,15 @@ Priority: optional Maintainer: Iustin Pop Build-Depends: debhelper (>= 7), python (>= 2.6.6-3~), python-all-dev (>= 2.6.6-3~), python-all-dbg, - libattr1-dev, python-setuptools, + python3-all, python3-all-dev, python3-all-dbg, + libattr1-dev, python-setuptools, python3-setuptools, python-sphinx (>= 1.0.7+dfsg) | python3-sphinx Standards-Version: 3.9.3 Homepage: http://pyxattr.sourceforge.net/ Vcs-Browser: http://git.k1024.org/debian-pyxattr.git Vcs-Git: git://git.k1024.org/debian-pyxattr.git +X-Python-Version: >= 2.4 +X-Python3-Version: >= 3.0 Package: python-pyxattr Architecture: any @@ -35,3 +38,31 @@ Description: module for manipulating filesystem extended attributes (debug exten . This package contains the extension built for the Python debug interpreter. + +Package: python3-pyxattr +Architecture: any +Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}, + ${sphinxdoc:Depends} +Provides: ${python:Provides} +Suggests: python3-pyxattr-dbg +Description: module for manipulating filesystem extended attributes (Python3) + pyxattr is a Python interface to the libattr library. It allows + manipulation of the filesystem extended attributes present in some + operating systems (GNU/Linux included). + . + This package contains the extension built for the Python3 + interpreter. + +Package: python3-pyxattr-dbg +Section: debug +Priority: extra +Architecture: any +Depends: python3-pyxattr (= ${binary:Version}), python3-dbg, + ${shlibs:Depends}, ${misc:Depends} +Description: module for manipulating filesystem extended attributes (Python3 debug extension) + pyxattr is a Python interface to the libattr library. It allows + manipulation of the filesystem extended attributes present in some + operating systems (GNU/Linux included). + . + This package contains the extension built for the Python3 debug + interpreter. diff --git a/debian/rules b/debian/rules index 762b3e5..743dc1f 100755 --- a/debian/rules +++ b/debian/rules @@ -12,11 +12,18 @@ export DH_OPTIONS PYVERS := $(shell pyversions -vr) +PY3VERS := $(shell py3versions -vr) + +PKGROOT=$(CURDIR)/debian/python-pyxattr +DBGROOT=$(CURDIR)/debian/python-pyxattr-dbg +PKG3ROOT=$(CURDIR)/debian/python3-pyxattr +DBG3ROOT=$(CURDIR)/debian/python3-pyxattr-dbg build: build-arch build-indep touch $@ -build-arch: $(PYVERS:%=build-python%) +build-arch: $(PYVERS:%=build-python%) $(PY3VERS:%=build-python%) + $(MAKE) doc touch $@ build-python%: @@ -25,25 +32,29 @@ build-python%: touch $@ build-indep: - $(MAKE) doc touch $@ clean: dh_testdir dh_testroot - rm -f build-arch-stamp build-indep #CONFIGURE-STAMP# + rm -f build-indep build-arch $(MAKE) clean rm -f $(PYVERS:%=build-python%) + rm -f $(PY3VERS:%=build-python%) rm -rf pxattr.egg-info dh_clean -install: build $(PYVERS:%=install-python%) - find debian/python-pyxattr-dbg ! -type d ! -name '*_d.so' | xargs rm -f - find debian/python-pyxattr-dbg -depth -empty -print0 | xargs -r0 rmdir +install: build $(PYVERS:%=install-python%) $(PY3VERS:%=install-python%) + find $(DBGROOT) ! -type d ! -name '*_d.so' | xargs rm -f + find $(DBGROOT) -depth -empty -print0 | xargs -r0 rmdir + +install-python2%: + python2$* setup.py install --root $(PKGROOT) --install-layout=deb + python2$*-dbg setup.py install --root $(DBGROOT) --install-layout=deb -install-python%: - python$* setup.py install --root $(CURDIR)/debian/python-pyxattr --install-layout=deb - python$*-dbg setup.py install --root $(CURDIR)/debian/python-pyxattr-dbg --install-layout=deb +install-python3%: + python3$* setup.py install --root $(PKG3ROOT) --install-layout=deb + python3$*-dbg setup.py install --root $(DBG3ROOT) --install-layout=deb # Build architecture-dependent files here. binary-arch: build install @@ -53,11 +64,15 @@ binary-arch: build install dh_installdocs dh_sphinxdoc dh_strip -ppython-pyxattr --dbg-package=python-pyxattr-dbg - rm -rf debian/python-pyxattr-dbg/usr/share/doc/python-pyxattr-dbg - ln -s python-pyxattr debian/python-pyxattr-dbg/usr/share/doc/python-pyxattr-dbg + dh_strip -ppython3-pyxattr --dbg-package=python3-pyxattr-dbg + rm -rf $(DBGROOT)/usr/share/doc/python-pyxattr-dbg + ln -s python-pyxattr $(DBGROOT)/usr/share/doc/python-pyxattr-dbg + rm -rf $(DBG3ROOT)/usr/share/doc/python3-pyxattr-dbg + ln -s python3-pyxattr $(DBG3ROOT)/usr/share/doc/python3-pyxattr-dbg dh_compress -X.js dh_fixperms dh_python2 + dh_python3 dh_installdeb dh_shlibdeps dh_gencontrol -- 2.39.5