summaryrefslogtreecommitdiff
path: root/games/lmarbles
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2008-06-14 09:22:40 +0000
committerobache <obache@pkgsrc.org>2008-06-14 09:22:40 +0000
commitdfd412bbd4819a1e06c65a9cd3433670cfb15578 (patch)
treeb7db3522931321f1993c2fa4026b1c9c1aeab018 /games/lmarbles
parentca5abd5af19bfef7dbdb50be9d7b88811cd9411e (diff)
downloadpkgsrc-dfd412bbd4819a1e06c65a9cd3433670cfb15578.tar.gz
Some improvements and fixes
* Store score file under ${VARBASE} and use SETGIDGAME. fixes PR 38910. * Use ascii format data files for !little-endian platforms, suggested in README * Install manuals * Fixes the score file and manual location in man page. * Add DESTDIR support. Bump PKGREVISION.
Diffstat (limited to 'games/lmarbles')
-rw-r--r--games/lmarbles/Makefile43
-rw-r--r--games/lmarbles/PLIST12
2 files changed, 51 insertions, 4 deletions
diff --git a/games/lmarbles/Makefile b/games/lmarbles/Makefile
index efd1c617cf8..32d2e385abe 100644
--- a/games/lmarbles/Makefile
+++ b/games/lmarbles/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2006/06/12 16:28:09 wiz Exp $
+# $NetBSD: Makefile,v 1.11 2008/06/14 09:22:40 obache Exp $
DISTNAME= lmarbles-1.0.7
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=lgames/}
@@ -9,7 +9,46 @@ MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://lgames.sourceforge.net/
COMMENT= Atomix-like puzzle
+PKG_DESTDIR_SUPPORT= user-destdir
+
GNU_CONFIGURE= yes
+PROFILE_DIR= ${VARBASE}/games
+DOC_DIR= ${PREFIX}/share/doc/${PKGBASE}
+EXAMPLES_DIR= ${PREFIX}/share/examples/${PKGBASE}
+
+CONFIGURE_ARGS+= --localstatedir=${PROFILE_DIR}
+
+SUBST_CLASSES+= path
+SUBST_STAGE.path= post-configure
+SUBST_FILES.path= src/lmarbles.6
+SUBST_SED.path+= -e 's;/var/lib/games;${PROFILE_DIR};g'
+SUBST_SED.path+= -e 's;/usr/share/doc/marbles;${DOC_DIR};g'
+
+SETGIDGAME= yes
+SPECIAL_PERMS= bin/lmarbles ${SETGID_GAMES_PERMS}
+REQD_DIRS_PERMS+= ${PROFILE_DIR} ${GAMEOWN} ${GAMEGRP} ${GAMEDIRMODE}
+REQD_FILES_PERMS+= ${EXAMPLES_DIR}/lmarbles.prfs ${PROFILE_DIR}/lmarbles.prfs \
+ ${GAMEOWN} ${GAMEGRP} ${GAMEDATAMODE}
+
+BUILD_DEFS+= VARBASE
+BUILD_DEFS+= GAMEDATAMODE
+BUILD_DEFS+= GAMEMODE
+
+.include "../../mk/endian.mk"
+
+.if ${MACHINE_ENDIAN} != "little"
+CONFIGURE_ARGS+= --enable-ascii
+.endif
+
+post-install:
+ ${INSTALL_DATA_DIR} ${DESTDIR}${DOC_DIR}
+ for d in ${WRKSRC}/src/manual/*; do \
+ ${INSTALL_DATA} $${d} ${DESTDIR}${DOC_DIR}/$${d}; \
+ done
+ ${INSTALL_DATA_DIR} ${DESTDIR}${EXAMPLES_DIR}
+ ${INSTALL_DATA} ${WRKSRC}/src/empty.prfs \
+ ${DESTDIR}${EXAMPLES_DIR}/lmarbles.prfs
+
.include "../../audio/SDL_mixer/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/games/lmarbles/PLIST b/games/lmarbles/PLIST
index 3d33ffabd90..803a4db4a14 100644
--- a/games/lmarbles/PLIST
+++ b/games/lmarbles/PLIST
@@ -1,6 +1,13 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2005/01/12 15:50:18 adam Exp $
+@comment $NetBSD: PLIST,v 1.2 2008/06/14 09:22:40 obache Exp $
bin/lmarbles
man/man6/lmarbles.6
+share/doc/lmarbles/arrow.jpg
+share/doc/lmarbles/arrow2.jpg
+share/doc/lmarbles/crumble.jpg
+share/doc/lmarbles/manual.html
+share/doc/lmarbles/marbles.jpg
+share/doc/lmarbles/teleport.jpg
+share/examples/lmarbles/lmarbles.prfs
share/lmarbles/gfx/board.bmp
share/lmarbles/gfx/f_red.bmp
share/lmarbles/gfx/f_small.bmp
@@ -66,7 +73,6 @@ share/lmarbles/sounds/score.wav
share/lmarbles/sounds/select.wav
share/lmarbles/sounds/stop.wav
share/lmarbles/sounds/teleport.wav
-var/lmarbles.prfs
@dirrm share/lmarbles/sounds
@dirrm share/lmarbles/levels
@dirrm share/lmarbles/gfx/wood
@@ -74,3 +80,5 @@ var/lmarbles.prfs
@dirrm share/lmarbles/gfx/metal
@dirrm share/lmarbles/gfx
@dirrm share/lmarbles
+@dirrm share/examples/lmarbles
+@dirrm share/doc/lmarbles