r6305 - in packages/trunk/game-package: . lib supported

Jon Dowland jmtd-guest at alioth.debian.org
Tue Mar 25 20:07:24 UTC 2008


Author: jmtd-guest
Date: 2008-03-25 20:07:24 +0000 (Tue, 25 Mar 2008)
New Revision: 6305

Modified:
   packages/trunk/game-package/game-package
   packages/trunk/game-package/lib/game-package-shared
   packages/trunk/game-package/supported/doom
Log:
have a global workdir

Modified: packages/trunk/game-package/game-package
===================================================================
--- packages/trunk/game-package/game-package	2008-03-25 19:58:05 UTC (rev 6304)
+++ packages/trunk/game-package/game-package	2008-03-25 20:07:24 UTC (rev 6305)
@@ -103,6 +103,10 @@
 debug "short: $SHORTNAME"
 debug "long: $LONGNAME"
 
+# setup a working directory
+WORKDIR=`mktemp -t -d game-package.XXXXXX`
+debug "WORKDIR=$WORKDIR"
+
 # now the game's handler needs to be executed
 shift
 go $*
@@ -117,4 +121,4 @@
 if [ "$PRESERVE" != "yes" ]; then
 	rm "$OUTFILE"
 fi
-# TODO: we're leaving working directories lying around
+rmdir "$WORKDIR"

Modified: packages/trunk/game-package/lib/game-package-shared
===================================================================
--- packages/trunk/game-package/lib/game-package-shared	2008-03-25 19:58:05 UTC (rev 6304)
+++ packages/trunk/game-package/lib/game-package-shared	2008-03-25 20:07:24 UTC (rev 6305)
@@ -41,8 +41,6 @@
 	RELPATH="$2" # relative path in the unpacked .deb
 	shift 2
 
-	WORKDIR=`mktemp -td game-package-shared.slipstream.XXXXXX`
-	debug "slipstream WORKDIR=$WORKDIR"
 	OLDWD=`pwd`
 	cd "$WORKDIR"
 
@@ -59,7 +57,6 @@
 	slipstream_cleanup
 
 	cd "$OLDWD"
-	# rmdir $WORKDIR
 }
 
 slipstream_permcheck() {
@@ -79,7 +76,7 @@
 slipstream_unpack() {
 	DEB="$1"
 	dpkg-deb -e "$DEB" "./DEBIAN"
-	dpkg-deb -x "$DEB" "./foo"
+	dpkg-deb -x "$DEB" "./slipstream.unpacked"
 }
 
 slipstream_file() {
@@ -87,18 +84,18 @@
 	RELPATH="$2"
 	BN=`basename "$FILE"`
 
-	cp -p "$FILE" "./foo/$RELPATH/$BN"
-	chmod 644 "./foo/$RELPATH/$BN"
+	cp -p "$FILE" "./slipstream.unpacked/$RELPATH/$BN"
+	chmod 644 "./slipstream.unpacked/$RELPATH/$BN"
 
 	# add a line to md5sums
-	cd foo
+	cd slipstream.unpacked
 	md5sum "$RELPATH/$BN" >> "../DEBIAN/md5sums"
 	cd ..
 }
 
 slipstream_instsize() {
 	# figure out the new installed-size
-	INSTSIZE=`du -sk ./foo | cut -f1`
+	INSTSIZE=`du -sk ./slipstream.unpacked | cut -f1`
 	sed -i  "s/^Installed-Size.*/Installed-Size: $INSTSIZE/" \
 		"./DEBIAN/control"
 }
@@ -107,14 +104,13 @@
 	DEB="$1"     # the .deb file we are going to mangle
 
 	# repack
-	mv DEBIAN foo
+	mv DEBIAN slipstream.unpacked
 	# XXX: capture the output of dpkg-deb and hide it
-	fakeroot dpkg-deb -b foo "$DEB"
+	fakeroot dpkg-deb -b slipstream.unpacked "$DEB"
 }
 
 slipstream_cleanup() {
-	rm -rf ./foo
-	rmdir $PWD
+	rm -rf ./slipstream.unpacked
 }
 
 # stuff relating to installing the generated packages ########################

Modified: packages/trunk/game-package/supported/doom
===================================================================
--- packages/trunk/game-package/supported/doom	2008-03-25 19:58:05 UTC (rev 6304)
+++ packages/trunk/game-package/supported/doom	2008-03-25 20:07:24 UTC (rev 6305)
@@ -57,7 +57,7 @@
 	DEST=`echo $DATADIR | sed 's,^/,,'`
 
 	if [ "" = "$OUTDIR" ]; then
-		OUTFILE=`mktemp -t game-package.doom.XXXXXX`
+		OUTFILE="$WORKDIR/out.deb"
 	else
 		OUTFILE=`unravel "$OUTDIR"`"/$DEBBASE"
 	fi




More information about the Pkg-games-commits mailing list