It is still mode 666, which is wrong (XXX), but this way: - the package will actually install again; - the score file is not overwritten every time you recompile/reinstall. There's also an .if 0 block in the makefile that can be turned on to install the game setgid so the score file can be mode 664. I'm not comfortable turning this on without doing at least a basic audit, and I don't have energy for that at the moment; but it's there and it works if anyone feels inclined to make that tradeoff locally. An alternative approach would be to write and install a setgid scorefile helper program, but that's not really any improvement over making the scores world writeable PKGREVISION -> 8.
52 lines
1.5 KiB
Makefile
52 lines
1.5 KiB
Makefile
# $NetBSD: Makefile,v 1.20 2011/05/06 05:28:39 dholland Exp $
|
|
#
|
|
|
|
DISTNAME= Maelstrom-3.0.5
|
|
PKGNAME= maelstrom-sdl-3.0.5
|
|
PKGREVISION= 8
|
|
CATEGORIES= games x11
|
|
MASTER_SITES= http://www.devolution.com/~slouken/Maelstrom/src/
|
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
|
HOMEPAGE= http://www.devolution.com/~slouken/Maelstrom/
|
|
COMMENT= High resolution version of Asteroids (SDL version)
|
|
|
|
PKG_DESTDIR_SUPPORT= user-destdir
|
|
|
|
CONFLICTS= maelstrom-x11-[0-9]* maelstrom-[0-9]*
|
|
|
|
GNU_CONFIGURE= YES
|
|
USE_LANGUAGES= c c++
|
|
USE_GAMESGROUP= yes
|
|
|
|
MAKE_ENV+= CP=${CP:Q}
|
|
|
|
.if 0
|
|
# setgid
|
|
CFLAGS+= -DMAELSTROM_SETGID
|
|
SPECIAL_PERMS+= ${PREFIX}/bin/Maelstrom ${SETGID_GAMES_PERMS}
|
|
SCOREFILE_PERMS= ${GAMEDATA_PERMS}
|
|
.else
|
|
# not setgid, world-writeable score file (XXX)
|
|
SCOREFILE_PERMS= games games 666
|
|
.endif
|
|
BUILD_DEFS+= SCOREFILE_PERMS
|
|
|
|
# Put scorefile in VARBASE.
|
|
SCOREDIR= ${VARBASE}/games
|
|
SCOREFILE= ${SCOREDIR}/Maelstrom-Scores
|
|
ORIGSCOREFILE= ${PREFIX}/share/Maelstrom/Maelstrom-Scores
|
|
REQD_FILES_PERMS+= ${ORIGSCOREFILE} ${SCOREFILE} ${SCOREFILE_PERMS}
|
|
CFLAGS+= -DMAELSTROM_SCOREDIR=\"${SCOREDIR:Q}\"
|
|
BUILD_DEFS+= VARBASE SCOREFILE
|
|
|
|
post-install:
|
|
${RM} ${DESTDIR}${PREFIX}/share/doc/Maelstrom/Docs/Makefile \
|
|
${DESTDIR}${PREFIX}/share/doc/Maelstrom/Docs/Makefile.in \
|
|
${DESTDIR}${PREFIX}/share/Maelstrom/Images/Makefile \
|
|
${DESTDIR}${PREFIX}/share/Maelstrom/Images/Makefile.in
|
|
|
|
.include "../../devel/SDL/buildlink3.mk"
|
|
.include "../../net/SDL_net/buildlink3.mk"
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|