summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorrillig <rillig>2005-10-07 10:20:49 +0000
committerrillig <rillig>2005-10-07 10:20:49 +0000
commite85cc4badf6d994a1467fe1319a720475a1dc894 (patch)
tree8ed717c9353cb03c7647cdf53a50f0fd759083a6 /games
parent2c78baa0acfbf257f2bf05bcce6178543750cbea (diff)
downloadpkgsrc-e85cc4badf6d994a1467fe1319a720475a1dc894.tar.gz
Switched the package to using the PKG_INSTALL framework. The actual
binary has been made a SETGIDGAME to make the highscore file editable from only within the game. Bumped PKGREVISION.
Diffstat (limited to 'games')
-rw-r--r--games/xscrabble/Makefile38
-rw-r--r--games/xscrabble/PLIST4
2 files changed, 17 insertions, 25 deletions
diff --git a/games/xscrabble/Makefile b/games/xscrabble/Makefile
index 5bbbba19136..a368bec87e6 100644
--- a/games/xscrabble/Makefile
+++ b/games/xscrabble/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2005/08/23 02:34:26 dmcmahill Exp $
+# $NetBSD: Makefile,v 1.15 2005/10/07 10:20:49 rillig Exp $
#
DISTNAME= xscrabble-1.0
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= games x11
MASTER_SITES= ${MASTER_SITE_LOCAL}
@@ -15,32 +15,26 @@ USE_PKGINSTALL= YES
INSTALLATION_DIRS= bin lib/X11/app-defaults
-XSCRABBLE_GROUP?= games
-PKG_GROUPS= ${XSCRABBLE_GROUP}
+SUBST_CLASSES+= xscrabble
+SUBST_FILES.xscrabble= XScrabble.ad
+SUBST_STAGE.xscrabble= pre-configure
+SUBST_SED.xscrabble= -e 's,/usr/local/lib/xscrabble\.scores,${VARBASE}/games/xscrabble.scores,g'
+SUBST_SED.xscrabble+= -e 's,/usr/local/lib,${PREFIX}/share/games/xscrabble,g'
-post-patch:
- ${SED} 's!/usr/local/lib!${PREFIX}/share/games/xscrabble!g' \
- ${WRKSRC}/XScrabble.ad > ${WRKSRC}/XScrabble
+MAKE_DIRS= ${VARBASE}/games
+EGDIR= ${PREFIX}/share/games/xscrabble
+CONF_FILES_PERMS= ${EGDIR}/xscrabble.scores.dist ${VARBASE}/games/xscrabble.scores ${GAMEOWN} ${GAMEGRP} ${GAMEDATAMODE}
+SETGIDGAME= yes
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/xscrabble ${PREFIX}/bin
- ${INSTALL_PROGRAM} ${WRKSRC}/src/xscrab ${PREFIX}/bin
+ ${INSTALL_GAME} ${WRKSRC}/src/xscrab ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PREFIX}/share/games
${INSTALL_DATA_DIR} ${PREFIX}/share/games/xscrabble
- ${INSTALL_DATA} ${WRKSRC}/OSPD3.gz ${PREFIX}/share/games/xscrabble
- ${INSTALL_DATA} ${WRKSRC}/scrabble_permutations ${PREFIX}/share/games/xscrabble
- ${INSTALL_DATA} ${WRKSRC}/xscrabble.scores ${PREFIX}/share/games/xscrabble/xscrabble.scores.dist
- ${CHOWN} ${BINOWN}:${XSCRABBLE_GROUP} ${PREFIX}/share/games/xscrabble/xscrabble.scores.dist
- ${CHMOD} 0664 ${PREFIX}/share/games/xscrabble/xscrabble.scores.dist
- ${INSTALL_DATA} ${WRKSRC}/XScrabble ${PREFIX}/lib/X11/app-defaults
- @if [ ! -d /var/games ]; then \
- ${MKDIR} -p /var/games ; \
- ${CHMOD} 0775 /var/games ; \
- fi
- @if [ ! -f /var/games/xscrabble.scores ]; then \
- ${CP} -p ${PREFIX}/share/games/xscrabble/xscrabble.scores.dist \
- /var/games/xscrabble.scores ; \
- fi
+ ${INSTALL_DATA} ${WRKSRC}/OSPD3.gz ${EGDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/scrabble_permutations ${EGDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/xscrabble.scores ${EGDIR}/xscrabble.scores.dist
+ ${INSTALL_DATA} ${WRKSRC}/XScrabble.ad ${PREFIX}/lib/X11/app-defaults/XScrabble
.include "../../graphics/xpm/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/games/xscrabble/PLIST b/games/xscrabble/PLIST
index 12b40f24523..49c7f6220a1 100644
--- a/games/xscrabble/PLIST
+++ b/games/xscrabble/PLIST
@@ -1,10 +1,8 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 00:57:55 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2005/10/07 10:20:49 rillig Exp $
bin/xscrabble
bin/xscrab
lib/X11/app-defaults/XScrabble
share/games/xscrabble/OSPD3.gz
share/games/xscrabble/scrabble_permutations
share/games/xscrabble/xscrabble.scores.dist
-@exec if [ ! -f /var/games/xscrabble.scores ]; then cp -p %D/share/games/xscrabble/xscrabble.scores.dist /var/games/xscrabble.scores; fi
-@unexec echo "Warning: If you will *NOT* use this package anymore, please remove /var/games/xscrabble.scores manually."
@dirrm share/games/xscrabble