[pkg-wine-party] [SCM] Debian Wine packaging branch, master, updated. wine-1.1.34-1-637-gb7d039d
Ove Kåven
ovek at arcticnet.no
Mon Aug 22 00:34:50 UTC 2011
The following commit has been merged in the master branch:
commit 63286cbdcaea5d20c78f4bab59968dc182f8eba2
Author: Ove Kåven <ovek at arcticnet.no>
Date: Mon Aug 22 02:09:53 2011 +0200
Made the wine-bin package use the alternatives system for binaries in /usr/bin.
diff --git a/debian/gen-alternatives.sh b/debian/gen-alternatives.sh
new file mode 100644
index 0000000..c7c2dd3
--- /dev/null
+++ b/debian/gen-alternatives.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+VSUFFIX="$1"
+ARCH="$2"
+PRIORITY="$3"
+SUFFIX="$ARCH$VSUFFIX"
+
+function generate_postinst
+{
+ echo "update-alternatives \\"
+ echo -n " --install /usr/bin/wine wine /usr/bin/wine$SUFFIX $PRIORITY"
+ for bin in $(cat debian/wine-bin.install-alternatives); do
+ dname=$(echo $bin|sed -n 's,debian/tmp/\(.*\),/\1,p')
+ sname=$(echo $dname|sed -n "s,\(.*/[^./]*\)\(\.[0-9]+\)\?,\1$SUFFIX\2,p")
+ mv debian/tmp/$dname debian/tmp/$sname
+
+ case "$dname" in
+ /usr/share/man/*)
+ name=$(echo $dname|sed -n "s,/usr/share/man/\([^/]*\)/man[0-9]/\(.*\),\2.\1.gz,p;t;s,/usr/share/man/man[0-9]/\(.*\),\1.gz,p")
+ dname="$dname.gz"
+ sname="$sname.gz"
+ ;;
+ *)
+ name=$(basename $dname)
+ ;;
+ esac
+ if [ "$name" != "wine" ]; then
+ echo " \\"
+ echo -n " --slave $dname $name $sname"
+ fi
+ done
+ echo
+ echo
+}
+
+function generate_prerm
+{
+ echo 'if [ "$1" != "upgrade" ]; then'
+ echo " update-alternatives --remove wine /usr/bin/wine$SUFFIX"
+ echo 'fi'
+ echo
+}
+
+generate_postinst >> debian/wine-bin$VSUFFIX.postinst.debhelper
+generate_prerm >> debian/wine-bin$VSUFFIX.prerm.debhelper
+
+# return success
+true
diff --git a/debian/prep-install.sh b/debian/prep-install.sh
index 06d37ec..599d600 100644
--- a/debian/prep-install.sh
+++ b/debian/prep-install.sh
@@ -36,12 +36,12 @@ function expand_platform
return
fi
for bin in $(replace_paths_full $1 < debian/$package.${ext}-platform); do
- [ ! -f $bin ] || echo $bin >> debian/$package$SUFFIX.${ext}
+ [ ! -f "$bin" ] || echo "$bin" >> debian/$package$SUFFIX.${ext}
done
shift
while [ -n "$1" ]; do
for bin in $(replace_paths_partial $1 < debian/$package.${ext}-platform); do
- [ ! -f $bin ] || echo $bin >> debian/$package$SUFFIX.${ext}
+ [ ! -f "$bin" ] || echo "$bin" >> debian/$package$SUFFIX.${ext}
done
shift
done
@@ -55,13 +55,27 @@ function expand_modules
while [ -n "$1" ]; do
for mod in $(cat debian/$package.${ext}-modules); do
for bin in debian/tmp/$1/wine$SUFFIX/$mod.so debian/tmp/$1/wine$SUFFIX/$mod debian/tmp/$1/wine$SUFFIX/fakedlls/$mod; do
- [ ! -f $bin ] || echo $bin >> debian/$package$SUFFIX.${ext}
+ [ ! -f "$bin" ] || echo "$bin" >> debian/$package$SUFFIX.${ext}
done
done
shift
done
}
+function expand_alternatives
+{
+ if [ ! -f debian/$package.${ext}-alternatives ]; then
+ return
+ fi
+ for bin in $(cat debian/$package.${ext}-alternatives); do
+ bin32=$(echo "$bin"|sed -n "s,\(.*/[^./]*\)\(\.[0-9]+\)\?,\132$SUFFIX\2,p")
+ bin64=$(echo "$bin"|sed -n "s,\(.*/[^./]*\)\(\.[0-9]+\)\?,\164$SUFFIX\2,p")
+ for tbin in $bin32 $bin64; do
+ [ ! -f "$tbin" ] || echo "$tbin" >> debian/$package$SUFFIX.${ext}
+ done
+ done
+}
+
for ext in install links mime config preinst postinst prerm postrm docs manpages lintian-overrides bugcontrol; do
for inst in debian/*.${ext}-common; do
if [ -f "$inst" ]; then
@@ -69,6 +83,7 @@ for ext in install links mime config preinst postinst prerm postrm docs manpages
expand_common $LIBDIRS
expand_platform $LIBDIRS
expand_modules $LIBDIRS
+ expand_alternatives
fi
done
done
diff --git a/debian/rules b/debian/rules
index 539d010..e479c19 100755
--- a/debian/rules
+++ b/debian/rules
@@ -119,6 +119,16 @@ space:=$(empty) $(empty)
SHLIBS_OPTS = -Llibwine$(VERSUFFIX) -l$(subst $(space),:,$(patsubst %,$(CURDIR)/debian/libwine$(VERSUFFIX)/%,$(LIBDIRS)))
+ifeq (,$(VERSUFFIX))
+# Stable builds get priority 100 (plus 25 for 64-bit)
+ALTPRIO32 := 100
+ALTPRIO64 := 125
+else
+# Unstable builds get priority 50 (plus 25 for 64-bit)
+ALTPRIO32 := 50
+ALTPRIO64 := 75
+endif
+
control-stamp: debian/control.in
ifneq (,$(BUILDS))
bash debian/prep-control.sh "$(VERSUFFIX)"
@@ -274,6 +284,10 @@ install-arch32-stamp: build-arch32-stamp
install build32/tools/fnt2bdf debian/tmp/usr/bin
rm -f debian/tmp/usr/bin/winelauncher
sed "s,usr/lib/wine,$(IA32_WINEDIR)," debian/winelauncher > debian/tmp/usr/bin/wine
+ # install tools
+ cp tools/font_convert.sh debian/tmp/usr/bin/wine-font-convert
+
+ bash debian/gen-alternatives.sh "$(VERSUFFIX)" 32 $(ALTPRIO32)
touch install-arch32-stamp
@@ -297,6 +311,10 @@ install-arch64-stamp: build-arch64-stamp $(patsubst build%,install-arch%-stamp,$
install build64/tools/fnt2bdf debian/tmp/usr/bin
rm -f debian/tmp/usr/bin/winelauncher
sed "s,usr/lib/wine,$(AMD64_WINEDIR)," debian/winelauncher > debian/tmp/usr/bin/wine
+ # install tools
+ cp tools/font_convert.sh debian/tmp/usr/bin/wine-font-convert
+
+ bash debian/gen-alternatives.sh "$(VERSUFFIX)" 64 $(ALTPRIO64)
touch install-arch64-stamp
@@ -313,8 +331,6 @@ install-arch-stamp: $(patsubst build%,install-arch%-stamp,$(BUILDS))
# other documentation
mkdir -p debian/tmp/usr/share/doc/wine
cp tools/winedump/README debian/tmp/usr/share/doc/wine/README.winedump
- # tools
- cp tools/font_convert.sh debian/tmp/usr/bin/wine-font-convert
touch install-arch-stamp
diff --git a/debian/wine-bin.install-common b/debian/wine-bin.install-alternatives
similarity index 67%
copy from debian/wine-bin.install-common
copy to debian/wine-bin.install-alternatives
index e0bf2c3..62ad428 100644
--- a/debian/wine-bin.install-common
+++ b/debian/wine-bin.install-alternatives
@@ -13,14 +13,7 @@ debian/tmp/usr/bin/winefile
debian/tmp/usr/bin/winemine
debian/tmp/usr/bin/winepath
debian/tmp/usr/bin/wineprefixcreate
-debian/tmp/usr/share/binfmts
debian/tmp/usr/share/man/man1/wine.1
debian/tmp/usr/share/man/man1/winedbg.1
debian/tmp/usr/share/man/man1/wineprefixcreate.1
debian/tmp/usr/share/man/*/man1/wine.1
-debian/tmp/usr/share/mime-info
-debian/tmp/usr/share/applications/wine.desktop
-debian/tmp/usr/share/wine/wine.inf
-debian/uninstaller.desktop usr/share/applications
-debian/winecfg.desktop usr/share/applications
-programs/winemenubuilder/wine*.xpm usr/share/pixmaps
diff --git a/debian/wine-bin.install-common b/debian/wine-bin.install-common
index e0bf2c3..431978e 100644
--- a/debian/wine-bin.install-common
+++ b/debian/wine-bin.install-common
@@ -1,23 +1,4 @@
-debian/tmp/usr/bin/fnt2bdf
-debian/tmp/usr/bin/msiexec
-debian/tmp/usr/bin/notepad
-debian/tmp/usr/bin/regedit
-debian/tmp/usr/bin/regsvr32
-debian/tmp/usr/bin/wine
-debian/tmp/usr/bin/wine-font-convert
-debian/tmp/usr/bin/wineboot
-debian/tmp/usr/bin/winecfg
-debian/tmp/usr/bin/winedbg
-debian/tmp/usr/bin/wineconsole
-debian/tmp/usr/bin/winefile
-debian/tmp/usr/bin/winemine
-debian/tmp/usr/bin/winepath
-debian/tmp/usr/bin/wineprefixcreate
debian/tmp/usr/share/binfmts
-debian/tmp/usr/share/man/man1/wine.1
-debian/tmp/usr/share/man/man1/winedbg.1
-debian/tmp/usr/share/man/man1/wineprefixcreate.1
-debian/tmp/usr/share/man/*/man1/wine.1
debian/tmp/usr/share/mime-info
debian/tmp/usr/share/applications/wine.desktop
debian/tmp/usr/share/wine/wine.inf
--
Debian Wine packaging
More information about the pkg-wine-party
mailing list