[pkg-wine-party] [wine] 14/18: Add Debian alternatives system for wine.
Jens Reyer
jreyer-guest at moszumanska.debian.org
Thu Jul 28 22:43:35 UTC 2016
This is an automated email from the git hooks/post-receive script.
jreyer-guest pushed a commit to branch stretch
in repository wine.
commit c39abb6ec02a0dcd7e2b9be5a8a79c712379214f
Author: Jens Reyer <jre.winesim at gmail.com>
Date: Thu Jul 28 22:19:50 2016 +0200
Add Debian alternatives system for wine.
Master is wine (/usr/bin/wine).
Slaves in other packages are handled with file triggers.
Priority wine (stable): 70
Priority wine-development: 50
Closes in wine-development: #758291.
---
debian/changelog | 2 +-
debian/wineVERSION.postinst | 76 +++++++++++++++++++++++++++++++++++++++++++++
debian/wineVERSION.prerm | 13 ++++++++
debian/wineVERSION.triggers | 10 ++++++
4 files changed, 100 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 01f8a71..7c6583e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,7 +5,7 @@ wine (1.8.3-3) UNRELEASED; urgency=medium
#816020).
- Drop alternative depends on perl:any (now handled by debhelper).
Bump build-dep on debhelper version to >= 9.20160702.
- * Implement the Debian alternatives system.
+ * Implement the Debian alternatives system (see: #758291).
Partly cherrypicked from master:
- Replace VERSION (value is empty or '-development') with DEBSUFFIX
('-stable' or '-development') in user exposed files.
diff --git a/debian/wineVERSION.postinst b/debian/wineVERSION.postinst
new file mode 100644
index 0000000..36b5530
--- /dev/null
+++ b/debian/wineVERSION.postinst
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure)
+ dpkg-trigger wineVERSION
+ ;;
+ triggered)
+ # debian alternatives system
+ case DEBSUFFIX in
+ -stable)
+ PRIORITY=70;;
+ -development)
+ PRIORITY=50;;
+ *)
+ echo "DEBSUFFIX unknown"; exit 1;;
+ esac
+
+ apps="wineserver
+ msiexec
+ regedit
+ winecfg
+ winedbg
+ wineboot
+ winefile
+ winepath
+ regsvr32
+ wineconsole
+
+ wine64
+
+ wmc
+ wrc
+ widl
+ winecpp
+ winegcc
+ wineg++
+ winedump
+ winebuild
+ winemaker"
+
+ slaves=
+ for app in $apps; do
+ slaves="$slaves
+ --slave /usr/bin/$app $app
+ /usr/bin/${app}DEBSUFFIX
+ --slave /usr/share/man/man1/${app}.1.gz ${app}.1.gz
+ /usr/share/man/man1/${app}DEBSUFFIX.1.gz"
+ done
+
+ update-alternatives --quiet \
+ --install /usr/bin/wine wine /usr/bin/wineDEBSUFFIX $PRIORITY \
+ $slaves \
+ --slave /usr/share/man/man1/wine.1.gz wine.1.gz \
+ /usr/share/man/man1/wineDEBSUFFIX.1.gz \
+ --slave /usr/share/man/de/man1/wine.1.gz wine.de.1.gz \
+ /usr/share/man/de/man1/wineDEBSUFFIX.1.gz \
+ --slave /usr/share/man/fr/man1/wine.1.gz wine.fr.1.gz \
+ /usr/share/man/fr/man1/wineDEBSUFFIX.1.gz \
+ --slave /usr/share/man/pl/man1/wine.1.gz wine.pl.1.gz \
+ /usr/share/man/pl/man1/wineDEBSUFFIX.1.gz \
+ --slave /usr/share/man/de/man1/wineserver.1.gz wineserver.de.1.gz \
+ /usr/share/man/de/man1/wineserverDEBSUFFIX.1.gz \
+ --slave /usr/share/man/fr/man1/wineserver.1.gz wineserver.fr.1.gz \
+ /usr/share/man/fr/man1/wineserverDEBSUFFIX.1.gz \
+ --slave /usr/share/man/de/man1/winemaker.1.gz winemaker.de.1.gz \
+ /usr/share/man/de/man1/winemakerDEBSUFFIX.1.gz \
+ --slave /usr/share/man/fr/man1/winemaker.1.gz winemaker.fr.1.gz \
+ /usr/share/man/fr/man1/winemakerDEBSUFFIX.1.gz
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/wineVERSION.prerm b/debian/wineVERSION.prerm
new file mode 100644
index 0000000..5c68c07
--- /dev/null
+++ b/debian/wineVERSION.prerm
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ remove|deconfigure)
+ update-alternatives --remove wine /usr/bin/wineDEBSUFFIX
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/wineVERSION.triggers b/debian/wineVERSION.triggers
new file mode 100644
index 0000000..43dad79
--- /dev/null
+++ b/debian/wineVERSION.triggers
@@ -0,0 +1,10 @@
+# update the wine alternatives in "wineVERSION.postinst triggered"
+
+# explicit trigger
+interest wineVERSION
+
+# indicates package wine64 installation status changed
+interest /usr/bin/wine64DEBSUFFIX
+
+# indicates package wine{32|64}-tools installation status changed
+interest /usr/bin/winegccDEBSUFFIX
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wine/wine.git
More information about the pkg-wine-party
mailing list