[pkg-wine-party] [PATCH 10/11] wine64-bin: Use xmessage (with fallback to console) for multiarch instructions

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


---
 debian/control.in |    2 ++
 debian/wine64.sh  |   56 +++++++++++++++++++++++++++++++++++++----------------
 2 files changed, 41 insertions(+), 17 deletions(-)

diff --git a/debian/control.in b/debian/control.in
index b4bcdc8..1d65175 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -76,6 +76,8 @@ Description: Windows API implementation - binary loader
 
 Package: wine64-bin
 Architecture: any-amd64
+Depends: ${misc:Depends},
+ x11-utils,
 Conflicts:
  wine-bin,
 Description: Windows API implementation - binary loader
diff --git a/debian/wine64.sh b/debian/wine64.sh
index a214f96..95db67e 100755
--- a/debian/wine64.sh
+++ b/debian/wine64.sh
@@ -1,19 +1,41 @@
 #!/bin/sh
 
-echo "This is the wine64-bin helper package, which does not provide wine itself,"
-echo "but instead exists solely to provide the following information about"
-echo "enabling multiarch on your system in order to be able to install and run"
-echo "the 32-bit wine packages."
-echo ""
-echo "The following commands should be issued as root or via sudo in order to"
-echo "enable multiarch (the last command installs 32-bit wine):"
-echo ""
-echo "  # dpkg --add-architecture i386"
-echo "  # apt-get update"
-echo "  # apt-get install wine-bin:i386"
-echo ""
-echo "Be very careful as spaces matter above.  For kfreebsd systems, replace i386"
-echo "and amd64 with kfreebsd-i386 and kfreebsd-amd64.  Note that this package"
-echo "(wine64-bin) will be removed in the process.  For more information on the"
-echo "multiarch conversion, see:"
-echo "http://wiki.debian.org/Multiarch/HOWTO"
+XMESSAGE=/usr/bin/xmessage
+ARCH="`dpkg --print-architecture`"
+ARCH_I386="`echo $ARCH | sed s,amd64,i386,`"
+
+TITLE="Debian / Wine: Multiarch Instructions"
+
+I386_MSG=\
+"This is the wine64-bin helper package, which does not provide wine itself,
+but instead exists solely to provide the following information about
+enabling multiarch on your system in order to be able to install and run
+the 32-bit wine packages.
+
+The following commands should be issued as root or via sudo in order to
+enable multiarch (the last command installs 32-bit wine):
+
+  # dpkg --add-architecture ${ARCH_I386}
+  # apt-get update
+  # apt-get install wine-bin:${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"
+
+$XMESSAGE -center \
+    -buttons ok:0 -default ok \
+    -title "$TITLE" \
+    "$I386_MSG" 2>/dev/null
+notify=$?
+if [ $notify -eq 1 ] ; then
+    # xmessage was unable to notify the user, try tty instead
+    echo "** $TITLE **"
+    echo "" >&2
+    echo "$I386_MSG" >&2
+    echo "" >&2
+    echo -n "(okay) " >&2
+    read confirm
+fi
+
+exit 1
-- 
1.7.10.4




More information about the pkg-wine-party mailing list