Package: src:python-xapian Version: 1.2.19-1 Tags: patch Here are some updates for the xapian-bindings packaging, introducing python3-xapian. In general, the packaging could need an update. It doesn't have to be debhelper 9, but some things could be fixed.
I didn't address: - python and python3 docs are installed into the same place, so the current way installing the docs into the same temp dir doesn't work. - The docs build try to import the just built bindings, and fail to find these. I assume this is an upstream error. For now my experimental python3-xapian package is good enough for testing things.
diff --git a/changelog b/changelog index 4ed0429..0a177a0 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,22 @@ +xapian-bindings (1.3.2+git969-0ubuntu5) vivid; urgency=medium + + * Don't run the configure target twice. + * Don't run debian/rules in parallel. + * Don't try to build architecture independent packages, there are none. + * Build the documenation for the python3 bindings. + + -- Matthias Klose <d...@ubuntu.com> Sat, 11 Apr 2015 15:06:45 +0200 + +xapian-bindings (1.3.2+git969-0ubuntu1) vivid; urgency=low + + * Upstream snapshot. + * Build a python3-xapian package. + * Ignore the Tcl test results, currently failing. + * Don't include the docs, not built in the upstream snapshot, and fails to build + for some languages. + + -- Matthias Klose <d...@ubuntu.com> Thu, 09 Apr 2015 17:28:27 +0200 + xapian-bindings (1.3.1-2) UNRELEASED; urgency=medium * debian/rules: Use dh_autotools-dev_updateconfig and diff --git a/control.in b/control.in index a8e6111..a8ab48e 100644 --- a/control.in +++ b/control.in @@ -3,7 +3,7 @@ Section: libs Priority: optional Maintainer: Olly Betts <o...@survex.com> Standards-Version: 3.9.5 -Build-Depends: @BUILD_DEPS@ autotools-dev +Build-Depends: @BUILD_DEPS@ autotools-dev, python-sphinx, python3-sphinx @X_PYTHON_VERSION@ @XS_RUBY_VERSIONS@ Homepage: http://xapian.org/ diff --git a/php5-xapian.install b/php5-xapian.install index 445e362..87f1669 100644 --- a/php5-xapian.install +++ b/php5-xapian.install @@ -1,5 +1,4 @@ usr/lib/php5/*/xapian.so usr/share/php/xapian.php -usr/share/doc/xapian-bindings/php/index.html usr/share/doc/php5-xapian usr/share/doc/xapian-bindings/php/examples/*.php5 usr/share/doc/php5-xapian/examples etc/php5/conf.d/xapian.ini diff --git a/python-xapian.install b/python-xapian.install index 2aa3e64..3a53da9 100644 --- a/python-xapian.install +++ b/python-xapian.install @@ -1,4 +1,3 @@ usr/lib/python2.*/*-packages/xapian/*.so usr/lib/python2.*/*-packages/xapian/*.py -usr/share/doc/xapian-bindings/python/index.html usr/share/doc/python-xapian usr/share/doc/xapian-bindings/python/examples/*.py usr/share/doc/python-xapian/examples diff --git a/rules b/rules index 6525829..a7085fd 100755 --- a/rules +++ b/rules @@ -40,7 +40,7 @@ DH_INSTALL_EXCLUDE := --exclude=.pyc --exclude=.pyo BUILD_DEPS := debhelper (>= 7.0.50~), # PHP is disabled by default due to incompatibility of GPL and PHP licence. -DEFAULT_LANGUAGES := python ruby tcl +DEFAULT_LANGUAGES := python python3 ruby tcl LANGUAGES := $(shell cat debian/bindings-to-package 2>/dev/null || echo '$(DEFAULT_LANGUAGES)') ifneq ($(findstring php, $(LANGUAGES)), ) @@ -98,7 +98,7 @@ endif endif X_PYTHON_VERSION := X-Dummy-Python: Python bindings not being packaged -ifneq ($(findstring python, $(LANGUAGES)), ) +ifneq ($(filter python, $(LANGUAGES)), ) # The python versions to build for: PYTHON_VERSIONS := $(shell pyversions -r debian/control) @@ -115,6 +115,11 @@ X_PYTHON_VERSION := XS-Python-Version: all endif endif +ifneq ($(filter python3, $(LANGUAGES)), ) +BUILD_DEPS += python3-all-dev, +PYTHON3_VERSIONS := $(shell py3versions -r debian/control) +endif + ifneq ($(findstring tcl, $(LANGUAGES)), ) # Build depends for Tcl. We use Tcl's stubs mechanism, so the built # bindings will work with any Tcl version from 8.0.6 upwards, whichever @@ -135,6 +140,8 @@ TCL_MAKE_OPTS = endif BUILD_TCL := 1 endif +# tests failing, and dh_install failing (no docs built) +BUILD_TCL := export DH_OPTIONS @@ -171,7 +178,7 @@ endif # dpkg-buildflags handles noopt. ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - MAKEFLAGS += -j$(NUMJOBS) + NJOBS = -j$(NUMJOBS) endif ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) MAKE_CHECK := : @@ -221,6 +228,10 @@ ifneq ($(PYTHON_VERSIONS), ) sed -e 's/@XB_PYTHON_VERSION@/$(XB_PYTHON_VERSION)/g' \ < debian/control-python.in >> debian/control.tmp endif +ifneq ($(PYTHON3_VERSIONS), ) + sed -e 's/@XB_PYTHON_VERSION@/$(XB_PYTHON_VERSION)/g' \ + < debian/control-python3.in >> debian/control.tmp +endif ifneq ($(PHP_VERSIONS), ) for v in $(PHP_VERSIONS); do \ sed "s/@PHP_VERSION@/$$v/g" debian/control-php.in ;\ @@ -260,7 +271,6 @@ endif endif mv debian/control.tmp debian/control -configure: configure-stamp configure-stamp: dh_testdir @@ -277,6 +287,15 @@ configure-stamp: cd ../../..; \ done + for python in $(PYTHON3_VERSIONS); do \ + set -e; \ + mkdir -p debian/build/$$python; \ + cd debian/build/$$python; \ + ../../../configure $(commonconfflags) --with-python3 --enable-documentation \ + PYTHON=/usr/bin/$$python; \ + cd ../../..; \ + done + for v in $(PHP_VERSIONS); do \ c=/usr/bin/php-config$$v; \ if test -x $$c ; then \ @@ -316,24 +335,29 @@ build-stamp: configure-stamp dh_testdir for python in $(PYTHON_VERSIONS); do \ set -e; \ - $(MAKE) -C debian/build/$$python ; \ + $(MAKE) $(NJOBS) -C debian/build/$$python ; \ + $(MAKE_CHECK) -C debian/build/$$python ; \ + done + for python in $(PYTHON3_VERSIONS); do \ + set -e; \ + $(MAKE) $(NJOBS) -C debian/build/$$python ; \ $(MAKE_CHECK) -C debian/build/$$python ; \ done for v in $(PHP_VERSIONS); do \ if test -x /usr/bin/php-config$$v ; then \ set -e; \ - $(MAKE) -C debian/build/php$$v ; \ + $(MAKE) $(NJOBS) -C debian/build/php$$v ; \ $(MAKE_CHECK) -C debian/build/php$$v ; \ fi \ done for v in $(RUBY_VERSIONS); do \ set -e; \ - $(MAKE) -C debian/build/ruby$$v ; \ + $(MAKE) $(NJOBS) -C debian/build/ruby$$v ; \ $(MAKE_CHECK) -C debian/build/ruby$$v ; \ done ifeq ($(BUILD_TCL), 1) - $(MAKE) -C debian/build/tcl $(TCL_MAKE_OPTS) - $(MAKE_CHECK) -C debian/build/tcl + $(MAKE) $(NJOBS) -C debian/build/tcl $(TCL_MAKE_OPTS) + -$(MAKE_CHECK) -C debian/build/tcl endif touch $@ @@ -351,6 +375,11 @@ install-stamp: build-stamp $(MAKE) -C debian/build/$$python DESTDIR=$(CURDIR)/debian/tmp install; \ done + for python in $(PYTHON3_VERSIONS); do \ + set -e; \ + $(MAKE) -C debian/build/$$python DESTDIR=$(CURDIR)/debian/tmp install; \ + done + # Install xapian.php in /usr/share/php for PHP5 so that it's in the # PHP include_path. for v in $(PHP_VERSIONS); do \ @@ -391,7 +420,8 @@ ifeq ($(BUILD_TCL), 1) endif # Reads the '*.install' files to decide where to install everything. - dh_install --sourcedir=debian/tmp --fail-missing $(DH_INSTALL_EXCLUDE) + #dh_install --sourcedir=debian/tmp --fail-missing $(DH_INSTALL_EXCLUDE) + dh_install --sourcedir=debian/tmp --list-missing $(DH_INSTALL_EXCLUDE) touch $@ binary: binary-arch binary-indep @@ -416,6 +446,9 @@ else dh_python2 endif endif +ifneq ($(PYTHON3_VERSIONS), ) + dh_python3 +endif dh_installdeb dh_shlibdeps @@ -439,6 +472,7 @@ endif binary-indep: DH_OPTIONS=-i binary-indep: build-indep install +ifeq (0,1) dh_testdir dh_testroot for v in $(RUBY_VERSIONS); do \ @@ -452,11 +486,13 @@ binary-indep: build-indep install dh_gencontrol dh_md5sums dh_builddeb +endif clean: dh_testdir dh_testroot dh_autotools-dev_restoreconfig + rm -rf debian/build dh_clean .PHONY: maint maintclean configure build build-arch build-indep install binary binary-arch binary-indep clean diff --git a/tclxapian.install b/tclxapian.install index 90228c2..0b31ffa 100644 --- a/tclxapian.install +++ b/tclxapian.install @@ -1,3 +1,2 @@ usr/lib/tcltk/xapian* -usr/share/doc/xapian-bindings/tcl8/index.html usr/share/doc/tclxapian usr/share/doc/xapian-bindings/tcl8/examples/*.tcl usr/share/doc/tclxapian/examples