Re: rott shareware vs commercial game
On Thu, 25 Mar 2010 11:39:49 +0000, Jon Dowland
<jon+debian-devel-games@alcopop.org> wrote:
> This one is mainly aimed at Fabian :)
>
> If we are to support the rott commercial data in addition to the shareware
> data in the future, should we use 'rott-data' as a virtual package name, and
> provide it with packages 'rott-shareware' and 'rott-commercial' (or
> similar?)
I have a separate suggestion concerning shareware/commercial support in the
rott package itself: it seems useful to me to ship all the supported variants
in the package, rather than instructing users to rebuild the package
according to the version they own.
The attached patch is one approach; it builds all four variants and installs
an alternative for the rott binary (using the shareware variant by default,
since that is what is currently supported). I've included an amended manpage
too.
The thought occurs to me that gdp might have to support four packages for
ROTT: the shareware version using huntbgin.rtl and huntbgin.rtc, the floppy
commercial version using darkwar.rtl and darkwar.rtc, the CD version using
darkwar.rtl and rottcd.rtc, and the site license version using darkwar.rtl
and rottsite.rtc.
(I have the basic registered version to test things with. The CD version is
now available for purchase on http://www.3drealms.com/rott/ and I'll
probably buy it sooner or later.)
Regards,
Stephen
diff -urN rott-1.1.1.orig/debian/patches/00-alternative-versions.patch rott-1.1.1/debian/patches/00-alternative-versions.patch
--- rott-1.1.1.orig/debian/patches/00-alternative-versions.patch 1970-01-01 01:00:00.000000000 +0100
+++ rott-1.1.1/debian/patches/00-alternative-versions.patch 2010-03-27 17:19:16.000000000 +0100
@@ -0,0 +1,101 @@
+--- rott-1.1.1.orig/rott/Makefile
++++ rott-1.1.1/rott/Makefile
+@@ -48,7 +48,8 @@
+
+ CC = gcc
+ CFLAGS += -g -W -Wall -Wno-unused
+-ALL_CFLAGS = $(SDL_CFLAGS) -DUSE_SDL=1 -DPLATFORM_UNIX=1 $(CFLAGS) $(EXTRACFLAGS)
++ALL_CFLAGS = $(SDL_CFLAGS) -DUSE_SDL=1 -DPLATFORM_UNIX=1 $(CFLAGS) $(EXTRACFLAGS) \
++ -DSHAREWARE=$(SHAREWARE) -DSUPERROTT=$(SUPERROTT) -DSITELICENSE=$(SITELICENSE)
+ LDFLAGS += -Wl,-E
+ LDLIBS = $(LDFLAGS) $(SDL_LDFLAGS) -lSDL -lSDL_mixer $(EXTRALDFLAGS)
+
+@@ -60,7 +61,7 @@
+ audiolib/audiolib.a:
+ $(MAKE) -C audiolib CC="$(CC)" CFLAGS="$(ALL_CFLAGS)" LDLIBS="$(LDLIBS)"
+
+-rott: \
++OBJS = \
+ cin_actr.o \
+ cin_efct.o \
+ cin_evnt.o \
+@@ -112,6 +113,8 @@
+ dukemusc.o \
+ audiolib/audiolib.a \
+ winrott.o
++
++rott: $(OBJS)
+ $(CC) $^ $(LDLIBS) -o $@
+
+ clean:
+--- rott-1.1.1.orig/rott/develop.h
++++ rott-1.1.1/rott/develop.h
+@@ -41,9 +41,10 @@
+
+ #define BNACRASHPREVENT 1 //bna added
+ // Make sure only one of the following are on at one time
+-#define SHAREWARE 1
+-#define SUPERROTT 0
+-#define SITELICENSE 0
++// These are provided during the build process
++// #define SHAREWARE 1
++// #define SUPERROTT 0
++// #define SITELICENSE 0
+
+ // cute little dopefish thing, only works with special patch?
+ #define DOPEFISH 0
+--- rott-1.1.1.orig/doc/rott.6
++++ rott-1.1.1/doc/rott.6
+@@ -6,12 +6,52 @@
+ .SH SYNOPSIS
+ .B rott
+ .RI [ options ]
++.PP
++.B rott-shareware
++.RI [ options ]
++.PP
++.B rott-registered
++.RI [ options ]
++.PP
++.B rott-superrott
++.RI [ options ]
++.PP
++.B rott-sitelicense
++.RI [ options ]
+
+ .SH DESCRIPTION
+ .B ROTT
+ is a port of Apogee's 3D action title Rise of the Triad, originally released in 1994.
+ This port duplicates the functionality of the original game on modern operating systems, including Linux, Win32, and Mac OS X.
+
++.SH VARIANTS
++The following variants are supported:
++.TP
++.BR rott-shareware
++the shareware version of Rise of the Triad (HUNTBGIN.RTL and
++HUNTBGIN.TRC, as installed, if requested, by this package);
++.TP
++.BR rott-registered
++the basic registered version of Rise of the Triad (DARKWAR.RTL and
++DARKWAR.RTC);
++.TP
++.BR rott-superrott
++the SuperCD version of Rise of the Triad (DARKWAR.RTL and ROTTCD.RTC);
++.TP
++.BR rott-sitelicense
++the site-license version of Rise of the Triad (DARKWAR.RTL and
++ROTTSITE.RTC).
++.PP
++The three registered variants offer the same gameplay; the only
++differences are the game type displayed and the names of the files
++used for the COMM-BAT (multi-player) levels.
++.PP
++The
++.B rott
++command can be configured to start the prefered variant using the
++.B update-alternatives
++command.
++
+ .SH OPTIONS
+ .TP
+ .BR aim
diff -urN rott-1.1.1.orig/debian/patches/series rott-1.1.1/debian/patches/series
--- rott-1.1.1.orig/debian/patches/series 2009-12-21 14:38:04.000000000 +0100
+++ rott-1.1.1/debian/patches/series 2010-03-27 17:19:45.000000000 +0100
@@ -1,5 +1,6 @@
#00-disable-audiolib.patch
#00-ludicrous-gibs.patch
#00-registered-version.patch
+00-alternative-versions.patch
01-demo-datadir.patch
02-persistent-typo.patch
diff -urN rott-1.1.1.orig/debian/rott.install rott-1.1.1/debian/rott.install
--- rott-1.1.1.orig/debian/rott.install 2009-08-07 18:44:48.000000000 +0200
+++ rott-1.1.1/debian/rott.install 2010-02-19 14:46:25.000000000 +0100
@@ -1,3 +1,6 @@
-rott /usr/games/
+rott-registered /usr/games/
+rott-shareware /usr/games/
+rott-superrott /usr/games/
+rott-sitelicense /usr/games/
../misc/rott.xpm /usr/share/pixmaps/
../misc/rott.desktop /usr/share/applications/
diff -urN rott-1.1.1.orig/debian/rott.links rott-1.1.1/debian/rott.links
--- rott-1.1.1.orig/debian/rott.links 1970-01-01 01:00:00.000000000 +0100
+++ rott-1.1.1/debian/rott.links 2010-02-19 14:56:28.000000000 +0100
@@ -0,0 +1,4 @@
+usr/share/man/man6/rott.6.gz usr/share/man/man6/rott-registered.6.gz
+usr/share/man/man6/rott.6.gz usr/share/man/man6/rott-shareware.6.gz
+usr/share/man/man6/rott.6.gz usr/share/man/man6/rott-superrott.6.gz
+usr/share/man/man6/rott.6.gz usr/share/man/man6/rott-sitelicense.6.gz
diff -urN rott-1.1.1.orig/debian/rott.postinst rott-1.1.1/debian/rott.postinst
--- rott-1.1.1.orig/debian/rott.postinst 2009-08-04 14:23:48.000000000 +0200
+++ rott-1.1.1/debian/rott.postinst 2010-03-27 16:50:07.000000000 +0100
@@ -69,6 +69,10 @@
exit 1
fi
fi
+ update-alternatives --install /usr/games/rott rott /usr/games/rott-shareware 50
+ update-alternatives --install /usr/games/rott rott /usr/games/rott-registered 40
+ update-alternatives --install /usr/games/rott rott /usr/games/rott-superrott 40
+ update-alternatives --install /usr/games/rott rott /usr/games/rott-sitelicense 40
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff -urN rott-1.1.1.orig/debian/rott.prerm rott-1.1.1/debian/rott.prerm
--- rott-1.1.1.orig/debian/rott.prerm 2009-08-04 14:23:48.000000000 +0200
+++ rott-1.1.1/debian/rott.prerm 2010-03-27 16:50:57.000000000 +0100
@@ -8,6 +8,10 @@
case "$1" in
remove|deconfigure)
rm -rf ${SHAREDIR}/* ${DOCDIR}/vendor.doc
+ update-alternatives --remove rott /usr/games/rott-shareware
+ update-alternatives --remove rott /usr/games/rott-registered
+ update-alternatives --remove rott /usr/games/rott-superrott
+ update-alternatives --remove rott /usr/games/rott-sitelicense
;;
upgrade|failed-upgrade)
diff -urN rott-1.1.1.orig/debian/rules rott-1.1.1/debian/rules
--- rott-1.1.1.orig/debian/rules 2009-12-21 14:24:04.000000000 +0100
+++ rott-1.1.1/debian/rules 2010-02-19 15:00:47.000000000 +0100
@@ -8,3 +8,26 @@
override_dh_strip:
dh_strip --dbg-package=rott-dbg
+
+override_dh_auto_build:
+ # Registered
+ make -C rott clean
+ make -C rott SHAREWARE=0 SUPERROTT=0 SITELICENSE=0
+ mv rott/rott rott/rott-registered
+ # Shareware
+ make -C rott clean
+ make -C rott SHAREWARE=1 SUPERROTT=0 SITELICENSE=0
+ mv rott/rott rott/rott-shareware
+ # Super CD
+ make -C rott clean
+ make -C rott SHAREWARE=0 SUPERROTT=1 SITELICENSE=0
+ mv rott/rott rott/rott-superrott
+ # Site licensed
+ make -C rott clean
+ make -C rott SHAREWARE=0 SUPERROTT=0 SITELICENSE=0
+ mv rott/rott rott/rott-sitelicense
+
+
+override_dh_auto_clean:
+ make -C rott clean
+ rm -f rott/rott-registered rott/rott-shareware rott/rott-superrott rott/rott-sitelicense
Reply to: