This patch (v2), applies to the sources obtained with
"apt-get source game-data-packager" on debian/testing; so currently v37.

Here is a new patch based on git.

> Hi - what does this apply to, please? I tried against git master but
> not that. I guess the last package release? I had a brief attempt at
> cherry-picking the patch (which applied cleanly on top of 36) to master
> but it doesn't go on cleanly. I'd be grateful if someone could provide
> a patch against git master but if not I'll work on cleanly applying it
> next time I have some cycles.
diff -Naur '--exclude=.git*' game-data-packager-git/lib/tyrian-mirrors game-data-packager-tyrian/lib/tyrian-mirrors
--- game-data-packager-git/lib/tyrian-mirrors	1970-01-01 01:00:00.000000000 +0100
+++ game-data-packager-tyrian/lib/tyrian-mirrors	2014-02-20 21:44:10.796639561 +0100
@@ -0,0 +1,2 @@
+http://www.camanis.net/tyrian/tyrian21.zip
+#http://localhost/tyrian21.zip
diff -Naur '--exclude=.git*' game-data-packager-git/Makefile game-data-packager-tyrian/Makefile
--- game-data-packager-git/Makefile	2014-02-19 09:17:54.872241073 +0100
+++ game-data-packager-tyrian/Makefile	2014-02-27 06:12:13.257729330 +0100
@@ -40,6 +40,7 @@
 	make -f rott.mk VERSION=$(VERSION)
 	make -f wolf3d.mk VERSION=$(VERSION)
 	make -f lgeneral.mk LONG="LGeneral" VERSION=$(VERSION)
+	make -f tyrian.mk VERSION=$(VERSION)
 
 $(DIRS):
 	mkdir -p $@
@@ -84,6 +85,7 @@
 	make -f rott.mk VERSION=$(VERSION) clean
 	make -f wolf3d.mk VERSION=$(VERSION) clean
 	make -f lgeneral.mk LONG="LGeneral" VERSION=$(VERSION) clean
+	make -f tyrian.mk VERSION=$(VERSION) clean
 	for d in $(DIRS); do [ ! -d "$$d" ]  || rmdir "$$d"; done
 
 check:
