summaryrefslogtreecommitdiff
path: root/games/xmris
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2011-05-23 12:05:53 +0000
committerobache <obache@pkgsrc.org>2011-05-23 12:05:53 +0000
commit0e9cf1fa60a864b417679b5678c3ebfc79387957 (patch)
tree8289134f5f3e9bb6fcc058ed1a21be5c67a4fb0f /games/xmris
parentbe8dcc644c1110e58728e617ee5c44104b571107 (diff)
downloadpkgsrc-0e9cf1fa60a864b417679b5678c3ebfc79387957.tar.gz
* add user-destdir installation support.
* set LICENSE=gnu-gpl-v2 * replace manual SED with SUBST. * prepare game score directory and file with pkgsrc. Bump PKGREVISION.
Diffstat (limited to 'games/xmris')
-rw-r--r--games/xmris/DEINSTALL18
-rw-r--r--games/xmris/Makefile28
-rw-r--r--games/xmris/distinfo4
-rw-r--r--games/xmris/patches/patch-aa53
4 files changed, 65 insertions, 38 deletions
diff --git a/games/xmris/DEINSTALL b/games/xmris/DEINSTALL
deleted file mode 100644
index f89ba14079d..00000000000
--- a/games/xmris/DEINSTALL
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2005/09/08 06:30:37 jdc Exp $
-#
-
-VARBASE=@VARBASE@
-
-case "${STAGE}" in
- POST-DEINSTALL) cat << EOF
-=============================================================
-The score files were not wiped out by this deletion process.
-If you don't want them around, please remove the directory:
- ${VARBASE}/games/xmris
-and its contents.
-=============================================================
-EOF
- ;;
-esac
diff --git a/games/xmris/Makefile b/games/xmris/Makefile
index cd8b976cbf0..394eb7feb57 100644
--- a/games/xmris/Makefile
+++ b/games/xmris/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2008/11/10 17:21:35 wiz Exp $
+# $NetBSD: Makefile,v 1.16 2011/05/23 12:05:53 obache Exp $
DISTNAME= xmris.4.0.5
PKGNAME= xmris-4.05
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= games x11
MASTER_SITES= http://www.planetfall.pwp.blueyonder.co.uk/xmris/
EXTRACT_SUFX= .tgz
@@ -10,20 +10,30 @@ EXTRACT_SUFX= .tgz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.planetfall.pwp.blueyonder.co.uk/xmris/
COMMENT= Version of the Mr Do video arcade game for X
+LICENSE= gnu-gpl-v2
+
+PKG_DESTDIR_SUPPORT= user-destdir
USE_IMAKE= yes
NO_INSTALL_MANPAGES= yes
INSTALLATION_DIRS= bin ${PKGMANDIR}/man6
-post-patch:
- @${MV} ${WRKSRC}/Imakefile ${WRKSRC}/Imakefile-pre
- @${SED} -e 's@XXXVARBASEXXX@${VARBASE}@g' \
- < ${WRKSRC}/Imakefile-pre > ${WRKSRC}/Imakefile
+BUILD_DEFS+= VARBASE
+
+SUBST_CLASSES+= varbase
+SUBST_STAGE.varbase= pre-configure
+SUBST_FILES.varbase= Imakefile
+SUBST_VARS.varbase= VARBASE
post-install:
- ${INSTALL_MAN} ${WRKSRC}/xmris.man ${PREFIX}/${PKGMANDIR}/man6/xmris.6
- ${LN} -fs xmris.6 ${PREFIX}/${PKGMANDIR}/man6/xmsit.6
- ${INSTALL_MAN} ${WRKSRC}/xmred.man ${PREFIX}/${PKGMANDIR}/man6/xmred.6
+ ${INSTALL_MAN} ${WRKSRC}/xmris.man ${DESTDIR}${PREFIX}/${PKGMANDIR}/man6/xmris.6
+ ${LN} -fs xmris.6 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man6/xmsit.6
+ ${INSTALL_MAN} ${WRKSRC}/xmred.man ${DESTDIR}${PREFIX}/${PKGMANDIR}/man6/xmred.6
+
+SPECIAL_PERMS+= bin/xmris ${SETGID_GAMES_PERMS}
+# require to write lock files
+REQD_DIRS_PERMS+= ${VARBASE}/games/xmris ${GAMEDIR_PERMS}
+REQD_FILES_PERMS+= /dev/null ${VARBASE}/games/xmris/xmris.score ${GAMEDATA_PERMS}
.include "../../x11/libXaw/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
diff --git a/games/xmris/distinfo b/games/xmris/distinfo
index 817dfc664f6..76b282e944a 100644
--- a/games/xmris/distinfo
+++ b/games/xmris/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.7 2005/09/08 06:30:37 jdc Exp $
+$NetBSD: distinfo,v 1.8 2011/05/23 12:05:54 obache Exp $
SHA1 (xmris.4.0.5.tgz) = 96443fc266c7388fa67a58ee0e4bada7fe7b6e9e
RMD160 (xmris.4.0.5.tgz) = beade823d48c229b51fefad4fba804217aff3a11
Size (xmris.4.0.5.tgz) = 273304 bytes
-SHA1 (patch-aa) = af00a085442d3f7e8253bfc6eb58cf914c5c80ae
+SHA1 (patch-aa) = 7b6b00857e143368a286e3e07f2db1a0088e894c
SHA1 (patch-ab) = 7985aa4060d6e2ff24f5417057ba528561c887d6
SHA1 (patch-ac) = db0692ce0fe3ea75d954b9f5c03f404e7fb9d343
diff --git a/games/xmris/patches/patch-aa b/games/xmris/patches/patch-aa
index ac9d882478e..b61880f5e4b 100644
--- a/games/xmris/patches/patch-aa
+++ b/games/xmris/patches/patch-aa
@@ -1,17 +1,17 @@
-$NetBSD: patch-aa,v 1.5 2005/09/08 06:30:37 jdc Exp $
+$NetBSD: patch-aa,v 1.6 2011/05/23 12:05:54 obache Exp $
--- Imakefile.orig 1999-11-22 14:06:25.000000000 +0000
-+++ Imakefile 2005-08-13 19:39:35.000000000 +0100
-@@ -69,7 +69,7 @@
++++ Imakefile
+@@ -69,7 +69,7 @@ XCOMM
/* #define thefont "-*-courier-*-r-*-*-18-*-*-*-m-*-*-*" */
XCOMM where is the high score file?
XCOMM SCORE = $(LOCAL)/lib/$(APP)
-SCORE = /var/lib/games/$(APP)
-+SCORE = XXXVARBASEXXX/games/$(APP)
++SCORE = @VARBASE@/games/$(APP)
/* to install default gardens not in app_defaults/$(APP)
/* #define InstallDefaultGardens $(SCORE)/gardens */
-@@ -82,7 +82,7 @@
+@@ -82,7 +82,7 @@ XCOMM STD_INCLUDES = -I/usr/include/mit
XCOMM and they require these two libraries changed
XCOMM XLIB = -lXext-mit -lX11-mit
XCOMM required for setuid, try one or the other, (the first is better)
@@ -20,16 +20,51 @@ $NetBSD: patch-aa,v 1.5 2005/09/08 06:30:37 jdc Exp $
XCOMM EXTRA_LOAD_FLAGS = -static
XCOMM some X implementations and openwindows require the maths library
XCOMM MATHSLIB = -lm
-@@ -91,9 +91,9 @@
+@@ -91,9 +91,9 @@ XCOMM install parameters
XCOMM
XCOMM owner and access rights for executable & score directory
XCOMM these are set for a setuid xmris
-OWNER = -o games
-+OWNER = -o bin -g games
-INSTSCOREFLAGS = $(OWNER) -m 755
-+INSTSCOREFLAGS = $(OWNER) -m 575
-INSTMRISFLAGS = $(OWNER) $(INSTUIDFLAGS)
-+INSTMRISFLAGS = $(OWNER) -m 2755
++OWNER =
++INSTSCOREFLAGS =
++INSTMRISFLAGS = $(INSTBINFLAGS)
XCOMM normal install locations
THEBINDIR = $(BINDIR)
THEMANDIR = $(MANDIR)
+@@ -238,9 +238,9 @@ NormalProgramTarget(xmris,$(MRISOBJS),$(
+
+ InstallProgramWithFlags(xmris,$(THEBINDIR),$(INSTMRISFLAGS))
+
+-install :: $(THEBINDIR)/xmris
+- $(RM) $(THEBINDIR)/xmsit
+- $(LN) ./xmris $(THEBINDIR)/xmsit
++install :: $(DESTDIR)$(THEBINDIR)/xmris
++ $(RM) $(DESTDIR)$(THEBINDIR)/xmsit
++ $(LN) ./xmris $(DESTDIR)$(THEBINDIR)/xmsit
+
+ XCOMM xmred build
+ NormalProgramTarget(xmred,$(MREDOBJS) $(WIDGETOBJS),$(DEPLIBS),$(LOCAL_LIBRARIES) -lm,)
+@@ -270,16 +270,16 @@ Xmris.ad : Xmris-ad.src
+
+ XCOMM score directory install
+ install ::
+- MakeDir($(SCORE))
++ MakeDir($(DESTDIR)$(SCORE))
+ @#not all $(INSTALL) have a -d flag, have to do it explicitly
+- @echo installing $(INSTSCOREFLAGS) $(SCORE)
++ @echo installing $(INSTSCOREFLAGS) $(DESTDIR)$(SCORE)
+ @set -- $(INSTSCOREFLAGS) ; \
+ while [ $$# -ne 0 ] ; \
+ do \
+ case "$$1" in \
+- "-o") shift ; chown $$1 $(SCORE) ; echo owner is $$1 ;; \
+- "-m") shift ; chmod $$1 $(SCORE) ;; \
+- "-g") shift ; chgrp $$1 $(SCORE) ; echo group is $$1 ;; \
++ "-o") shift ; chown $$1 $(DESTDIR)$(SCORE) ; echo owner is $$1 ;; \
++ "-m") shift ; chmod $$1 $(DESTDIR)$(SCORE) ;; \
++ "-g") shift ; chgrp $$1 $(DESTDIR)$(SCORE) ; echo group is $$1 ;; \
+ *) echo unknown option '$$1' ;; \
+ esac ; \
+ shift ; \