tSupport for RPM buildroot now in place - vaccinewars - be a doctor and try to vaccinate the world (HTM) git clone git://src.adamsgaard.dk/vaccinewars (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit abe6c14d16a9b123bbeee7c042e4f45ed8131f58 (DIR) parent 5dc0153ddfa26cf67c05e27ce9e3fd69308884ed (HTM) Author: Ben Webb <ben@salilab.org> Date: Wed, 26 Sep 2001 19:53:57 +0000 Support for RPM buildroot now in place Diffstat: M Makefile.am | 12 +++++++----- M Makefile.in | 12 +++++++----- M configure | 3 +-- M configure.in | 3 +-- M doc/Makefile.am | 6 +++--- M doc/Makefile.in | 6 +++--- M dopewars.spec | 31 +++++++++++++++++++------------ M src/Makefile.am | 8 +++++--- M src/Makefile.in | 8 +++++--- 9 files changed, 51 insertions(+), 38 deletions(-) --- (DIR) diff --git a/Makefile.am b/Makefile.am t@@ -2,12 +2,14 @@ SUBDIRS = intl src doc po DISTFILES = ABOUT-NLS DESKTOPDIR = ${DESTDIR}${datadir}/gnome/apps/Games DESKTOP = dopewars.desktop +SCOREDIR = ${DESTDIR}${datadir} +SCORE = ${SCOREDIR}/dopewars.sco install-data-local: - ${mkinstalldirs} ${DESTDIR}${datadir} - touch ${DESTDIR}${datadir}/dopewars.sco - chown root:games ${DESTDIR}${datadir}/dopewars.sco || \ - chown root:wheel ${DESTDIR}${datadir}/dopewars.sco - chmod 0660 ${DESTDIR}${datadir}/dopewars.sco + ${mkinstalldirs} ${SCOREDIR} + touch ${SCORE} + chown root:games ${SCORE} || \ + chown root:wheel ${SCORE} + chmod 0660 ${SCORE} ${mkinstalldirs} ${DESKTOPDIR} ${INSTALL} -o root -g 0 -m 0644 ${DESKTOP} ${DESKTOPDIR} (DIR) diff --git a/Makefile.in b/Makefile.in t@@ -97,6 +97,8 @@ SUBDIRS = intl src doc po DISTFILES = ABOUT-NLS DESKTOPDIR = ${DESTDIR}${datadir}/gnome/apps/Games DESKTOP = dopewars.desktop +SCOREDIR = ${DESTDIR}${datadir} +SCORE = ${SCOREDIR}/dopewars.sco ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h t@@ -381,11 +383,11 @@ mostlyclean distclean maintainer-clean install-data-local: - ${mkinstalldirs} ${DESTDIR}${datadir} - touch ${DESTDIR}${datadir}/dopewars.sco - chown root:games ${DESTDIR}${datadir}/dopewars.sco || \ - chown root:wheel ${DESTDIR}${datadir}/dopewars.sco - chmod 0660 ${DESTDIR}${datadir}/dopewars.sco + ${mkinstalldirs} ${SCOREDIR} + touch ${SCORE} + chown root:games ${SCORE} || \ + chown root:wheel ${SCORE} + chmod 0660 ${SCORE} ${mkinstalldirs} ${DESKTOPDIR} ${INSTALL} -o root -g 0 -m 0644 ${DESKTOP} ${DESKTOPDIR} (DIR) diff --git a/configure b/configure t@@ -5210,7 +5210,7 @@ test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac -sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile +sed -e "/POTFILES =/r po/POTFILES" -e 's/^prefix = /prefix = ${DESTDIR}/' po/Makefile.in > po/Makefile exit 0 EOF chmod +x $CONFIG_STATUS t@@ -5218,7 +5218,6 @@ rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - echo echo "dopewars has been configured as follows:" echo (DIR) diff --git a/configure.in b/configure.in t@@ -203,8 +203,7 @@ src/Makefile doc/Makefile intl/Makefile po/Makefile.in], -[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]) - +[sed -e "/POTFILES =/r po/POTFILES" -e 's/^prefix = /prefix = ${DESTDIR}/' po/Makefile.in > po/Makefile]) echo echo "dopewars has been configured as follows:" (DIR) diff --git a/doc/Makefile.am b/doc/Makefile.am t@@ -1,4 +1,4 @@ -DOCPATH=${datadir}/doc/${PACKAGE}-${VERSION}/ +DOCPATH=${DESTDIR}${datadir}/doc/${PACKAGE}-${VERSION}/ DOCS= aiplayer.html configfile.html index.html i18n.html server.html \ clientplay.html credits.html installation.html \ servercommands.html commandline.html developer.html \ t@@ -7,6 +7,6 @@ man_MANS = dopewars.6 EXTRA_DIST = ${man_MANS} install-data-local: - ${INSTALL} -d -o root -g 0 -m 0755 ${DESTDIR}${DOCPATH} - ${INSTALL} -o root -g 0 -m 0644 ${DOCS} ${DESTDIR}${DOCPATH} + ${INSTALL} -d -o root -g 0 -m 0755 ${DOCPATH} + ${INSTALL} -o root -g 0 -m 0644 ${DOCS} ${DOCPATH} (DIR) diff --git a/doc/Makefile.in b/doc/Makefile.in t@@ -93,7 +93,7 @@ WNDRES = @WNDRES@ l = @l@ localedir = @localedir@ -DOCPATH = ${datadir}/doc/${PACKAGE}-${VERSION}/ +DOCPATH = ${DESTDIR}${datadir}/doc/${PACKAGE}-${VERSION}/ DOCS = aiplayer.html configfile.html index.html i18n.html server.html clientplay.html credits.html installation.html servercommands.html commandline.html developer.html metaserver.html windows.html man_MANS = dopewars.6 t@@ -248,8 +248,8 @@ mostlyclean distclean maintainer-clean install-data-local: - ${INSTALL} -d -o root -g 0 -m 0755 ${DESTDIR}${DOCPATH} - ${INSTALL} -o root -g 0 -m 0644 ${DOCS} ${DESTDIR}${DOCPATH} + ${INSTALL} -d -o root -g 0 -m 0755 ${DOCPATH} + ${INSTALL} -o root -g 0 -m 0644 ${DOCS} ${DOCPATH} # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. (DIR) diff --git a/dopewars.spec b/dopewars.spec t@@ -1,11 +1,13 @@ -Summary: Drug dealing game -Name: dopewars -Version: cvs -Release: 1 -Vendor: Ben Webb -License: GPL -Group: Amusements/Games -Source0: dopewars-cvs.tar.gz +Summary: Drug dealing game +Name: dopewars +Version: cvs +Release: 1 +Vendor: Ben Webb +License: GPL +Group: Amusements/Games +Source0: dopewars-cvs.tar.gz + +BuildRoot: /tmp/dopewars-rpm %description Based on John E. Dell's old Drug Wars game, dopewars is a simulation of an t@@ -24,10 +26,14 @@ switches (via dopewars -h) for further information. %setup %build ./configure --prefix=/usr -make +make DESTDIR=${RPM_BUILD_ROOT} %install -make install-strip +make DESTDIR=${RPM_BUILD_ROOT} install-strip +${RPM_BUILD_ROOT}/usr/bin/dopewars -C ${RPM_BUILD_ROOT}/usr/share/dopewars.sco + +%clean +rm -rf ${RPM_BUILD_ROOT} %files %doc ChangeLog LICENCE README t@@ -35,10 +41,9 @@ make install-strip %doc doc/developer.html doc/example-cfg doc/i18n.html doc/index.html %doc doc/installation.html doc/metaserver.html doc/server.html %doc doc/servercommands.html doc/windows.html - /usr/bin/dopewars %config /usr/share/dopewars.sco -/usr/man/man6/dopewars.6 +/usr/man/man6/dopewars.6.gz /usr/share/gnome/apps/Games/dopewars.desktop /usr/share/pixmaps/dopewars-pill.png /usr/share/pixmaps/dopewars-weed.png t@@ -48,3 +53,5 @@ make install-strip /usr/share/locale/pt_BR/LC_MESSAGES/dopewars.mo %changelog +* Wed Sep 26 2001 Ben Webb <ben@bellatrix.pcl.ox.ac.uk> + - Added support for a buildroot (DIR) diff --git a/src/Makefile.am b/src/Makefile.am t@@ -8,11 +8,13 @@ LDADD = @GTKPORT_O@ @GTK_LIBS@ @INTLLIBS@ @WNDRES@ DEFS = @DEFS@ -DLOCALEDIR=\"${localedir}\" PIXDIR = ${DESTDIR}${datadir}/pixmaps PIXMAPS = dopewars-pill.png dopewars-shot.png dopewars-weed.png +DOPEDIR = ${DESTDIR}${bindir} +DOPEBIN = ${DOPEDIR}/dopewars install-exec-hook: - chown root:games ${DESTDIR}${bindir}/dopewars || \ - chown root:wheel ${DESTDIR}${bindir}/dopewars - chmod 2755 ${DESTDIR}${bindir}/dopewars + chown root:games ${DOPEBIN} || \ + chown root:wheel ${DOPEBIN} + chmod 2755 ${DOPEBIN} install-data-local: ${mkinstalldirs} ${PIXDIR} (DIR) diff --git a/src/Makefile.in b/src/Makefile.in t@@ -102,6 +102,8 @@ LDADD = @GTKPORT_O@ @GTK_LIBS@ @INTLLIBS@ @WNDRES@ DEFS = @DEFS@ -DLOCALEDIR=\"${localedir}\" PIXDIR = ${DESTDIR}${datadir}/pixmaps PIXMAPS = dopewars-pill.png dopewars-shot.png dopewars-weed.png +DOPEDIR = ${DESTDIR}${bindir} +DOPEBIN = ${DOPEDIR}/dopewars mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = t@@ -344,9 +346,9 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean install-exec-hook: - chown root:games ${DESTDIR}${bindir}/dopewars || \ - chown root:wheel ${DESTDIR}${bindir}/dopewars - chmod 2755 ${DESTDIR}${bindir}/dopewars + chown root:games ${DOPEBIN} || \ + chown root:wheel ${DOPEBIN} + chmod 2755 ${DOPEBIN} install-data-local: ${mkinstalldirs} ${PIXDIR}