Commit 2c87ebd5 authored by Timo Aaltonen's avatar Timo Aaltonen

Add py3 support

parent 4240302c
......@@ -5,6 +5,7 @@ Maintainer: Debian Samba Maintainers <pkg-samba-maint@lists.alioth.debian.org>
Uploaders: Jelmer Vernooij <jelmer@debian.org>,
Mathieu Parent <sathieu@debian.org>
Build-Depends: debhelper (>> 11),
dh-exec,
dh-python,
docbook-xml,
docbook-xsl,
......@@ -20,6 +21,9 @@ Build-Depends: debhelper (>> 11),
python-all-dev (>= 2.6.6-3),
python-talloc-dev (>= 2.1.11~),
python-tdb (>= 1.3.15~),
python3-dev,
python3-talloc-dev,
python3-tdb,
xsltproc
Homepage: http://ldb.samba.org/
Standards-Version: 4.1.3
......@@ -121,3 +125,36 @@ Description: LDB Python bindings - development files
database.
.
This package contains the development files for the Python bindings.
Package: python3-ldb
Pre-Depends: ${misc:Pre-Depends}
Section: python
Architecture: any
Depends: libldb1 (= ${binary:Version}),
${misc:Depends},
${python3:Depends},
${shlibs:Depends}
Provides: ${python3:Provides}
Breaks: ${python3:Breaks}
Description: Python3 bindings for LDB
ldb is a LDAP-like embedded database built on top of TDB.
.
This package contains the Python3 bindings.
Package: python3-ldb-dev
Section: libdevel
Architecture: any
Depends: libc6-dev,
libldb-dev,
pkg-config,
python3-ldb (= ${binary:Version}),
${misc:Depends}
Description: LDB Python3 bindings - development files
ldb is a LDAP-like embedded database built on top of TDB.
.
It is a fast database with an LDAP-like API designed
to be used within an application. In some ways it can be seen as a
intermediate solution between key-value pair databases and a real LDAP
database.
.
This package contains the development files for the Python3 bindings.
usr/include/pyldb.h
#! /usr/bin/dh-exec
usr/include/pyldb.h ${DEB_PY2_INCDIR}
usr/lib/*/libpyldb-util.so
usr/lib/*/pkgconfig/pyldb-util.pc
usr/lib/*/libpyldb-util.so.*
usr/lib/python*
usr/lib/python2*
ldb.so python-ldb #MINVER#
PyStr_AsUTF8AndSize@Base 2:1.1.29
initldb@Base 2:1.1.29
libpyldb-util.so.1 #PACKAGE# #MINVER#
PYLDB_UTIL_1.1.2@PYLDB_UTIL_1.1.2 1.1.2~
PYLDB_UTIL_1.1.3@PYLDB_UTIL_1.1.3 1.1.3
......
#! /usr/bin/dh-exec
usr/include/pyldb.h ${DEB_PY3_INCDIR}
usr/lib/*/libpyldb-util.cpython*.so
usr/lib/*/pkgconfig/pyldb-util.cpython*.pc
usr/lib/*/libpyldb-util.cpython*.so.*
usr/lib/python3*
python3-ldb binary: binary-or-shlib-defines-rpath * /usr/lib/ldb
python3-ldb binary: package-name-doesnt-match-sonames libpyldb-util-py3-1
......@@ -21,22 +21,22 @@ LDFLAGS += -Wl,--as-needed
DESTDIR=$(CURDIR)/debian/tmp
export PYTHON=$(shell which `pyversions -d`)
export PYTHON_CONFIG="$(PYTHON)-config"
export WAF=$(PYTHON) ./buildtools/bin/waf
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
%:
dh $* --with python2
dh $* --with python2,python3
override_dh_auto_configure:
PYTHON="$(PYTHON)" PYTHON_CONFIG="$(PYTHON_CONFIG)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
PYTHON="$(PYTHON)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
$(WAF) configure --prefix=/usr --disable-rpath-install \
--builtin-libraries=ccan,replace,tdb_compat \
--bundled-libraries=NONE,pytevent \
--minimum-library-version="$(shell ./debian/autodeps.py --minimum-library-version)" \
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
--with-modulesdir=/usr/lib/$(DEB_HOST_MULTIARCH)/ldb/modules
--with-modulesdir=/usr/lib/$(DEB_HOST_MULTIARCH)/ldb/modules \
--extra-python=python3
get-packaged-orig-source:
./debian/build-orig.sh
......@@ -70,9 +70,17 @@ override_dh_auto_install:
ar cr libldb.a bin/default/common/*.o
mv libldb.a $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)
override_dh_install:
DEB_PY2_INCDIR=$(shell python-config --includes | sed 's,^-I\([^ ]*\).*,\1,') \
DEB_PY3_INCDIR=$(shell python3-config --includes | sed 's,^-I\([^ ]*\).*,\1,') \
dh_install
override_dh_missing:
dh_missing --list-missing
override_dh_strip:
dh_strip --dbgsym-migration='python-ldb-dbg (<< 2:1.1.27-1~), libldb1-dbg (<< 2:1.1.27-1~)'
override_dh_makeshlibs:
dh_makeshlibs -Xldb.so -ppython-ldb -- -c4
dh_makeshlibs -Xldb. -X_tevent. -ppython-ldb -ppython3-ldb -- -c3
dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/ldb -plibldb1 -- -c4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment