Package: bogofilter
Version: 1.2.1-0ubuntu1
Severity: wishlist
Tags: patch

        Hi there

 We don't include the tokyocabinet parts of bogofilter in Ubuntu, and it
 would make the delta between Debian and Ubuntu more readable if you
 could merge the attaced patch in the Debian packaging tree.

   Thanks
-- 
Loïc Minier
--- ../sid/debian/rules	2010-05-14 16:18:41.628551000 +0200
+++ ./debian/rules	2010-05-14 16:56:07.419128291 +0200
@@ -1,5 +1,13 @@
	#!/usr/bin/make -f
	
+	derives_from_ubuntu := $(shell (dpkg-vendor --derives-from ubuntu && echo yes) || echo no)
+	ifeq ($(derives_from_ubuntu),yes)
+	do_tokyocabinet := no
+	export DH_OPTIONS := -Nbogofilter-tokyocabinet
+	else
+	do_tokyocabinet := yes
+	endif
+	
	#export DH_VERBOSE=1
	
	CFLAGS = -Wall -g
@@ -23,7 +31,10 @@ endif
	configure: configure-stamp
	configure-stamp:
		dh_testdir
-		mkdir obj-db obj-sqlite obj-tokyocabinet
+		mkdir obj-db obj-sqlite
+	ifeq ($(do_tokyocabinet),yes)
+		obj-tokyocabinet
+	endif
		cd obj-db && CFLAGS="$(CFLAGS)" ../configure --with-database=db \
			--prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc \
			AWK=awk
@@ -31,9 +42,11 @@ configure-stamp:
			--program-suffix=-sqlite --prefix=/usr --mandir=\$${prefix}/share/man \
			--sysconfdir=/etc AWK=awk && \
			sed -i 's/^INTEGRITY_TESTS.*/INTEGRITY_TESTS=t.lock1/' src/tests/Makefile
+	ifeq ($(do_tokyocabinet),yes)
		cd obj-tokyocabinet && CFLAGS="$(CFLAGS)" ../configure \
			--with-database=tokyocabinet --program-suffix=-tokyocabinet \
			--prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc AWK=awk
+	endif
		touch configure-stamp
	
	build: build-stamp
@@ -41,7 +54,9 @@ build-stamp: configure-stamp
		dh_testdir
		cd obj-db && $(MAKE)
		cd obj-sqlite && $(MAKE)
+	ifeq ($(do_tokyocabinet),yes)
		cd obj-tokyocabinet && $(MAKE)
+	endif
		touch build-stamp
	
	clean:
@@ -49,20 +64,30 @@ clean:
		rm -f build-stamp configure-stamp config.h.in debian/*debhelper.log \
			debian/*.substvars debian/bogofilter.substvars \
			debian/files debian/bogofilter-bdb.substvars \
-			debian/bogofilter-sqlite.substvars \
-			debian/bogofilter-tokyocabinet.substvars
+			debian/bogofilter-sqlite.substvars
+	ifeq ($(do_tokyocabinet),yes)
+		rm -f debian/bogofilter-tokyocabinet.substvars
+	endif
		rm -rf debian/bogofilter debian/bogofilter-bdb \
-			debian/bogofilter-sqlite debian/bogofilter-tokyocabinet \
+			debian/bogofilter-sqlite \
			debian/bogofilter-common \
-			obj-db obj-sqlite obj-tokyocabinet
+			obj-db obj-sqlite
+	ifeq ($(do_tokyocabinet),yes)
+		rm -rf debian/bogofilter-tokyocabinet obj-tokyocabinet
+	endif
	
	check:
		dh_testdir
		cd obj-db && $(MAKE) check
		cd obj-sqlite && $(MAKE) check
+	ifeq ($(do_tokyocabinet),yes)
		cd obj-tokyocabinet && $(MAKE) check
+	endif
	
-	PACKAGES = bdb sqlite tokyocabinet
+	PACKAGES = bdb sqlite
+	ifeq ($(do_tokyocabinet),yes)
+	PACKAGES += tokyocabinet
+	endif
	PROGRAMS = bf_compact bf_copy bf_tar bogofilter bogolexer bogotune \
			   bogoupgrade bogoutil
	

Reply via email to