tThe high score file is now installed in ${localstatedir} rather than ${datadir}. This allows packagers to put it in the /var hierarchy where it belongs, rather than in /usr/share with the documentation, locale files, sounds etc. - vaccinewars - be a doctor and try to vaccinate the world | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 0d18ff7ee37961f4de1ccf7f7103a22734b0ff0f | |
parent 4a6504ee116647a53c95e6c05054ca3c8619d94e | |
Author: Ben Webb | |
Date: Mon, 28 Jul 2003 15:49:35 +0000 The high score file is now installed in ${localstatedir} rather than ${datadir}. This allows packagers to put it in the /var hierarchy where it belongs, rather than in /usr/share with the documentation, locale files, sounds etc. Diffstat: M ChangeLog | 2 ++ M INSTALL | 20 ++++++++++++-------- M Makefile.am | 2 +- M configure.in | 8 +++++++- M doc/installation.html | 9 ++++----- M dopewars.spec.in | 9 +++++++-- M src/dopewars.c | 6 +++--- 7 files changed, 36 insertions(+), 20 deletions(-) --- | |
diff --git a/ChangeLog b/ChangeLog | |
t@@ -1,4 +1,6 @@ cvs + - High score file is now installed in ${localstatedir} rather than + ${datadir}, to allow proper Filesystem Hierarchy Standard compliance - Fix for a curses client crash if the D key is pressed during attacks by the cops - Some problems with the curses client missing screen resize events fixed | |
diff --git a/INSTALL b/INSTALL | |
t@@ -100,16 +100,20 @@ the -s option in LDFLAGS. In a Bourne-compatible shell, this can be achieved with a command similar to the following:- LDFLAGS="-s" ./configure -The dopewars high score file is written as /usr/local/share/dopewars.sco on +The dopewars high score file is written as /usr/local/var/dopewars.sco on Unix systems or ./dopewars.sco on Win32 systems by default. On Unix systems, -it can be placed into an alternative location by specifying the --datadir -flag to configure. (On Win32 systems, the --datadir flag is ignored.) -The dopewars binary can also be moved from /usr/local/bin/dopewars with -the --bindir flag. For example:- - - ./configure --bindir=/usr/bin --datadir=/var/games/dopewars +translations, documentation, sounds and graphics are installed in the +locale, doc, dopewars and pixmaps directories respectively under +/usr/local/share. (On Windows systems, these directories are under the +current directory.) On Unix systems, you can move the score file with the +--localstatedir flag to configure, and the other files with the --datadir +flag. (On Win32 systems, the --localstatedir and --datadir flags are +ignored.) The dopewars binary can also be moved from /usr/local/bin/dopewars +with the --bindir flag. For example:- + + ./configure --bindir=/usr/bin --localstatedir=/var/lib/games will configure the system to write the dopewars binary as /usr/bin/dopewars -and the high score as /var/games/dopewars/dopewars.sco +and the high score as /var/lib/games/dopewars.sco Other options to ./configure include:- | |
diff --git a/Makefile.am b/Makefile.am | |
t@@ -1,7 +1,7 @@ SUBDIRS = intl src doc po sounds DESKTOPDIR = ${DESTDIR}${datadir}/gnome/apps/Games DESKTOP = dopewars.desktop -SCOREDIR = ${DESTDIR}${datadir} +SCOREDIR = ${DESTDIR}${localstatedir} SCORE = ${SCOREDIR}/dopewars.sco EXTRA_DIST = ABOUT-NLS LICENCE dopewars.desktop dopewars.spec.in depcomp \ runindent.sh win32/Makefile win32/README win32/contid.h \ | |
diff --git a/configure.in b/configure.in | |
t@@ -114,6 +114,7 @@ if test "$CYGWIN" = "yes" ; then dnl Read high score files, docs and locale files from current directory datadir="." + localstatedir="." else AC_MSG_RESULT([Configuring for Unix binary]) t@@ -362,9 +363,14 @@ if test -n "$GCC"; then fi dnl Tell dopewars where the high scores, docs and locale files are +DP_EXPAND_DIR(DPSCOREDIR, '${localstatedir}') +AC_DEFINE_UNQUOTED(DPSCOREDIR, "$DPSCOREDIR", + [The directory containing the high score file]) +AC_SUBST(DPSCOREDIR) + DP_EXPAND_DIR(DPDATADIR, '${datadir}') AC_DEFINE_UNQUOTED(DPDATADIR, "$DPDATADIR", - [The directory containing the high score file and docs]) + [The directory containing the docs and sounds]) AC_SUBST(DPDATADIR) localedir=${datadir}/locale | |
diff --git a/doc/installation.html b/doc/installation.html | |
t@@ -140,10 +140,9 @@ installed. The configure script supports a number of configurable options; for more details, read the INSTALL file in the dopewars-1.5.9 directory.
- Last update: 02-06-2003 |
diff --git a/dopewars.spec.in b/dopewars.spec.in
t@@ -36,6 +36,7 @@ the Simple DirectMedia Layer mixer (SDL_mixer). %setup %build +%define _localstatedir /var/lib/games %configure --with-sdl --with-esd make t@@ -47,7 +48,7 @@ make install DESTDIR=${RPM_BUILD_ROOT} test "$RPM_BUILD_ROOT" != "/" && rm -rf ${RPM_BUILD_ROOT} %post -%{_bindir}/dopewars -C %{_datadir}/dopewars.sco +%{_bindir}/dopewars -C %{_localstatedir}/dopewars.sco %files -f %{name}.lang %defattr(-,root,root) t@@ -57,7 +58,7 @@ test "$RPM_BUILD_ROOT" != "/" && rm -rf ${RPM_BUILD_ROOT} %doc doc/installation.html doc/metaserver.html doc/server.html %doc doc/servercommands.html doc/protocol.html doc/windows.html %attr(2755,root,games) %{_bindir}/dopewars -%attr(0660,root,games) %config %{_datadir}/dopewars.sco +%attr(0660,root,games) %config %{_localstatedir}/dopewars.sco %{_mandir}/man6/dopewars.6.gz %{_libdir}/dopewars/libsound_esd.so %{_datadir}/gnome/apps/Games/dopewars.desktop t@@ -83,6 +84,10 @@ test "$RPM_BUILD_ROOT" != "/" && rm -rf ${RPM_BUILD_ROOT} %{_libdir}/dopewars/libsound_sdl.so %changelog +* Mon Jul 28 2003 Ben Webb+- High score file moved to /var/lib/games for consistency with + other packages + * Mon Oct 21 2002 Ben Webb - Dependency on SDL-devel added to properly build SDL plugin
diff --git a/src/dopewars.c b/src/dopewars.c
t@@ -2614,7 +2614,7 @@ Drug dealing game based on \"Drug Wars\" by John E. Dell\n\ -t, --text-client force the use of a text-mode client (curses) (by\n\ default, a windowed client is used when possible)\n\ -P, --player=NAME set player name to \"NAME\"\n\ - -C, --convert=FILE convert an \"old format\" score file to the new format\n"), DPDATADIR); + -C, --convert=FILE convert an \"old format\" score file to the new format\n"), DPSCOREDIR); PluginHelp(); g_print(_(" -h, --help display this help information\n\ -v, --version output version information and exit\n\n\ t@@ -2650,7 +2650,7 @@ Drug dealing game based on \"Drug Wars\" by John E. Dell\n\ -P name set player name to \"name\"\n\ -C file convert an \"old format\" score file to the new format\n\ -A connect to a locally-running server for administration\n"), - DPDATADIR); + DPSCOREDIR); PluginHelp(); g_print(_(" -h display this help information\n\ -v output version information and exit\n\n\ t@@ -2808,7 +2808,7 @@ struct CMDLINE *GeneralStartup(int argc, char *argv[]) { /* First, open the hard-coded high score file with possibly * elevated privileges */ - priv_hiscore = g_strdup_printf("%s/dopewars.sco", DPDATADIR); + priv_hiscore = g_strdup_printf("%s/dopewars.sco", DPSCOREDIR); HiScoreFile = g_strdup(priv_hiscore); OpenHighScoreFile(); DropPrivileges();