diff -Naur '--exclude=.git*' game-data-packager-git/supported/tyrian game-data-packager-tyrian/supported/tyrian
--- game-data-packager-git/supported/tyrian	1970-01-01 01:00:00.000000000 +0100
+++ game-data-packager-tyrian/supported/tyrian	2014-02-20 21:38:09.052624533 +0100
@@ -0,0 +1,127 @@
+SHORTNAME=tyrian
+LONGNAME="Tyrian"
+
+ZIPSUM=2a3b206a6de25ed4b771af073f8ca904
+
+tyrian_usage() {
+	echo "game-data-packager ${SHORTNAME} arguments:"
+	printf "\tgame-data-packager ${SHORTNAME} [ -f path ] | [ -w ]
+\t\t-f path\t\tpath to your existing copy of tyrian21.zip\n\
+\t\t-w\t\tfetch tyrian21.zip from the World Wide Web\n"
+}
+
+verify_args() {
+    case $# in
+        0)
+            tyrian_usage
+            exit 0
+            ;;
+        1)
+            if [ "$1" != "-w" ]; then
+                    usage >&2
+                    tyrian_usage >&2
+                    exit 1
+            fi
+            downloadzip
+            ;;
+        2)
+            if [ "$1" != "-f" ]; then
+                usage >&2
+                tyrian_usage >&2
+                exit 1
+            fi
+            downloaded=false
+            tyrianzip="$2"
+            ;;
+        *)
+            usage >&2
+            tyrian_usage >&2
+            exit 1
+            ;;
+    esac
+}
+
+tyrianmirrors=$LIBDIR/tyrian-mirrors
+
+downloadzip() {
+    dest="$WORKDIR/tyrian21.zip"
+    mirror=$(grep -v ^# "$tyrianmirrors" | sort -R | head -n1)
+    for try in $mirror; do
+        if wget --progress=dot --directory-prefix "$WORKDIR" -c "$try"
+        then
+            tyrianzip="$dest"
+            downloaded=true
+            return
+        fi
+    done
+    die "error: could not find tyrian21.zip at our chosen mirror"
+}
+
+checksum() {
+	CHECKSUM=`md5sum "$1" | cut -d' ' -f1`
+	debug "checksum = $CHECKSUM"
+}
+
+DEBBASE="tyrian-data_${GAME_PACKAGE_VERSION}_all.deb"
+DEB="$DATADIR/$DEBBASE"
+
+go() {
+	verify_args "$@"
+	ZIPFILE=`unravel "$tyrianzip"`
+    [ -e "$ZIPFILE" ] || die "ERROR: '$ZIPFILE' does not exist."
+    [ -f "$ZIPFILE" ] || die "ERROR: '$ZIPFILE' is not a file."
+    [ -r "$ZIPFILE" ] || die "ERROR: '$ZIPFILE' cannot be read."
+	checksum "$ZIPFILE"
+	if [ "$CHECKSUM" != "$ZIPSUM" ]; then
+		echo "warning: checksum is not what we expected" >&2
+	fi
+
+    OUTFILE=`unravel "$OUTDIR"`"/$DEBBASE"
+	cp -p "$DEB" "$OUTFILE"
+
+	oldpwd=`pwd`
+	cd "$WORKDIR"
+
+files='cubetxt1.dat cubetxt2.dat cubetxt3.dat cubetxt4.dat
+demo.1 demo.2 demo.3 demo.4 demo.5 
+estsc.shp exitmsg.bin file_id.diz helpme.doc
+levels1.dat levels2.dat levels3.dat levels4.dat
+license.doc loudness.awe
+manual.doc modems.txt music.mus
+netarena.pcx netfont1.pcx netfont2.pcx netmega.pcx netset.pcx netterm.int
+newsh0.shp newsh1.shp newsh2.shp newsh3.shp newsh4.shp newsh5.shp 
+newsh6.shp newsh7.shp newsh8.shp newsh9.shp newsha.shp newshb.shp newshc.shp
+newshd.shp newshe.shp newshf.shp newshg.shp newshh.shp newshi.shp newshj.shp 
+newshk.shp newshl.shp newshm.shp newshn.shp newsho.shp newshp.shp newshr.shp
+newsh^.shp newsh~.shp newsh#.shp newshs.shp newsht.shp newshu.shp newshv.shp
+order.doc order.tfp palette.dat
+setup.box setup.ini setup.int
+shapes).dat shapesw.dat shapesx.dat shapesy.dat shapesz.dat 
+shipedit.doc shipedit.pcx
+tshp2.pcx tyrend.anm tyrian1.lvl tyrian2.lvl tyrian3.lvl tyrian4.lvl 
+tyrian.cdt tyrianc.shp tyrian.hdt tyrian.ico tyrian.pic tyrian.shp tyrian.snd tyrset.pcx
+user1.shp user2.shp voicesc.snd voices.snd'
+
+    gdp_unzip_paths "$ZIPFILE" .
+    cd tyrian21
+    rm *.exe
+    rm *.ovl
+    slipstream_permcheck "$OUTFILE"
+    slipstream_unpack "$OUTFILE"
+    for file in $files; do
+        slipstream_file "$file" "usr/share/games/tyrian/$file"
+    done
+    slipstream_instsize
+    slipstream_repack "$OUTFILE"
+    slipstream_cleanup
+
+    rm $files
+    cd ..
+    rmdir tyrian21
+
+    if [ "$downloaded" = "true" ]; then
+        rm "$ZIPFILE"
+    fi
+
+	cd "$oldpwd"
+}
diff -Naur '--exclude=.git*' game-data-packager-git/tyrian-data/control.in game-data-packager-tyrian/tyrian-data/control.in
--- game-data-packager-git/tyrian-data/control.in	1970-01-01 01:00:00.000000000 +0100
+++ game-data-packager-tyrian/tyrian-data/control.in	2014-02-19 09:27:59.688266200 +0100
@@ -0,0 +1,14 @@
+Package: tyrian-data
+Provides: tyrian-data
+Section: non-free/games
+Priority: optional
+Architecture: all
+Multi-Arch: foreign
+Recommends: opentyrian
+Installed-Size: 56
+Version: VERSION
+Maintainer: Debian Games Team <pkg-games-de...@lists.alioth.debian.org>
+Description: Game data for OpenTyrian
+ OpenTyrian requires game data to play. This package contains
+ the game data from the shareware episode of OpenTyrian and
+ was generated using the "game-data-packager" program.
diff -Naur '--exclude=.git*' game-data-packager-git/tyrian-data/copyright game-data-packager-tyrian/tyrian-data/copyright
--- game-data-packager-git/tyrian-data/copyright	1970-01-01 01:00:00.000000000 +0100
+++ game-data-packager-tyrian/tyrian-data/copyright	2014-02-20 22:02:01.156684029 +0100
@@ -0,0 +1,20 @@
+The tyrian-data package was generated using game-data-packager.
+Copyright © 2014 Alexandre Detiste <alexandre.deti...@gmail.com>.
+
+The files within "/usr/share/games/tyrian-data" are subject to the copyright
+described in /usr/share/doc/tyrian-data/license.doc.
+
+The remainder of this package is covered by the following
+Licence:
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+On Debian GNU/Linux systems, the complete text of the GNU General Public
+License can be found in /usr/share/common-licenses/GPL-2.
diff -Naur '--exclude=.git*' game-data-packager-git/tyrian-data/README.Debian game-data-packager-tyrian/tyrian-data/README.Debian
--- game-data-packager-git/tyrian-data/README.Debian	1970-01-01 01:00:00.000000000 +0100
+++ game-data-packager-tyrian/tyrian-data/README.Debian	2014-02-20 22:02:16.328684659 +0100
@@ -0,0 +1,4 @@
+This package was generated by the game-data-packager program, to facilitate
+installation of the Tyrian (tyrian) data files into a Debian system.
+
+ -- Alexandre Detiste <alexandre.deti...@gmail.com>, Mon, 17 Feb 2014 12:22:22 +0000
diff -Naur '--exclude=.git*' game-data-packager-git/tyrian.mk game-data-packager-tyrian/tyrian.mk
--- game-data-packager-git/tyrian.mk	1970-01-01 01:00:00.000000000 +0100
+++ game-data-packager-tyrian/tyrian.mk	2014-02-17 13:02:53.609984789 +0100
@@ -0,0 +1,34 @@
+BASICFILES = usr/share/doc/tyrian-data/README.Debian \
+usr/share/doc/tyrian-data/copyright
+DESTFILES = $(addprefix build/tyrian-data/, $(BASICFILES))
+
+# VERSION is defined by the parent make
+out/tyrian-data_$(VERSION)_all.deb: build/tyrian-data/DEBIAN/control $(DESTFILES)
+		fakeroot dpkg-deb -b build/tyrian-data $@
+
+DIRS = build/tyrian-data \
+build/tyrian-data/DEBIAN \
+build/tyrian-data/usr \
+build/tyrian-data/usr/share \
+build/tyrian-data/usr/share/games \
+build/tyrian-data/usr/share/games/tyrian \
+build/tyrian-data/usr/share/doc \
+build/tyrian-data/usr/share/doc/tyrian-data
+
+$(DIRS):
+	mkdir $@
+
+$(DESTFILES): $(DIRS)
+	cp -p tyrian-data/`basename "$@"` $@
+
+build/tyrian-data/DEBIAN/control: tyrian-data/control.in $(DIRS)
+	m4 -DPACKAGE=tyrian-data -DVERSION=$(VERSION) $< > $@ 
+
+clean:
+	rm -f build/tyrian-data/DEBIAN/control out/tyrian-data_$(VERSION)_all.deb \
+		build/tyrian-data/usr/share/doc/tyrian-data/copyright \
+		build/tyrian-data/usr/share/doc/tyrian-data/README.Debian
+	for d in $(DIRS); do echo "$$d"; done | sort -r | while read d; do \
+		[ ! -d "$$d" ] || rmdir "$$d"; done
+
+.PHONY: clean $(DESTFILES)

Reply via email to