summaryrefslogtreecommitdiff
path: root/games/xscrabble/Makefile
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-10-07 10:20:49 +0000
committerrillig <rillig@pkgsrc.org>2005-10-07 10:20:49 +0000
commit592d652a1456e3c50a4b077e70e25848600b4a8b (patch)
tree8ed717c9353cb03c7647cdf53a50f0fd759083a6 /games/xscrabble/Makefile
parente4c254dd181fdfc469f47d4d39fc0357d6c94baa (diff)
downloadpkgsrc-592d652a1456e3c50a4b077e70e25848600b4a8b.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/xscrabble/Makefile')
-rw-r--r--games/xscrabble/Makefile38
1 files changed, 16 insertions, 22 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"