r7613 - in packages/branches/game-package/support_quake3: debian supported
Jon Dowland
jmtd-guest at alioth.debian.org
Mon Jun 30 11:02:29 UTC 2008
Author: jmtd-guest
Date: 2008-06-30 11:02:29 +0000 (Mon, 30 Jun 2008)
New Revision: 7613
Modified:
packages/branches/game-package/support_quake3/debian/control
packages/branches/game-package/support_quake3/supported/quake3
Log:
handle fetching the point release
Modified: packages/branches/game-package/support_quake3/debian/control
===================================================================
--- packages/branches/game-package/support_quake3/debian/control 2008-06-30 10:43:42 UTC (rev 7612)
+++ packages/branches/game-package/support_quake3/debian/control 2008-06-30 11:02:29 UTC (rev 7613)
@@ -9,7 +9,7 @@
Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/game-package/?op=log
Package: game-package
-Depends: fakeroot, sudo, gdebi
+Depends: fakeroot, sudo, gdebi, wget
Conflicts: doom-package
Replaces: doom-package
Architecture: all
Modified: packages/branches/game-package/support_quake3/supported/quake3
===================================================================
--- packages/branches/game-package/support_quake3/supported/quake3 2008-06-30 10:43:42 UTC (rev 7612)
+++ packages/branches/game-package/support_quake3/supported/quake3 2008-06-30 11:02:29 UTC (rev 7613)
@@ -22,36 +22,65 @@
fi
}
+MIRRORFILE=/etc/quake3-mirrors
+POINTFILE=linuxq3apoint-1.32b-3.x86.run
+
fetch_point_release() {
- echo "fetch_point_release not implemented yet " >&2
- exit 1
+ if [ -f ./etc/quake3-mirrors ]; then
+ MIRRORFILE=./etc/quake3-mirrors
+ fi
+ # XXX: take the bottom mirror. In future, have some generic
+ # mirror-handling code in game-package, and pick a random one
+ # (or offer up a choice)
+ mirror=`tail -n1 "$MIRRORFILE"`
+
+ wget -O $WORKDIR/$POINTFILE $mirror/$POINTFILE
}
+find_pak0() {
+ # identify where pak0.pk3 is (underneath the CD-ROM mount-point)
+ # and set the relevant variable
+}
+
+check_sums() {
+ POINTMD5=c71fdddccb20e8fc393d846e9c61d685
+ SUM=`md5sum "$WORKDIR/$POINTFILE" | cut -d' ' -f1`
+ if [ "$SUM" != "$POINTMD5" ]; then
+ echo "error: $POINTFILE sum ($SUM) does not match expected sum" >&2
+ echo "($POINTMD5)" >&2
+ exit 1
+ else
+ echo "sum is good"
+ fi
+ # TODO: also check pak0.pk3
+ # TODO: roll a more advanced check_sums into the game-package-shared
+}
+
+unpack_point() {
+ mkdir "$WORKDIR/unpacked"
+ (
+ cd "$WORKDIR/unpacked"
+ dd if=$WORKDIR/$POINTFILE ibs=1 obs=1024 skip=8251 |
+ tar zx
+ )
+ # now interested in $WORKDIR/unpacked/baseq3/pak[1-8].pk3
+}
+
go() {
parse_args $*
if [ "$NOPOINT" = "true" ] ; then
fetch_point_release
fi
+ find_pak0
+ check_sums
+ exit 1
}
# stuff imported from quake3-data postinst, to be integrated
-POINTFILE=linuxq3apoint-1.32b-3.x86.run
-POINTMD5=c71fdddccb20e8fc393d846e9c61d685
Q3TGZ=quake3.tar.gz
BASEQ3=/usr/share/games/quake3/baseq3
# we need pak0.pk3 from the quake3 CD-ROM. It lives at
# ./Quake3/baseq3/pak0.pk3 on a regular q3 cd and
# ./baseq3/pak0.pk3 on a loki CD-ROM.
-
-# we need the point release.
- wget -O $STORAGE/$POINTFILE $MIRROR/$POINTFILE
-#
-
-# unpacking the point release:
-# dd if=$STORAGE/$POINTFILE of=$STORAGE/$Q3TGZ ibs=1 obs=1024 skip=8251 > /dev/null 2>&1
-# cp $STORAGE/quake3/baseq3/pak[1-8].pk3 ...
-
-# mirrors
-# ftp://ftp.idsoftware.com/idstuff/quake3/linux
More information about the Pkg-games-commits
mailing list