This is an automated email from the git hooks/post-receive script. smcv pushed a commit to branch quake in repository game-data-packager.
commit 6012d503c37de08e51980ae8c4271fb86c542009 Author: Simon McVittie <s...@debian.org> Date: Thu Nov 11 01:14:21 2010 +0000 Allow game-data-packager to satisfy the quake3-data dependency --- Makefile | 6 +++++- debian/changelog | 11 ++++++++++ debian/control | 15 +++++++------ debian/quake3-server.install | 1 + debian/quake3.install | 2 ++ need-data.sh | 51 ++++++++++++++++++++++++++++++++++++++++++++ need-data.txt | 21 ++++++++++++++++++ quake3.in | 17 ++++++++++++++- 8 files changed, 116 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index f930a84..3656a7b 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ ALL = \ build/quake3-server \ build/quake3.png \ build/quake3.xpm \ - build/quake332.xpm + build/quake332.xpm \ + build/quake3-server.README.Debian all: $(ALL) @@ -35,5 +36,8 @@ build/quake3.xpm: build/quake3.png build/quake332.xpm: build/quake3.png convert -resize 32x32 $< $@ +build/quake3-server.README.Debian: need-data.txt + install -m644 $< $@ + clean: rm -rf build diff --git a/debian/changelog b/debian/changelog index d86859f..76ba826 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +quake3 (1.1) UNRELEASED; urgency=low + + * Allow game-data-packager to satisfy the quake3-data dependency + * If quake3-data is missing from quake3, don't allow the game to run (the + engine doesn't cope well with it); instead, use zenity, kdialog, xmessage + or (as a last resort) terminal output to tell the user about + game-data-packager + * If quake3-data is missing from quake3-server, just output to the console + + -- Simon McVittie <s...@debian.org> Wed, 10 Nov 2010 21:35:01 +0000 + quake3 (1.0) experimental; urgency=low [ Jack Coulter ] diff --git a/debian/control b/debian/control index 40fc457..584ce41 100644 --- a/debian/control +++ b/debian/control @@ -12,24 +12,27 @@ Standards-Version: 3.9.1 Package: quake3 Architecture: all -Depends: ioquake3, quake3-data, ${misc:Depends} -Recommends: game-data-packager (>= 23) +Depends: ioquake3, + quake3-data | game-data-packager (>= 23), + ${misc:Depends} +Recommends: x11-utils | zenity | kdebase-bin Description: Quake III Arena menu entry and launcher scripts This package contains a launcher script and menu entry to play Quake III Arena with the ioQuake3 engine. . - Before installing this package you will need to create and install the + To make this package useful, you will need to create and install the non-distributable quake3-data package, by using the game-data-packager package. This requires pak0.pk3 from a Quake III installation or CD-ROM. Package: quake3-server Architecture: all -Depends: ioquake3-server, quake3-data, ${misc:Depends} -Recommends: game-data-packager (>= 23) +Depends: ioquake3-server, + quake3-data | game-data-packager (>= 23), + ${misc:Depends} Description: Quake III Arena dedicated server launcher scripts This package contains a launcher script to run a Quake III Arena dedicated server with the ioQuake3 engine. . - Before installing this package you will need to create and install the + To make this package useful, you will need to create and install the non-distributable quake3-data package, by using the game-data-packager package. This requires pak0.pk3 from a Quake III installation or CD-ROM. diff --git a/debian/quake3-server.install b/debian/quake3-server.install index 9b4b15e..18acb36 100644 --- a/debian/quake3-server.install +++ b/debian/quake3-server.install @@ -1 +1,2 @@ build/quake3-server usr/games +build/quake3-server.README.Debian usr/share/doc/quake3-server diff --git a/debian/quake3.install b/debian/quake3.install index cb18ad3..a2bba73 100644 --- a/debian/quake3.install +++ b/debian/quake3.install @@ -3,3 +3,5 @@ build/quake3.png usr/share/pixmaps build/quake3.xpm usr/share/pixmaps build/quake332.xpm usr/share/pixmaps build/quake3 usr/games +need-data.sh usr/share/games/quake3 +need-data.txt usr/share/games/quake3 diff --git a/need-data.sh b/need-data.sh new file mode 100755 index 0000000..7212150 --- /dev/null +++ b/need-data.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +TITLE="Quake III Arena" +TEXT="`cat "$1"`" + +# This is basically the code/sys/sys_unix.c implementation of Sys_Dialog, +# redone in shell. + +try_zenity () { + if command -v zenity >/dev/null; then + zenity --error --text="$TEXT" --title="$TITLE" + return 0 + else + return 1 + fi +} + +try_kdialog () { + if command -v kdialog >/dev/null; then + kdialog --error --text="$TEXT" --title="$TITLE" + return 0 + else + return 1 + fi +} + +try_xmessage () { + if command -v xmessage >/dev/null; then + xmessage -center -buttons OK "$TEXT" + return 0 + else + return 1 + fi +} + +case $(echo "$DESKTOP_SESSION" | tr A-Z a-z) in + (kde) + pref=try_kdialog + ;; + (gnome) + pref=try_zenity + ;; + (*) + pref=false + ;; +esac + +$pref || try_zenity || try_kdialog || try_xmessage + +printf "%s\n" "$TEXT" +exit 72 # EX_OSFILE diff --git a/need-data.txt b/need-data.txt new file mode 100644 index 0000000..d46709e --- /dev/null +++ b/need-data.txt @@ -0,0 +1,21 @@ +Use game-data-packager to build and install the quake3-data package. +You will need these two files: + +--------------- baseq3/pak0.pk3 + +From a Quake III Arena CD-ROM or installation + +size: 479493658 bytes +md5sum: 1197ca3df1e65f3c380f8abc10ca43bf +sha1sum: 9d588ea65e92944d3e23eeb6ec08f1dd666f4658 +sha256sum: 7ce8b3910620cd50a09e4f1100f426e8c6180f68895d589f80e6bd95af54bcae + +--------------- linuxq3apoint-1.32b-3.x86.run + +From any mirror of ftp.idsoftware.com, Gentoo or FreeBSD: for instance try +http://www.filewatcher.com/m/linuxq3apoint-1.32b-3.x86.run.30923961.0.0.html + +size: 30923961 bytes +md5sum: c71fdddccb20e8fc393d846e9c61d685 +sha1sum: 802d84af0d515db50a496c4c55d1f1c4f40a9239 +sha256sum: c36132c5556b35e01950f1e9c646235033a5130f87ad776ba2bc7becf4f4f186 diff --git a/quake3.in b/quake3.in index 13eea6f..a409d57 100644 --- a/quake3.in +++ b/quake3.in @@ -9,6 +9,7 @@ IOQ3BINARY=@IOQ3BINARY@ # q3a or openarena IOQ3DOTDIR=q3a +BASEPATH="/usr/share/games/quake3" ENGINE="/usr/lib/ioquake3/${IOQ3BINARY}" DEBUGGER="$QUAKE3_DEBUGGER" @@ -19,7 +20,7 @@ fi # the defaults mostly apply CVARS="+set com_standalone 0" -CVARS="$CVARS +set fs_basepath /usr/share/games/quake3" +CVARS="$CVARS +set fs_basepath $BASEPATH" QUIET=0 @@ -49,6 +50,20 @@ while [ "$1" != "" ]; do shift done +# sanity check: the engine doesn't cope well with missing data +for i in 0 1 2 3 4 5 6 7 8; do + if test -f $BASEPATH/baseq3/pak$i.pk3; then + : + else + if test "$IOQ3ROLE" = client; then + $BASEPATH/need-data.sh $BASEPATH/need-data.txt + else + echo "Quake III Arena data missing, see /usr/share/doc/quake3-server/README.Debian" + fi + exit 72 # EX_OSFILE + fi +done + if test "z$QUIET" = z1; then exec >/dev/null 2>&1; fi -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git _______________________________________________ Pkg-games-commits mailing list Pkg-games-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits