tags 456021 +patch
thanks

I've committed a patch to the Git repository that adds an ABI, also attached
here. This adds a Provides entry with the ABI to the control
field of dovecot-core, e.g. "Provides: dovecot-abi-2.2.13.abi.v2" that plugins
can depend on.

Cheers,

Jelmer
diff --git a/debian/changelog b/debian/changelog
index 2b4e57f..f941d0f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+dovecot (1:2.2.13-4) UNRELEASED; urgency=medium
+
+  * Add Provides with dovecot ABI version, for plugins to depend on. Closes: #456021
+
+ -- Jelmer Vernooij <jel...@debian.org>  Sun, 20 Jul 2014 19:31:09 +0200
+
 dovecot (1:2.2.13-3) unstable; urgency=medium
 
   * Build-depend on clucene 2.3 or later, which upstream lists as the
diff --git a/debian/control b/debian/control
index df9c0e7..470c519 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,7 @@ Package: dovecot-core
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, libpam-runtime (>= 0.76-13.1), openssl, adduser, ucf (>= 2.0020)
 Suggests: ntp, dovecot-gssapi, dovecot-sieve, dovecot-pgsql, dovecot-mysql, dovecot-sqlite, dovecot-ldap, dovecot-imapd, dovecot-pop3d, dovecot-lmtpd, dovecot-managesieved, dovecot-solr, dovecot-lucene
-Provides: dovecot-common
+Provides: dovecot-common, dovecot-abi-${dovecot:ABI-Version}
 Replaces: dovecot-common (<< 1:2.0.14-2~), mailavenger (<< 0.8.1-4)
 Breaks: dovecot-common (<< 1:2.0.14-2~), mailavenger (<< 0.8.1-4)
 Description: secure POP3/IMAP server - core files
diff --git a/debian/rules b/debian/rules
index fe652f0..759db76 100755
--- a/debian/rules
+++ b/debian/rules
@@ -180,8 +180,7 @@ install: build
 	mv $(CURDIR)/debian/dovecot-core/usr/include/* $(CURDIR)/debian/dovecot-dev/usr/include
 	mv $(CURDIR)/debian/dovecot-core/usr/lib/dovecot/dovecot-config $(CURDIR)/debian/dovecot-dev/usr/lib/dovecot
 	rmdir $(CURDIR)/debian/dovecot-core/usr/include
-	grep ABI_VERSION config.h | perl -ne '/"(.+)\(.+\)"/ && print $1' >> \
-	debian/dovecot-dev/usr/share/dovecot/dovecot-abi
+	grep ABI_VERSION config.h | perl -ne '/"(.+)\(.+\)"/ && print $$1' | tr '[A-Z]' '[a-z]' > $(CURDIR)/debian/dovecot-dev/usr/share/dovecot/dovecot-abi
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -228,7 +227,7 @@ binary-arch: build install
 	dh_makeshlibs -a -n
 	dh_installdeb -a
 	dh_shlibdeps -a
-	dh_gencontrol -a
+	dh_gencontrol -a -- -Vdovecot:ABI-Version=$(shell cat $(CURDIR)/debian/dovecot-dev/usr/share/dovecot/dovecot-abi)
 	dh_md5sums -a
 	dh_builddeb $(foreach pkg,$(dbgpkg),-p$(pkg)) -- -Zxz
 	dh_builddeb $(foreach pkg,$(otherpkg),-p$(pkg))

Reply via email to