Control: tags 811445 + patch

On Mon 2016-01-18 23:55:42 +0100, Florian Schlichting wrote:
> I suggest irssi Provides: a virtual package called something like
> irssiabi-$(IRSSI_ABI_VERSION), for which irssi-plugin-xmpp and
> irsi-plugin-otr can then add strict dependencies.  The
> IRSSI_ABI_VERSION would have to be injected automatically at
> build-time.

I think this is a good idea.

The attached patch is now posted as
https://salsa.debian.org/rhonda/irssi/merge_requests/1

Thanks for maintaining irssi in debian!

        --dkg

From cf976a2543efcd86ebded7ed614e15bd138c7013 Mon Sep 17 00:00:00 2001
From: Daniel Kahn Gillmor <d...@fifthhorseman.net>
Date: Thu, 20 Sep 2018 01:31:58 -0400
Subject: [PATCH] irssi Provides: irssi-abi-XXX for safer plugin packaging
 (Closes: #811445)

Inspired by
https://xorg-team.pages.debian.net/xorg/reference/dependencies.html,
Florian Schlichting <f...@debian.org> proposed something like this
patch to the irssi packaging.  This should make it easier to
automatically craft narrower dependencies on the debian packaging for
irssi plugins.

Signed-off-by: Daniel Kahn Gillmor <d...@fifthhorseman.net>
---
 debian/control | 1 +
 debian/rules   | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/debian/control b/debian/control
index 00781f8..30c740d 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Vcs-Git: https://salsa.debian.org/rhonda/irssi.git
 Package: irssi
 Architecture: any
 Depends: ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends}, perl-base(>= 5.8.1)
+Provides: ${irssi:ABI}
 Suggests: irssi-scripts
 Description: terminal based IRC client
  Irssi is a terminal based IRC client for UNIX systems. It also supports
diff --git a/debian/rules b/debian/rules
index d6a2c21..bef895f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,3 +17,8 @@ override_dh_install:
 
 override_dh_strip:
 	dh_strip --dbgsym-migration='irssi-dbg (<< 0.8.19-2~)'
+
+ABI = $(shell grep IRSSI_ABI_VERSION src/common.h | cut -d' ' -f3 )
+
+override_dh_gencontrol:
+	dh_gencontrol -- -Virssi:ABI="irssi-abi-$(ABI)"
-- 
2.18.0

Attachment: signature.asc
Description: PGP signature

Reply via email to