r7751 - in packages/trunk/game-data-packager: . debian lib supported
Jon Dowland
jmtd-guest at alioth.debian.org
Wed Jul 16 18:13:07 UTC 2008
Author: jmtd-guest
Date: 2008-07-16 18:13:06 +0000 (Wed, 16 Jul 2008)
New Revision: 7751
Added:
packages/trunk/game-data-packager/debian/game-package.install
packages/trunk/game-data-packager/lib/doom-common
Modified:
packages/trunk/game-data-packager/
packages/trunk/game-data-packager/debian/game-data-packager.install
packages/trunk/game-data-packager/game-data-packager
packages/trunk/game-data-packager/lib/game-data-packager-shared
packages/trunk/game-data-packager/supported/doom
packages/trunk/game-data-packager/supported/doom2
Log:
merge common-doom branch work so far
Property changes on: packages/trunk/game-data-packager
___________________________________________________________________
Name: svn:mergeinfo
-
Modified: packages/trunk/game-data-packager/debian/game-data-packager.install
===================================================================
--- packages/trunk/game-data-packager/debian/game-data-packager.install 2008-07-16 17:04:00 UTC (rev 7750)
+++ packages/trunk/game-data-packager/debian/game-data-packager.install 2008-07-16 18:13:06 UTC (rev 7751)
@@ -1,7 +1,8 @@
lib/game-data-packager-shared usr/lib/game-data-packager
+lib/doom-common usr/lib/game-data-packager
game-data-packager usr/games
-supported/doom2 usr/share/games/game-data-packager/supported
-supported/doom usr/share/games/game-data-packager/supported
+supported/doom2 usr/share/games/game-data-packager/supported
+supported/doom usr/share/games/game-data-packager/supported
etc/game-data-packager.conf etc
-doom-wad_*_all.deb usr/share/games/game-data-packager
-doom2-wad_*_all.deb usr/share/games/game-data-packager
+doom-wad_*_all.deb usr/share/games/game-data-packager
+doom2-wad_*_all.deb usr/share/games/game-data-packager
Copied: packages/trunk/game-data-packager/debian/game-package.install (from rev 7707, packages/trunk/game-package/debian/game-package.install)
===================================================================
--- packages/trunk/game-data-packager/debian/game-package.install (rev 0)
+++ packages/trunk/game-data-packager/debian/game-package.install 2008-07-16 18:13:06 UTC (rev 7751)
@@ -0,0 +1,7 @@
+lib/game-package-shared usr/lib/game-package
+game-package usr/games
+supported/doom2 usr/share/games/game-package/supported
+supported/doom usr/share/games/game-package/supported
+etc/game-package.conf etc
+doom-wad_*_all.deb usr/share/games/game-package
+doom2-wad_*_all.deb usr/share/games/game-package
Modified: packages/trunk/game-data-packager/game-data-packager
===================================================================
--- packages/trunk/game-data-packager/game-data-packager 2008-07-16 17:04:00 UTC (rev 7750)
+++ packages/trunk/game-data-packager/game-data-packager 2008-07-16 18:13:06 UTC (rev 7751)
@@ -67,6 +67,8 @@
debug "PRESERVE=$PRESERVE"
GAME="$1"
+shift
+
if [ ! -f "$SUPPORTED/$GAME" ]; then
echo "unknown option or game '$GAME'" >&2
supported >&2
@@ -81,7 +83,7 @@
WORKDIR=`mktemp -t -d game-data-packager.XXXXXX`
debug "WORKDIR=$WORKDIR"
cleanup() {
- if [ "$PRESERVE" != "yes" ]; then
+ if [ "$PRESERVE" != "yes" ] && [ -f "$OUTFILE" ]; then
rm "$OUTFILE"
fi
if [ -d "$WORKDIR" ]; then
@@ -91,7 +93,6 @@
trap cleanup EXIT
# now the game's handler needs to be executed
-shift
go "$@"
if [ "$PRESERVE" = "yes" ]; then
Copied: packages/trunk/game-data-packager/lib/doom-common (from rev 7750, packages/branches/game-data-packager/consolidate-doom/lib/doom-common)
===================================================================
--- packages/trunk/game-data-packager/lib/doom-common (rev 0)
+++ packages/trunk/game-data-packager/lib/doom-common 2008-07-16 18:13:06 UTC (rev 7751)
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+DEBBASE="${SHORTNAME}-wad_${GAME_PACKAGE_VERSION}_all.deb"
+
+doom_usage() {
+ echo "${SHORTNAME} arguments:" >&2
+ printf "\twadfile - path to a ${SHORTNAME}.wad\n"
+}
+
+verify_args() {
+ if [ $# -ne 1 ]; then
+ echo "error: no wadfile specified" >&2
+ usage >&2
+ doom_usage >&2
+ exit 1
+ fi
+}
+checksum() {
+ CHECKSUM=`md5sum "$1" | cut -d' ' -f1`
+ debug "checksum = $CHECKSUM"
+}
+
+check_for_v19() {
+ case "$CHECKSUM" in
+ "c4fe9fd920207691a9f493668e0a2083")
+ debug "doom.wad is a v1.9 IWAD (ultimate doom)"
+ ;;
+ "1cd63c5ddff1bf8ce844237f580e9cf3")
+ debug "doom.wad is a v1.9 IWAD (registered)"
+ ;;
+ *)
+ warn "the doom.wad file is not version 1.9"
+ warn "(or has been modified)"
+ warn "you may have some problems with PWADs and demos"
+ ;;
+ esac
+
+}
+
+DATADIR="/usr/share/games/game-data-packager"
+
+if [ -f "$PWD/$DEBBASE" ]; then
+ DEB="$PWD/$DEBBASE"
+else
+ DEB="$DATADIR/$DEBBASE"
+fi
+
+go() {
+ verify_args "$@"
+ WADFILE=`unravel "$1"`
+ [ -f "$WADFILE" ] || die "ERROR: '$WADFILE' does not exist."
+ checksum "$WADFILE"
+ debug "WADFILE=$WADFILE"
+ check_for_v19
+
+ DEST=`echo $DATADIR | sed 's,^/,,'`/$SHORTNAME.wad
+
+ if [ "" = "$OUTDIR" ]; then
+ OUTFILE="$WORKDIR/out.deb"
+ else
+ OUTFILE=`unravel "$OUTDIR"`"/$DEBBASE"
+ fi
+ cp -p "$DEB" "$OUTFILE"
+ slipstream "$OUTFILE" "$DEST" "$WADFILE"
+}
Modified: packages/trunk/game-data-packager/lib/game-data-packager-shared
===================================================================
--- packages/trunk/game-data-packager/lib/game-data-packager-shared 2008-07-16 17:04:00 UTC (rev 7750)
+++ packages/trunk/game-data-packager/lib/game-data-packager-shared 2008-07-16 18:13:06 UTC (rev 7751)
@@ -151,7 +151,7 @@
mv DEBIAN slipstream.unpacked
# XXX: capture the output of dpkg-deb and hide it
fakeroot dpkg-deb -b slipstream.unpacked "$DEB" | ( \
- grep -v "^dpkg-deb: building package \`doom-wad' in \`$DEB'."\
+ grep -v "^dpkg-deb: building package \`[a-z-]\+' in \`$DEB'."\
|| true)
}
Modified: packages/trunk/game-data-packager/supported/doom
===================================================================
--- packages/trunk/game-data-packager/supported/doom 2008-07-16 17:04:00 UTC (rev 7750)
+++ packages/trunk/game-data-packager/supported/doom 2008-07-16 18:13:06 UTC (rev 7751)
@@ -1,28 +1,8 @@
-# vim: set ft=sh:
+#!/bin/sh
SHORTNAME=doom
LONGNAME="Doom (including Ultimate Doom)"
-DEBBASE="doom-wad_${GAME_PACKAGE_VERSION}_all.deb"
-
-doom2_usage() {
- echo "doom game arguments:" >&2
- printf "\twadfile - path to a doom.wad\n"
-}
-
-verify_args() {
- if [ $# -ne 1 ]; then
- echo "error: no wadfile specified" >&2
- usage >&2
- doom2_usage >&2
- exit 1
- fi
-}
-checksum() {
- CHECKSUM=`md5sum "$1" | cut -d' ' -f1`
- debug "checksum = $CHECKSUM"
-}
-
check_for_v19() {
case "$CHECKSUM" in
"c4fe9fd920207691a9f493668e0a2083")
@@ -40,29 +20,8 @@
}
-DATADIR="/usr/share/games/game-data-packager"
-
-if [ -f "$PWD/$DEBBASE" ]; then
- DEB="$PWD/$DEBBASE"
+if [ -f ./lib/game-data-packager-shared ]; then
+ . ./lib/doom-common
else
- DEB="$DATADIR/$DEBBASE"
+ . /usr/lib/game-data-packager/doom-common
fi
-
-go() {
- verify_args "$@"
- WADFILE=`unravel "$1"`
- [ -f "$WADFILE" ] || die "ERROR: '$WADFILE' does not exist."
- checksum "$WADFILE"
- debug "WADFILE=$WADFILE"
- check_for_v19
-
- DEST=`echo $DATADIR | sed 's,^/,,'`/doom.wad
-
- if [ "" = "$OUTDIR" ]; then
- OUTFILE="$WORKDIR/out.deb"
- else
- OUTFILE=`unravel "$OUTDIR"`"/$DEBBASE"
- fi
- cp -p "$DEB" "$OUTFILE"
- slipstream "$OUTFILE" "$DEST" "$WADFILE"
-}
Modified: packages/trunk/game-data-packager/supported/doom2
===================================================================
--- packages/trunk/game-data-packager/supported/doom2 2008-07-16 17:04:00 UTC (rev 7750)
+++ packages/trunk/game-data-packager/supported/doom2 2008-07-16 18:13:06 UTC (rev 7751)
@@ -1,28 +1,8 @@
-# vim: set ft=sh:
+#!/bin/sh
SHORTNAME=doom2
LONGNAME="Doom 2"
-DEBBASE="doom2-wad_${GAME_PACKAGE_VERSION}_all.deb"
-
-doom2_usage() {
- echo "doom2 game arguments:" >&2
- printf "\twadfile - path to a doom2.wad\n"
-}
-
-verify_args() {
- if [ $# -ne 1 ]; then
- echo "error: no wadfile specified" >&2
- usage >&2
- doom2_usage >&2
- exit 1
- fi
-}
-checksum() {
- CHECKSUM=`md5sum "$1" | cut -d' ' -f1`
- debug "checksum = $CHECKSUM"
-}
-
check_for_v19() {
case "$CHECKSUM" in
"25e1459ca71d321525f84628f45ca8cd")
@@ -36,30 +16,8 @@
}
-DATADIR="/usr/share/games/game-data-packager"
-
-# XXX: is PWD a bashism?
-if [ -f "$PWD/$DEBBASE" ]; then
- DEB="$PWD/$DEBBASE"
+if [ -f ./lib/game-data-packager-shared ]; then
+ . ./lib/doom-common
else
- DEB="$DATADIR/$DEBBASE"
+ . /usr/lib/game-data-packager/doom-common
fi
-
-go() {
- verify_args "$@"
- WADFILE=`unravel "$1"`
- [ -f "$WADFILE" ] || die "ERROR: '$WADFILE' does not exist."
- checksum "$WADFILE"
- debug "WADFILE=$WADFILE"
- check_for_v19
-
- DEST=`echo $DATADIR | sed 's,^/,,'`/doom2.wad
-
- if [ "" = "$OUTDIR" ]; then
- OUTFILE="$WORKDIR/out.deb"
- else
- OUTFILE=`unravel "$OUTDIR"`"/$DEBBASE"
- fi
- cp -p "$DEB" "$OUTFILE"
- slipstream "$OUTFILE" "$DEST" "$WADFILE"
-}
More information about the Pkg-games-commits
mailing list