diff --git a/games/dopewars/Makefile b/games/dopewars/Makefile index 859f6fdaaf1..cf82ac0928b 100644 --- a/games/dopewars/Makefile +++ b/games/dopewars/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.3 1999/09/20 18:35:35 brad Exp $ +# $OpenBSD: Makefile,v 1.4 1999/10/26 21:21:17 brad Exp $ -DISTNAME= dopewars-1.4.4 +DISTNAME= dopewars-1.4.5 CATEGORIES= games MASTER_SITES= http://bellatrix.pcl.ox.ac.uk/~ben/dopewars/ -ALL_TARGET= +post-install: + @PKG_PREFIX="${PREFIX}" ${SH} ${PKGDIR}/INSTALL ${DISTNAME} POST-INSTALL .include diff --git a/games/dopewars/files/md5 b/games/dopewars/files/md5 index 3baee9aadd6..79bec20bea2 100644 --- a/games/dopewars/files/md5 +++ b/games/dopewars/files/md5 @@ -1,3 +1,3 @@ -MD5 (dopewars-1.4.4.tar.gz) = 01726d21ff55f916393bcc324595ddee -RMD160 (dopewars-1.4.4.tar.gz) = e979452cf6f74c49e27945639ae3a78e67128290 -SHA1 (dopewars-1.4.4.tar.gz) = d51e589ccab9c81b44b808be6ce6130b6896a512 +MD5 (dopewars-1.4.5.tar.gz) = e4a84768c1113eb090dd769fd30866c7 +RMD160 (dopewars-1.4.5.tar.gz) = 41741896a160171d332a74e8699ac84a5c7a4a91 +SHA1 (dopewars-1.4.5.tar.gz) = 1bde4e85ef40153017a1c970af4cfbc30b6b091c diff --git a/games/dopewars/patches/patch-aa b/games/dopewars/patches/patch-aa index 5ee1ada56f4..e9ce28262c8 100644 --- a/games/dopewars/patches/patch-aa +++ b/games/dopewars/patches/patch-aa @@ -1,6 +1,6 @@ ---- Makefile.orig Mon Sep 20 14:21:39 1999 -+++ Makefile Mon Sep 20 14:23:32 1999 -@@ -1,8 +1,8 @@ +--- Makefile.orig Wed Oct 20 19:07:55 1999 ++++ Makefile Mon Oct 25 17:23:45 1999 +@@ -1,10 +1,10 @@ -CFLAGS = -Wall -CC = gcc +CFLAGS += -Wall @@ -9,21 +9,25 @@ OBJS = message.o dopewars.o serverside.o clientside.o AIPlayer.o -LIBS = -lncurses +LIBS = -lcurses - - dopewars : $(OBJS) - $(CC) $(CFLAGS) -o dopewars $(OBJS) $(LIBS) -@@ -23,10 +23,10 @@ + VERSION = 1.4.5 +-DOCPATH = /usr/doc/dopewars-$(VERSION) ++DOCPATH = $(PREFIX)/share/doc/dopewars + DOCS = index.html installation.html clientplay.html server.html credits.html \ + aiplayer.html configfile.html commandline.html developer.html \ + metaserver.html servercommands.html \ +@@ -31,12 +31,9 @@ $(CC) $(CFLAGS) -c AIPlayer.c - install : + install : all - install -o root -g games -m 2755 dopewars /usr/bin/dopewars - touch /var/lib/games/dopewars.sco - chown root.games /var/lib/games/dopewars.sco - chmod 0660 /var/lib/games/dopewars.sco +- install -d -o root -g root -m 0755 $(DOCPATH) +- install -o root -g root -m 0644 $(DOCS) $(DOCPATH) + install -o root -g games -m 2755 dopewars $(PREFIX)/bin/dopewars -+ touch /var/games/dopewars.sco -+ chown root.games /var/games/dopewars.sco -+ chmod 664 /var/games/dopewars.sco ++ install -d -o root -g wheel -m 0755 $(DOCPATH) ++ install -o root -g wheel -m 0644 $(DOCS) $(DOCPATH) clean : rm -f $(OBJS) diff --git a/games/dopewars/patches/patch-ab b/games/dopewars/patches/patch-ab index d90cd8f589d..ce264fb79ca 100644 --- a/games/dopewars/patches/patch-ab +++ b/games/dopewars/patches/patch-ab @@ -1,5 +1,5 @@ ---- dopewars.c.orig Mon Sep 20 14:24:07 1999 -+++ dopewars.c Mon Sep 20 14:24:57 1999 +--- dopewars.c.orig Mon Oct 25 16:46:16 1999 ++++ dopewars.c Mon Oct 25 16:46:44 1999 @@ -19,7 +19,7 @@ /* MA 02111-1307, USA. */ @@ -9,7 +9,7 @@ #include #include #include -@@ -1935,7 +1935,7 @@ +@@ -2179,7 +2179,7 @@ char ConfigFile[800],*pt; /* First, set hard-coded default values */ @@ -17,8 +17,8 @@ + strcpy(HiScoreFile,"/var/games/dopewars.sco"); strcpy(ServerName,"localhost"); strcpy(Pager,"more"); - Location=ResizeStruct(Location,&NumLocation, -@@ -2015,7 +2015,7 @@ + Location=ResizeStruct(Location,&NumLocation,NUMLOCATION, +@@ -2263,7 +2263,7 @@ original version as"); puts(" possible (this also disables any networking)"); puts(" -f file specify a file to use as the high score table"); diff --git a/games/dopewars/pkg/DEINSTALL b/games/dopewars/pkg/DEINSTALL new file mode 100644 index 00000000000..df78bcae391 --- /dev/null +++ b/games/dopewars/pkg/DEINSTALL @@ -0,0 +1,24 @@ +# $OpenBSD: DEINSTALL,v 1.1 1999/10/26 21:21:18 brad Exp $ +# +# dopewars de-installation + +set -e +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} +SCORE_FILE=/var/games/dopewars.sco + +if [ -f ${SCORE_FILE} ]; then + echo + echo "+---------------" + echo "| To completely deinstall the $1 package you need to perform" + echo "| this step as root:" + echo "|" + echo "| rm -f ${SCORE_FILE}" + echo "|" + echo "| Do not do this if you plan on re-installing $1" + echo "| at some future time." + echo "+---------------" + echo +fi + +exit 0 diff --git a/games/dopewars/pkg/INSTALL b/games/dopewars/pkg/INSTALL new file mode 100644 index 00000000000..04815a9fea9 --- /dev/null +++ b/games/dopewars/pkg/INSTALL @@ -0,0 +1,46 @@ +#!/bin/sh +# $OpenBSD: INSTALL,v 1.1 1999/10/26 21:21:18 brad Exp $ +# +# Pre/post-installation setup of dopewars + +# exit on errors, use a sane path and install prefix +# +set -e +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} +SCORE_FILE=/var/games/dopewars.sco + +# Function: install a blank file to be used as the dopewars score file +# +do_install() +{ + touch /var/games/dopewars.sco + chown root.games /var/games/dopewars.sco + chmod 664 /var/games/dopewars.sco +} + +# verify proper execution +# +if [ $# -ne 2 ]; then + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 +fi + +# Verify/process the command +# +case $2 in + PRE-INSTALL) + : nothing to pre-install for this port + ;; + POST-INSTALL) + if [ ! -f $SCORE_FILE ]; then + do_install $1 + fi + ;; + *) + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/games/dopewars/pkg/PLIST b/games/dopewars/pkg/PLIST index dec9877db73..51e454a36c1 100644 --- a/games/dopewars/pkg/PLIST +++ b/games/dopewars/pkg/PLIST @@ -1,10 +1,19 @@ @group games @mode 2755 bin/dopewars -@exec touch /var/games/dopewars.sco -@exec chown root.games /var/games/dopewars.sco -@exec chmod 664 /var/games/dopewars.sco -@unexec echo "+---------------" -@unexec echo "| Please remove the score-file /var/games/dopewars.sco" -@unexec echo "| to fully un-install dopewars." -@unexec echo "+---------------" +share/doc/dopewars/ChangeLog +share/doc/dopewars/LICENCE +share/doc/dopewars/README +share/doc/dopewars/aiplayer.html +share/doc/dopewars/clientplay.html +share/doc/dopewars/commandline.html +share/doc/dopewars/configfile.html +share/doc/dopewars/credits.html +share/doc/dopewars/developer.html +share/doc/dopewars/example-cfg +share/doc/dopewars/index.html +share/doc/dopewars/installation.html +share/doc/dopewars/metaserver.html +share/doc/dopewars/server.html +share/doc/dopewars/servercommands.html +@dirrm share/doc/dopewars