Package: freedoom Severity: normal Tags: patch Hello - I am working on a package to facilitate the installation of commercial IWAD files into debian[1], in order to close a bug against prboom[2].
In order for this package to exist alongside freedoom, the /usr/share/games/doom/doom2.wad file needs to be managed by the alternatives system. Please find attached a patch to adjust the freedoom package to install into /usr/share/games/freedoom, and add an alternative for doom2.wad at priority 50. 50 is an arbitrary value. I will probably use priority 25 for doom-data in order for freedoom to take priority over the commercial IWADs (in the spirit of free software :)) I shall be writing a similar patch for doom-wad-shareware at some point. [1] http://jon.dowland.name/code/doom/doom-data/ [2] http://bugs.debian.org/280045 -- Jon Dowland http://jon.dowland.name/
diff -ruN freedoom-0.3/debian/dirs freedoom-0.3~/debian/dirs
--- freedoom-0.3/debian/dirs 2005-09-10 16:42:20.000000000 +0100
+++ freedoom-0.3~/debian/dirs 2005-09-10 16:41:04.000000000 +0100
@@ -1,4 +1,2 @@
-usr
-usr/share
-usr/share/games
usr/share/games/doom
+usr/share/games/freedoom
diff -ruN freedoom-0.3/debian/postinst freedoom-0.3~/debian/postinst
--- freedoom-0.3/debian/postinst 1970-01-01 01:00:00.000000000 +0100
+++ freedoom-0.3~/debian/postinst 2005-09-10 16:17:41.000000000 +0100
@@ -0,0 +1,26 @@
+#! /bin/sh
+# postinst script for freedoom
+
+set -e
+
+case "$1" in
+ configure|abort-upgrade)
+ update-alternatives --install /usr/share/games/doom/doom2.wad \
+ doom2.wad \
+ /usr/share/games/freedoom/doom2.wad \
+ 50
+ ;;
+
+ abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -ruN freedoom-0.3/debian/prerm freedoom-0.3~/debian/prerm
--- freedoom-0.3/debian/prerm 1970-01-01 01:00:00.000000000 +0100
+++ freedoom-0.3~/debian/prerm 2005-09-10 16:19:16.000000000 +0100
@@ -0,0 +1,21 @@
+#! /bin/sh
+# prerm script for nodm
+
+set -e
+
+case "$1" in
+ remove)
+ update-alternatives --remove doom2.wad \
+ /usr/share/games/freedoom/doom2.wad
+ ;;
+ upgrade|deconfigure|failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -ruN freedoom-0.3/debian/rules freedoom-0.3~/debian/rules
--- freedoom-0.3/debian/rules 2005-09-10 16:42:20.000000000 +0100
+++ freedoom-0.3~/debian/rules 2005-09-10 16:44:16.000000000 +0100
@@ -21,8 +21,7 @@
dh_clean -k
dh_installdirs
- mkdir -p debian/freedoom/usr/share/games/doom
- install -m 644 doom2.wad debian/freedoom/usr/share/games/doom
+ install -m 644 doom2.wad debian/freedoom/usr/share/games/freedoom
binary: binary-indep
signature.asc
Description: Digital signature

