[pkg-wine-party] [PATCH 11/11] wine64-bin: Use alternatives system for helper script (closes: #679536)

Hilko Bengen bengen at debian.org
Sat Jul 7 19:49:12 UTC 2012


---
 debian/rules     |   16 ++++++++--------
 debian/wine64.sh |    9 +++++----
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/debian/rules b/debian/rules
index f033094..9e7b64c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -407,14 +407,14 @@ binary-arch: control-stamp
 	dh_installdirs -s
 
 	# install wine64.sh helper script
-	mkdir -p debian/wine64-bin/usr/bin
-	cp debian/wine64.sh debian/wine64-bin/usr/bin/wine
-	chmod +x debian/wine64-bin/usr/bin/wine
-
-	bash debian/doclink.sh libwine$(VERSUFFIX)
-
-	dh_installdocs -plibwine$(VERSUFFIX)
-	dh_installchangelogs -plibwine$(VERSUFFIX)
+	install -D -m755 debian/wine64.sh debian/wine64-bin$(VERSUFFIX)/usr/bin/wine32$(VERSUFFIX)
+	echo "update-alternatives --install /usr/bin/wine wine /usr/bin/wine32$(VERSUFFIX) $(ALTPRIO32)" \
+		>> debian/wine64-bin$(VERSUFFIX).postinst.debhelper
+	echo "update-alternatives --remove wine /usr/bin/wine32$(VERSUFFIX)"
+		>> debian/wine64-bin$(VERSUFFIX).prerm.debhelper
+	dh_install -pwine64-bin$(VERSUFFIX)
+	dh_installdocs -plibwine$(VERSUFFIX) -pwine64-bin$(VERSUFFIX)
+	dh_installchangelogs -plibwine$(VERSUFFIX) -pwine64-bin$(VERSUFFIX)
 
 	dh_compress -s
 	dh_fixperms -s
diff --git a/debian/wine64.sh b/debian/wine64.sh
index 95db67e..f2d6303 100755
--- a/debian/wine64.sh
+++ b/debian/wine64.sh
@@ -3,6 +3,7 @@
 XMESSAGE=/usr/bin/xmessage
 ARCH="`dpkg --print-architecture`"
 ARCH_I386="`echo $ARCH | sed s,amd64,i386,`"
+VERSUFFIX="`readlink -f $0 | xargs basename | sed s,^wine32,,`"
 
 TITLE="Debian / Wine: Multiarch Instructions"
 
@@ -17,11 +18,11 @@ enable multiarch (the last command installs 32-bit wine):
 
   # dpkg --add-architecture ${ARCH_I386}
   # apt-get update
-  # apt-get install wine-bin:${ARCH_I386}
+  # apt-get install wine-bin${VERSUFFIX}:${ARCH_I386}
 
-Be very careful as spaces matter above.  Note that this package
-(wine64-bin) will be removed in the process.  For more information on
-the multiarch conversion, see: http://wiki.debian.org/Multiarch/HOWTO"
+Note that this package (wine64-bin${VERSUFFIX}) will be removed in the
+process.  For more information on the multiarch conversion, see:
+http://wiki.debian.org/Multiarch/HOWTO"
 
 $XMESSAGE -center \
     -buttons ok:0 -default ok \
-- 
1.7.10.4




More information about the pkg-wine-party mailing list