[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [translate-pootle] New python-pylucene Debian package, please test and criticize



Hello,

Here is a patch to implement the new Python Policy.

The current source package embed a binary only JAR of lucene. It would be
better to update the liblucene-java Debian package and to build
python-lucene with the JAR distributed by this package.

Kind Regards,
-- 
Nekral
diff -rauN ../orig/PyLucene-src-2.0.0-3/debian/changelog PyLucene-src-2.0.0-3/debian/changelog
--- ../orig/PyLucene-src-2.0.0-3/debian/changelog	2006-12-24 13:55:24.000000000 +0100
+++ PyLucene-src-2.0.0-3/debian/changelog	2006-12-25 01:43:27.000000000 +0100
@@ -1,8 +1,14 @@
+python-pylucene (2.0.0+3-3) unstable; urgency=low
+
+  * Switch to the new Python policy.
+
+ -- Christian Perrier <bubulle@debian.org>  Sun, 25 Dec 2006 01:41:21 +0100
+
 python-pylucene (2.0.0+3-2) unstable; urgency=low
 
   * Adapt to Debian etch
   * Lintian fixes:
-    - Remove thenow useless prerm and postinst scripts
+    - Remove the now useless prerm and postinst scripts
     - Do not install LICENSE files
     - Build-Depends on python | python-dev | python-all-dev
 
diff -rauN ../orig/PyLucene-src-2.0.0-3/debian/control PyLucene-src-2.0.0-3/debian/control
--- ../orig/PyLucene-src-2.0.0-3/debian/control	2006-12-24 13:55:24.000000000 +0100
+++ PyLucene-src-2.0.0-3/debian/control	2006-12-25 00:52:23.000000000 +0100
@@ -3,13 +3,15 @@
 Priority: optional
 Maintainer: Christian Perrier <bubulle@debian.org>
 Standards-Version: 3.7.2
-Build-Depends: debhelper (>= 5.0.38), gcj-4.1, libgcj7-dev, python-all-dev (>= 2.3.5-11)
+Build-Depends: debhelper (>= 5.0.38), gcj-4.1, libgcj7-dev, python-all-dev (>= 2.3.5-11), python-central (>= 0.5.6)
 XS-Python-Version: current, >= 2.3
 
 Package: python-pylucene
 Architecture: any
 Priority: optional
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, ${python:Depends}
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
 Description: Interface to Lucene from Python
  Python package to wrap the Java lucene library in to python
 
diff -rauN ../orig/PyLucene-src-2.0.0-3/debian/python-pylucene.install PyLucene-src-2.0.0-3/debian/python-pylucene.install
--- ../orig/PyLucene-src-2.0.0-3/debian/python-pylucene.install	2006-12-24 13:55:24.000000000 +0100
+++ PyLucene-src-2.0.0-3/debian/python-pylucene.install	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-PyLucene.py usr/lib/python2.4/site-packages
diff -rauN ../orig/PyLucene-src-2.0.0-3/debian/rules PyLucene-src-2.0.0-3/debian/rules
--- ../orig/PyLucene-src-2.0.0-3/debian/rules	2006-12-24 13:55:24.000000000 +0100
+++ PyLucene-src-2.0.0-3/debian/rules	2006-12-25 01:22:15.000000000 +0100
@@ -1,7 +1,5 @@
 #!/usr/bin/make -f
 
-export DH_OPTIONS
-
 PREFIX=/usr
 PREFIX_PYTHON=$(PREFIX)
 GCJ_HOME = $(shell $(JCC) --print-search-dirs | sed -ne '/^install:/ {s/^install: \(.*\)\/$$/\1/; p}')
@@ -21,14 +19,16 @@
 export JCCH
 
 d=$(CURDIR)/debian/python-pylucene
-pv=$(shell pyversions -vr)
-pylucene=$(d)/usr/lib/python$(pv)/site-packages/pylucene
+
+PYVERS=$(shell pyversions -vs)
 
 build: build-stamp
 build-stamp:
 	dh_testdir
 
-	$(MAKE)
+	for pyver in $(PYVERS); do \
+		$(MAKE) PYTHON_VER=$$pyver BINDIR=pylucene-$$pyver; \
+	done
 	touch build-stamp
 
 install: build
@@ -37,8 +37,12 @@
 	dh_clean -k
 	dh_installdirs
 	dh_install
-	mkdir -p $(pylucene)
-	cp release/_PyLucene.so $(pylucene)
+	for pyver in $(PYVERS); do \
+		pylucene=$(d)/usr/lib/python$$pyver/site-packages; \
+		mkdir -p $$pylucene; \
+		install -m 644 PyLucene.py $$pylucene; \
+		install pylucene-$$pyver/_PyLucene.so $$pylucene; \
+	done
 
 clean:
 	dh_testdir
@@ -46,13 +50,17 @@
 	rm -f build-stamp
 
 	dh_clean
-	$(MAKE) clean
+	for pyver in $(PYVERS); do \
+		$(MAKE) PYTHON_VER=$$pyver BINDIR=pylucene-$$pyver clean; \
+	done
+	rm -f PyLucene.pyc
 
 binary-arch: build install
 	dh_testdir
 	dh_testroot
 	dh_installdocs
 	dh_installchangelogs CHANGES
+	dh_pycentral
 	dh_strip
 	dh_compress
 	dh_fixperms

Reply to: