summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorobache <obache>2011-03-16 08:47:37 +0000
committerobache <obache>2011-03-16 08:47:37 +0000
commit5a5e9919b66861cb22ae8e57866c32211d3fa070 (patch)
tree2cef23c794e2ed8a2dd13bc33742640688fd1c86 /games
parent945687b79d14cd5864a1d5207769c18183e7f552 (diff)
downloadpkgsrc-5a5e9919b66861cb22ae8e57866c32211d3fa070.tar.gz
* honor VARBASE for game score file.
* add user-destdir installation support * take care score file for binary package Bump PKGREVISION.
Diffstat (limited to 'games')
-rw-r--r--games/cbzone/Makefile21
-rw-r--r--games/cbzone/distinfo6
-rw-r--r--games/cbzone/patches/patch-aa31
-rw-r--r--games/cbzone/patches/patch-ad4
4 files changed, 40 insertions, 22 deletions
diff --git a/games/cbzone/Makefile b/games/cbzone/Makefile
index 110e00ef504..5589de0393a 100644
--- a/games/cbzone/Makefile
+++ b/games/cbzone/Makefile
@@ -1,18 +1,35 @@
-# $NetBSD: Makefile,v 1.9 2008/01/19 09:16:20 wiz Exp $
+# $NetBSD: Makefile,v 1.10 2011/03/16 08:47:37 obache Exp $
DISTNAME= cbzone-sound
PKGNAME= cbzone-2.0c
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= games x11
MASTER_SITES= ftp://ftp.cdrom.com/pub/X11/R5contrib/
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Simple classic game of 3D tank warfare
+PKG_DESTDIR_SUPPORT= user-destdir
+
WRKSRC= ${WRKDIR}/cbzone
USE_TOOLS+= gmake
USE_IMAKE= yes
+BUILD_DEFS+= VARBASE
+BUILD_DEFS+= GAMES_USER
+BUILD_DEFS+= GAMES_GROUP
+BUILD_DEFS+= GAMEDATAMODE
+
+MAKE_DIRS_PERMS+= ${VARBASE}/games ${GAMES_USER} ${GAMES_GROUP} ${GAMEDIRMODE}
+REQD_FILES_PERMS+= /dev/null ${VARBASE}/games/cbzone.highscores \
+ ${GAMES_USER} ${GAMES_GROUP} ${GAMEDATAMODE}
+SPECIAL_PERMS+= bin/cbzone.exec ${SETGID_GAMES_PERMS}
+
+SUBST_CLASSES+= scoredir
+SUBST_STAGE.scoredir= post-configure
+SUBST_FILES.scoredir= c_scores.c
+SUBST_VARS.scoredir= VARBASE
+
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/games/cbzone/distinfo b/games/cbzone/distinfo
index a4b423a1755..5073fb84e15 100644
--- a/games/cbzone/distinfo
+++ b/games/cbzone/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.4 2005/12/19 16:22:25 joerg Exp $
+$NetBSD: distinfo,v 1.5 2011/03/16 08:47:37 obache Exp $
SHA1 (cbzone-sound.tar.gz) = 166308d740be0d551197287fab57ef25e25eae8a
RMD160 (cbzone-sound.tar.gz) = 2770e817b79b305910f0d0cba02c9fc22f5cdff7
Size (cbzone-sound.tar.gz) = 85490 bytes
-SHA1 (patch-aa) = 2b25adfaf7746521c1481a53e2530840d94a7706
+SHA1 (patch-aa) = 36651f8da4ff7b2f8ad98934c04f350fcd17b70f
SHA1 (patch-ab) = f97de120c657bf7292e1bf20ccc62e3bc99114b4
SHA1 (patch-ac) = 5a2819491a75a4c70f15fa1d13e41af1dd4b7732
-SHA1 (patch-ad) = d8cb92443146ee4ef2273b9445bd54769eb9db42
+SHA1 (patch-ad) = e30b5c9a5e0c3651890e056a57a4463750936da8
SHA1 (patch-ae) = 39a28e8d351b46a523ac6ebf88426ced8b39d71b
diff --git a/games/cbzone/patches/patch-aa b/games/cbzone/patches/patch-aa
index 29df14d2d0b..84a33929d3c 100644
--- a/games/cbzone/patches/patch-aa
+++ b/games/cbzone/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.4 1998/09/13 23:38:52 garbled Exp $
---- Imakefile.orig Sun Aug 1 22:45:08 1993
-+++ Imakefile Sun Sep 13 16:26:17 1998
-@@ -32,9 +32,9 @@
+$NetBSD: patch-aa,v 1.5 2011/03/16 08:47:37 obache Exp $
+--- Imakefile.orig 1993-08-02 05:45:08.000000000 +0000
++++ Imakefile
+@@ -32,9 +32,9 @@ HDRS = c_config.h \
ETCS = cbzone.help \
cbzone.motd \
@@ -14,7 +14,7 @@ $NetBSD: patch-aa,v 1.4 1998/09/13 23:38:52 garbled Exp $
MISC = Imakefile \
Makefile.orig \
-@@ -53,15 +53,15 @@
+@@ -53,15 +53,15 @@ SOUNDS = sounds/enemy_seen.au \
# this is where the shellscript, and executable will go
# TANK_BINDIR = $(BINDIR)
@@ -33,7 +33,7 @@ $NetBSD: patch-aa,v 1.4 1998/09/13 23:38:52 garbled Exp $
# this is where the sound files go
TANK_SOUNDDIR = $(TANK_LIBDIR)/sounds
-@@ -72,20 +72,20 @@
+@@ -72,33 +72,22 @@ LOCAL_LIBRARIES = $(XTOOLLIB) $(XLIB) -l
AllTarget(cbzone.script)
AllTarget(cbzone.exec)
@@ -48,17 +48,18 @@ $NetBSD: patch-aa,v 1.4 1998/09/13 23:38:52 garbled Exp $
InstallNamedNonExec(Cbzone.ad,Cbzone,$(TANK_APPDIR))
InstallMultiple($(SOUNDS),$(TANK_SOUNDDIR))
- install::
+-install::
- @if chgrp games $(TANK_BINDIR)/cbzone.exec $(TANK_LIBDIR)/cbzone.highscores 2>/dev/null ; then \
-+ cat /dev/null >>/var/games/cbzone.highscores
-+ @if chgrp games $(TANK_BINDIR)/cbzone.exec /var/games/cbzone.highscores 2>/dev/null ; then \
- (set -x ; chmod 2755 $(TANK_BINDIR)/cbzone.exec ) ; \
+- (set -x ; chmod 2755 $(TANK_BINDIR)/cbzone.exec ) ; \
- (set -x ; chmod 664 $(TANK_LIBDIR)/cbzone.highscores ) ; \
-+ (set -x ; chmod 664 /var/games/cbzone.highscores ) ; \
- else \
- echo 'Failed: chgrp games for "cbzone.exec", "cbzone.highscores".' ; \
- echo ' highscore file exists but could not be protected.' ; \
-@@ -97,8 +97,8 @@
+- else \
+- echo 'Failed: chgrp games for "cbzone.exec", "cbzone.highscores".' ; \
+- echo ' highscore file exists but could not be protected.' ; \
+- ( set -x ; chmod 666 $(TANK_LIBDIR)/cbzone.highscores ) ; \
+- fi
+-
+ cbzone.highscores:
+ touch $@
chmod 664 $@
cbzone.exec: $(OBJS) $(DEPLIBS)
diff --git a/games/cbzone/patches/patch-ad b/games/cbzone/patches/patch-ad
index b1b8d50ff64..63a5fce4b47 100644
--- a/games/cbzone/patches/patch-ad
+++ b/games/cbzone/patches/patch-ad
@@ -1,4 +1,4 @@
-$NetBSD: patch-ad,v 1.2 2005/12/19 16:22:25 joerg Exp $
+$NetBSD: patch-ad,v 1.3 2011/03/16 08:47:37 obache Exp $
--- c_scores.c.orig 1992-08-02 13:10:12.000000000 +0000
+++ c_scores.c
@@ -15,7 +15,7 @@ $NetBSD: patch-ad,v 1.2 2005/12/19 16:22:25 joerg Exp $
ydelta = 15;
- sprintf(buf,"%s/%s",TANKDIR,SCOREFILE);
-+ sprintf(buf,"/var/games/%s",SCOREFILE);
++ sprintf(buf,"@VARBASE@/games/%s",SCOREFILE);
sfile = fopen(buf,"r"); /* just check if it is there */
if (sfile == NULL) {