[Pkg-cracklib-commits] [SCM] Git repository for pkg-cracklib branch, master, updated. debian/2.8.18-2-19-gf4c8d7d

Jan Dittberner jandd at debian.org
Sat May 19 23:27:41 UTC 2012


The following commit has been merged in the master branch:
commit 5da2dfc0930f058d3ea19d3f444b90bfaec531d3
Author: Jan Dittberner <jandd at debian.org>
Date:   Sun May 20 01:03:05 2012 +0200

    add Python3 support
    
    * add Python3 support
      - debian/control:
        - add new binary package python3-cracklib
        - add python3-all-dev (>= 3.1.3-2~) and python3-setuptools to
          Build-Depends
      - debian/rules:
        - add python3 to dh --with options
        - add override_dh_python2 and override_dh_python3 to run
          dh_python2 for python-cracklib and dh_python3 for python3-cracklib
          only
        - define PY3VERS and use it for configuring, building, testing and
          installing python3-cracklib

diff --git a/debian/changelog b/debian/changelog
index e2ca754..7f9bc99 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,18 @@ cracklib2 (2.8.19-1) UNRELEASED; urgency=low
     debian/test_cracklib.py and debian/crack.py
   * add debian/patches/pass-dict-to-cracklib-test.patch to allow running
     Python tests using a specific dictionary
+  * add Python3 support
+    - debian/control:
+      - add new binary package python3-cracklib
+      - add python3-all-dev (>= 3.1.3-2~) and python3-setuptools to
+        Build-Depends
+    - debian/rules:
+      - add python3 to dh --with options
+      - add override_dh_python2 and override_dh_python3 to run
+        dh_python2 for python-cracklib and dh_python3 for python3-cracklib
+        only
+      - define PY3VERS and use it for configuring, building, testing and
+        installing python3-cracklib
 
  -- Jan Dittberner <jandd at debian.org>  Fri, 18 May 2012 20:25:36 +0200
 
diff --git a/debian/control b/debian/control
index 84db264..741ad83 100644
--- a/debian/control
+++ b/debian/control
@@ -5,8 +5,9 @@ Maintainer: Jan Dittberner <jandd at debian.org>
 Uploaders: Martin Pitt <mpitt at debian.org>
 Standards-Version: 3.9.3
 Build-Depends: debhelper (>= 7.0.50), python-all-dev (>= 2.6.6-3~),
- chrpath, xmlto, automake (>= 1.10), autoconf (>=2.61), libtool,
- python-setuptools, dpkg-dev (>= 1.16.1~), autotools-dev
+ python3-all-dev (>= 3.1.3-2~), chrpath, xmlto, automake (>= 1.10),
+ autoconf (>=2.61), libtool, python-setuptools, python3-setuptools,
+ dpkg-dev (>= 1.16.1~), autotools-dev
 Homepage: http://sourceforge.net/projects/cracklib
 Vcs-Git: git://git.debian.org/pkg-cracklib/pkg-cracklib.git
 Vcs-Browser: http://git.debian.org/?p=pkg-cracklib/pkg-cracklib.git
@@ -62,3 +63,20 @@ Description: Python bindings for password checker library cracklib2
  .
  You should install this package if you want to use or develop Python
  applications that want to interface with cracklib2.
+
+Package: python3-cracklib
+Section: python
+Architecture: any
+Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends},
+ libcrack2 (>=${binary:Version}), cracklib-runtime
+ (>=${binary:Version})
+Provides: ${python3:Provides}
+Description: Python3 bindings for password checker library cracklib2
+ This package provides Python bindings for cracklib. It contains a
+ pythonic interface to cracklib's functions and some Python
+ convenience functions.
+ .
+ You should install this package if you want to use or develop Python3
+ applications that want to interface with cracklib2.
+ .
+ This package provides the Python3 version of cracklib2's Python binding.
diff --git a/debian/rules b/debian/rules
index 4f85f95..f3abdd9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,6 +10,7 @@ DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
 PYVERS := $(shell pyversions -vs)
+PY3VERS := $(shell py3versions -vs)
 
 override_dh_auto_configure:
 	aclocal && libtoolize && automake --add-missing && autoreconf
@@ -20,7 +21,7 @@ override_dh_auto_configure:
 		--prefix=/usr --disable-rpath --without-python \
 		--with-default-dict=/var/cache/cracklib/cracklib_dict \
 		CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
-	for i in $(PYVERS); do \
+	for i in $(PYVERS) $(PY3VERS); do \
 		mkdir -p $(CURDIR)/debian/buildtmp/python$$i; \
 		cd $(CURDIR)/debian/buildtmp/python$$i; \
 		$(CURDIR)/configure \
@@ -34,7 +35,7 @@ override_dh_auto_configure:
 
 override_dh_auto_build:
 	$(MAKE) -C $(CURDIR)/debian/buildtmp/base
-	for i in $(PYVERS); do \
+	for i in $(PYVERS) $(PY3VERS); do \
 		cd $(CURDIR)/debian/buildtmp/python$$i; \
 		rm -rf lib; ln -s $(CURDIR)/debian/buildtmp/base/lib lib; \
 		cd python; \
@@ -52,7 +53,7 @@ override_dh_auto_test:
 	mkdir $(CURDIR)/debian/tmp
 	$(CURDIR)/debian/buildtmp/base/util/cracklib-packer $(CURDIR)/debian/tmp/cracklib_dict < \
 	 $(CURDIR)/dicts/cracklib-small
-	for i in $(PYVERS); do \
+	for i in $(PYVERS) $(PY3VERS); do \
 		cd $(CURDIR)/debian/buildtmp/python$$i/python/$(call py_builddir_sh,$$i); \
 		LD_LIBRARY_PATH=$(CURDIR)/debian/buildtmp/base/lib/.libs python$$i \
 		-c 'import cracklib; cracklib.test(dictpath="$(CURDIR)/debian/tmp/cracklib_dict")'; \
@@ -95,11 +96,21 @@ override_dh_auto_install:
 	  $(CURDIR)/debian/cracklib-runtime/usr/sbin/cracklib-unpacker
 	for i in $(PYVERS); do \
 		cd $(CURDIR)/debian/buildtmp/python$$i/python; \
-		python$$i setup.py install --install-layout=deb --root $(CURDIR)/$(call py_pkgname,debian/python-cracklib,$$i); \
+		python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/python-cracklib; \
+	done
+	for i in $(PY3VERS); do \
+		cd $(CURDIR)/debian/buildtmp/python$$i/python; \
+		python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/python3-cracklib; \
 	done
 
 override_dh_installchangelogs:
 	dh_installchangelogs NEWS
 
+override_dh_python2:
+	dh_python2 -ppython-cracklib
+
+override_dh_python3:
+	dh_python3 -ppython3-cracklib
+
 %:
-	dh --with python2,autotools_dev $@
+	dh --with python2,python3,autotools_dev $@

-- 
Git repository for pkg-cracklib



More information about the Pkg-cracklib-commits mailing list