View | Details | Raw Unified | Return to bug 49720 | Differences between
and this patch

Collapse All | Expand All

(-)a/tdb/01_python3.patch (+140 lines)
Line 0    Link Here 
1
commit 30cf732f4c0c46cfa778afdd4fcab97bc7c3401c
2
Author: Jelmer Vernooij <jelmer@jelmer.uk>
3
Date:   Sun Feb 28 14:36:50 2016 +0000
4
5
    Build Python3 bindings. Closes: #815141
6
7
diff --git debian/compat debian/compat
8
index 45a4fb7..ec63514 100644
9
--- debian/compat
10
+++ debian/compat
11
@@ -1 +1 @@
12
-8
13
+9
14
diff --git debian/control debian/control
15
index 390be39..f120d1f 100644
16
--- debian/control
17
+++ debian/control
18
@@ -3,12 +3,12 @@ Section: devel
19
 Priority: optional
20
 Maintainer: Debian Samba Maintainers <pkg-samba-maint@lists.alioth.debian.org>
21
 Uploaders: Jelmer Vernooij <jelmer@debian.org>
22
-Build-Depends: debhelper (>= 8.1.3),
23
+Build-Depends: debhelper (>= 9),
24
                dh-python,
25
                docbook-xml,
26
                docbook-xsl,
27
-               python-all-dbg (>= 2.6.6-3),
28
-               python-all-dev (>= 2.6.6-3),
29
+               python-dev (>= 2.6.6-3),
30
+               python3-dev,
31
                xsltproc
32
 Homepage: http://tdb.samba.org/
33
 Standards-Version: 3.9.6
34
@@ -98,3 +98,35 @@ Description: Python bindings for TDB - debug extension
35
  appropriate locking and transactions.
36
  .
37
  This package contains the Python debug extension.
38
+
39
+Package: python3-tdb
40
+Section: python
41
+Architecture: linux-any kfreebsd-any
42
+Depends: libtdb1 (= ${binary:Version}),
43
+         ${misc:Depends},
44
+         ${python3:Depends},
45
+         ${shlibs:Depends}
46
+Provides: ${python3:Provides}
47
+Description: Python3 bindings for TDB
48
+ This is a simple database API. It is modelled after the structure
49
+ of GDBM. TDB features, unlike GDBM, multiple writers support with
50
+ appropriate locking and transactions.
51
+ .
52
+ This package contains the Python3 bindings.
53
+
54
+Package: python3-tdb-dbg
55
+Section: debug
56
+Architecture: linux-any kfreebsd-any
57
+Priority: extra
58
+Depends: python3-tdb (= ${binary:Version}),
59
+         ${misc:Depends},
60
+         ${python3:Depends},
61
+         ${shlibs:Depends}
62
+Recommends: python3-dbg, libtdb1-dbg
63
+Provides: ${python3:Provides}
64
+Description: Python3 bindings for TDB - debug extension
65
+ This is a simple database API. It is modelled after the structure
66
+ of GDBM. TDB features, unlike GDBM, multiple writers support with
67
+ appropriate locking and transactions.
68
+ .
69
+ This package contains the Python3 debug extension.
70
diff --git debian/python-tdb.install debian/python-tdb.install
71
index 607c065..b2cc136 100644
72
--- debian/python-tdb.install
73
+++ debian/python-tdb.install
74
@@ -1 +1 @@
75
-usr/lib/python*
76
+usr/lib/python2*
77
diff --git debian/python3-tdb.install debian/python3-tdb.install
78
new file mode 100644
79
index 0000000..4606faa
80
--- /dev/null
81
+++ debian/python3-tdb.install
82
@@ -0,0 +1 @@
83
+usr/lib/python3*
84
diff --git debian/rules debian/rules
85
index 390e99f..883d9ad 100755
86
--- debian/rules
87
+++ debian/rules
88
@@ -10,16 +10,19 @@ LDFLAGS += -Wl,--as-needed
89
 
90
 DESTDIR=$(CURDIR)/debian/tmp
91
 export PYTHON=$(shell which `pyversions -d`)
92
-export PYTHON_CONFIG=$(PYTHON)-config
93
 
94
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
95
 
96
 %:
97
-	dh $* --with python2
98
+	dh $* --with python2,python3
99
 
100
 override_dh_auto_configure:
101
-	CPPFLAGS="$(CPPFLAGS)" PYTHON="$(PYTHON)" PYTHON_CONFIG="$(PYTHON_CONFIG)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
102
-		   ./configure --prefix=/usr --disable-rpath-install --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
103
+	PYTHON="$(PYTHON)" \
104
+	CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
105
+		./configure --prefix=/usr --disable-rpath-install \
106
+		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
107
+		--extra-python=python3 \
108
+		-v
109
 
110
 get-packaged-orig-source:
111
 	./debian/build-orig.sh
112
@@ -28,7 +31,7 @@ override_dh_python2:
113
 	dh_python2 --no-guessing-versions
114
 
115
 override_dh_auto_build:
116
-	$(MAKE) all
117
+	$(MAKE) all V=2
118
 
119
 override_dh_auto_test:
120
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
121
@@ -52,6 +55,9 @@ override_dh_auto_clean:
122
 		buildtools/wafsamba/*/*.pyc \
123
 		buildtools/wafsamba/*.pyc
124
 
125
+override_dh_install:
126
+	dh_install --list-missing
127
+
128
 override_dh_auto_install:
129
 	$(MAKE) install DESTDIR=$(DESTDIR)
130
 	# Waf should be doing this..
131
@@ -65,7 +71,8 @@ override_dh_auto_install:
132
 override_dh_strip:
133
 	dh_strip -p libtdb1 --dbg-package=libtdb1-dbg
134
 	dh_strip -p python-tdb --dbg-package=python-tdb-dbg
135
+	dh_strip -p python3-tdb --dbg-package=python3-tdb-dbg
136
 	dh_strip -p tdb-tools
137
 
138
 override_dh_makeshlibs:
139
-	dh_makeshlibs -- -c4
140
+	dh_makeshlibs -Npython-tdb -Npython3-tdb -- -c4
(-)a/tdb/02_python3.patch (-1 / +27 lines)
Line 0    Link Here 
0
- 
1
diff --git debian/rules debian/rules
2
index 883d9ad..e3aa3f1 100755
3
--- debian/rules
4
+++ debian/rules
5
@@ -9,7 +9,7 @@ CFLAGS += -g -Wall
6
 LDFLAGS += -Wl,--as-needed
7
 
8
 DESTDIR=$(CURDIR)/debian/tmp
9
-export PYTHON=$(shell which `pyversions -d`)
10
+export PYTHON=$(shell which python3)
11
 
12
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
13
 
14
@@ -17,11 +17,11 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
15
 	dh $* --with python2,python3
16
 
17
 override_dh_auto_configure:
18
-	PYTHON="$(PYTHON)" \
19
+	PYTHON="" \
20
 	CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
21
 		./configure --prefix=/usr --disable-rpath-install \
22
 		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
23
-		--extra-python=python3 \
24
+		--extra-python=python2 \
25
 		-v
26
 
27
 get-packaged-orig-source:

Return to bug 49720