From 039086e505aff4aa7ca8617edcecdccf4b7feef7 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 28 Sep 2018 23:55:34 +0200 Subject: [PATCH] TT#44917 Ship certain modules only on Debian/stretch The prosody version in Debian/buster already provides module, we're trying to ship here. Therefore failing to install e.g. with: | trying to overwrite '/usr/lib/prosody/modules/mod_mam/fallback_archive.lib.lua', which is also in package prosody 0.10.2-1 Install the conflicting modules only on Debian 9, AKA stretch. Change-Id: I4535b8c2963f40d5b2093922e6050404855b5004 --- debian/control | 1 + debian/rules | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/debian/control b/debian/control index 2ae626a..377dbe4 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ Homepage: https://www.sipwise.com/ Standards-Version: 3.9.8 Build-Depends: debhelper (>= 10~), + lsb-release, quilt, Package: ngcp-prosody-modules diff --git a/debian/rules b/debian/rules index 9ffdfea..afea1ef 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,17 @@ override_dh_auto_configure: override_dh_install: dh_install find debian/ngcp-prosody-modules/ -name README.\* -delete + # conflicts with prosody >=0.10.2-1 in Debian/buster + if lsb_release -rs | grep -q '^9' ; then \ + echo "Keeping all modules for Debian stretch"; \ + else \ + echo "Removing conflicting modules (shipped by prosody in Debian)"; \ + find debian/ngcp-prosody-modules/ -name fallback_archive.lib.lua -delete; \ + find debian/ngcp-prosody-modules/ -name mamprefs.lib.lua -delete; \ + find debian/ngcp-prosody-modules/ -name mamprefsxml.lib.lua -delete; \ + find debian/ngcp-prosody-modules/ -name mod_mam.lua -delete; \ + find debian/ngcp-prosody-modules/ -name mod_websocket.lua -delete; \ + fi override_dh_auto_clean: rm -f debian/README_mod_*.*