Hi!

Sorry. used git wrong and the patch is incomplete. Should be better now

  Christoph
commit 0fdab205ecab613780a80fd485d94922b3ef9512
Author: Christoph Egger <christ...@debian.org>
Date:   Sun Jun 18 15:03:20 2017 +0200

    Refresh python3 patch

diff --git a/debian/control b/debian/control
index 5028afc..672ffd0 100644
--- a/debian/control
+++ b/debian/control
@@ -6,12 +6,13 @@ Build-Depends: autotools-dev,
                chrpath,
                debhelper (>= 9),
                dh-autoreconf,
-	       dh-python,
+               dh-python,
                doxygen,
                libpcap-dev,
                libssl-dev,
                pkg-config,
                python-all-dev,
+               python3-all-dev,
                swig
 Standards-Version: 3.9.8
 Section: net
@@ -81,3 +82,20 @@ Description: Python bindings for the ldns library for DNS programming
  .
  This archive contains modules that allow you to use LDNS Library in
  Python programs.
+
+Package: python3-ldns
+Section: python
+Architecture: any
+Depends: ${misc:Depends},
+         ${python3:Depends},
+         ${shlibs:Depends}
+Provides: ${python3:Provides}
+Multi-Arch: foreign
+Description: Python3 bindings for the ldns library for DNS programming
+ The goal of ldns is to simplify DNS programming, it supports recent RFCs
+ like the DNSSEC documents, and allows developers to easily create software
+ conforming to current RFCs, and experimental software for current Internet
+ Drafts.
+ .
+ This archive contains modules that allow you to use LDNS Library in
+ Python3 programs.
diff --git a/debian/libldns-dev.dirs b/debian/libldns-dev.dirs
index 6554f70..95c4b91 100644
--- a/debian/libldns-dev.dirs
+++ b/debian/libldns-dev.dirs
@@ -1,3 +1,3 @@
-usr/lib
 usr/include
+usr/lib
 usr/share/man/man3
diff --git a/debian/python-ldns.install b/debian/python-ldns.install
index 88eeada..8516dfd 100644
--- a/debian/python-ldns.install
+++ b/debian/python-ldns.install
@@ -1,3 +1,3 @@
-usr/lib/python*/*-packages/_ldns.so*
-usr/lib/python*/*-packages/ldns.py
-usr/lib/python*/*-packages/ldnsx.py
+usr/lib/python2*/*-packages/_ldns.so*
+usr/lib/python2*/*-packages/ldns.py
+usr/lib/python2*/*-packages/ldnsx.py
diff --git a/debian/python3-ldns.install b/debian/python3-ldns.install
new file mode 100644
index 0000000..7b5a78f
--- /dev/null
+++ b/debian/python3-ldns.install
@@ -0,0 +1,3 @@
+usr/lib/python3*/*-packages/_ldns.so*
+usr/lib/python3*/*-packages/ldns.py
+usr/lib/python3*/*-packages/ldnsx.py
diff --git a/debian/rules b/debian/rules
index 1461e3d..9cd6f8d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,13 +11,34 @@ include /usr/share/dpkg/default.mk
 
 export DPKG_GENSYMBOLS_CHECK_LEVEL=4
 
-PYVERS=$(shell pyversions -vd)
+PYVERS=$(shell pyversions -vd) $(shell py3versions -vd)
+
+CONFIGFLAGS=--disable-rpath --enable-gost --enable-gost-anyway --disable-ldns-config
 
 %:
-	dh $@ --with python2 --with autoreconf --with autotools-dev
+	dh $@ --with python2 --with autoreconf --with autotools-dev --with python3
 
 override_dh_auto_configure:
-	dh_auto_configure -- --disable-rpath --enable-gost --enable-gost-anyway --with-pyldns --with-examples --with-drill --disable-ldns-config
+	dh_auto_configure -- $(CONFIGFLAGS) --with-examples --with-drill
+	for pyvers in $(PYVERS); do \
+		PYTHON_VERSION=$$pyvers dh_auto_configure -B build/python-$$pyvers -- $(CONFIGFLAGS) --with-pyldns; \
+		done
+
+override_dh_auto_build:
+	dh_auto_build
+	for pyvers in $(PYVERS); do \
+		dh_auto_build -B build/python-$$pyvers;\
+		done
+
+override_dh_auto_install:
+	dh_auto_install
+	for pyvers in $(PYVERS); do \
+		dh_auto_install -B build/python-$$pyvers;\
+		done
+
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -rf build/
 
 override_dh_strip:
 	dh_strip -O--dbgsym-migration='libldns1-dbg (<< 1.7.0~)'

Reply via email to