Package: dovecot-antispam
Version: 2.0+20130822-2.1
Severity: wishlist
Tags: patch

I've added a new Provides field to dovecot-core with the Dovecot ABI
version. Please consider using this field for the dovecot-antispam
dependency on dovecot. This should help reduce the number of binNMUs
that are necessary for dovecot-antispam.

Proof of concept patch attached.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dovecot-antispam depends on:
ii  dovecot-core [dovecot-abi-2.2.abiv13]  1:2.2.13-4
ii  dovecot-imapd                          1:2.2.13-4
ii  libc6                                  2.19-7

dovecot-antispam recommends no packages.

Versions of packages dovecot-antispam suggests:
pn  crm114 | dspam  <none>

-- no debconf information
commit 9d9cb2ae08da3aa738ac2f2d08206781ab2b0675
Author: Jelmer Vernooij <jel...@debian.org>
Date:   Sun Jul 20 19:34:56 2014 +0200

    Depend on dovecot ABI rather than specific Dovecot package version.

diff --git a/debian/changelog b/debian/changelog
index 8e3b3a1..dba7554 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+dovecot-antispam (2.0+20130822-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Depend on dovecot ABI rather than specific Dovecot package version.
+
+ -- Jelmer Vernooij <jel...@debian.org>  Sun, 20 Jul 2014 19:34:46 +0200
+
 dovecot-antispam (2.0+20130822-2) unstable; urgency=low
 
   * More updates for dovecot 2.2.  Thanks again to Micah for really testing
diff --git a/debian/control b/debian/control
index 398f7df..03a6805 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: dovecot-antispam
 Section: mail
 Priority: optional
 Maintainer: Ron Lee <r...@debian.org>
-Build-Depends: debhelper (>= 5), dovecot-dev
+Build-Depends: debhelper (>= 5), dovecot-dev (>= 1:2.2.13-4)
 Standards-Version: 3.9.4.0
 Homepage: http://johannes.sipsolutions.net/Projects/dovecot-antispam
 Vcs-Git: git://git.debian.org/users/ron/dovecot-antispam.git
@@ -10,8 +10,7 @@ Vcs-Browser: http://git.debian.org/?p=users/ron/dovecot-antispam.git;a=summary
 
 Package: dovecot-antispam
 Architecture: any
-Depends: ${shlibs:Depends}, dovecot-imapd (>= ${dovecot:Version}),
-                            dovecot-imapd (<< ${dovecot:Version}.)
+Depends: ${shlibs:Depends}, dovecot-imapd, dovecot-abi-${dovecot:ABI-Version}
 Suggests: crm114 | dspam
 Description: Dovecot plugins for training spam filters
  dovecot-antispam watches designated spam folders and trains mail as spam or
diff --git a/debian/rules b/debian/rules
index d7ae8e5..865e4bc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -37,7 +37,7 @@ install-indep: build-indep
 
 binary: binary-arch
 
-binary-arch: DOVECOT_VERSION = $(shell V="$$(dpkg-query -W -f='$${Version}' dovecot-dev)"; echo "$${V%-*}" )
+binary-arch: DOVECOT_ABI_VERSION = $(shell cat /usr/share/dovecot/dovecot-abi)
 binary-arch: install-arch
 	dh_testdir
 	dh_testroot
@@ -48,7 +48,7 @@ binary-arch: install-arch
 	dh_fixperms
 	dh_installdeb
 	dh_shlibdeps
-	dh_gencontrol -- -V'dovecot:Version=$(DOVECOT_VERSION)'
+	dh_gencontrol -- -V'dovecot:ABI-Version=$(DOVECOT_ABI_VERSION)'
 	dh_md5sums
 	dh_builddeb
 

Reply via email to