aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoradamw <adamw@FreeBSD.org>2014-07-24 23:49:33 +0800
committeradamw <adamw@FreeBSD.org>2014-07-24 23:49:33 +0800
commit124cdc05df39823e68ffaea0943443acf2be5bc0 (patch)
tree945e25e5c9a8ae5579eeb9d0fa403410f71ec712 /games
parent2d846644ee011741bf16d9b5d41f2110d4d4fea8 (diff)
downloadfreebsd-ports-gnome-124cdc05df39823e68ffaea0943443acf2be5bc0.tar.gz
freebsd-ports-gnome-124cdc05df39823e68ffaea0943443acf2be5bc0.tar.zst
freebsd-ports-gnome-124cdc05df39823e68ffaea0943443acf2be5bc0.zip
This port was not stage-safe as it was making direct writes to /var. Fix that,
along with making do-install substantially easier to read. While here, stop muting the build command.
Diffstat (limited to 'games')
-rw-r--r--games/greed/Makefile9
-rw-r--r--games/greed/pkg-plist4
2 files changed, 8 insertions, 5 deletions
diff --git a/games/greed/Makefile b/games/greed/Makefile
index 121638296222..9125f08806a7 100644
--- a/games/greed/Makefile
+++ b/games/greed/Makefile
@@ -15,16 +15,15 @@ LICENSE= BSD3CLAUSE
SCOREFILE?= /var/games/greed.hs
CFLAGS+= -DSCOREFILE=\"${SCOREFILE}\" -DNOTBSD -DRELEASE=\"${PORTVERSION}\"
LDFLAGS+= -lcurses
+PLIST_SUB+= SCOREFILE=${SCOREFILE:S|^/||}
do-build:
- @cd ${WRKSRC}&&${CC} ${CFLAGS} -o greed greed.c ${LDFLAGS}
+ (cd ${WRKSRC} && ${CC} ${CFLAGS} -o greed greed.c ${LDFLAGS})
do-install:
${INSTALL_PROGRAM} -m 2555 -o root -g games ${WRKSRC}/greed ${STAGEDIR}${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/greed.6 ${STAGEDIR}${MAN6PREFIX}/man/man6/
- @a=${SCOREFILE};[ -f $$a ]||:>$$a&&${CHOWN} root:games $$a&&${CHMOD} 664 $$a
- @${ECHO_CMD} '@exec a=${SCOREFILE};[ -f $$a ]||:>$$a&&\
- ${CHOWN} root:games $$a&&${CHMOD} 664 $$a' >> ${TMPPLIST}
- @${ECHO_CMD} '@unexec a=${SCOREFILE};[ -s $$a ]||${RM} -f $$a' >> ${TMPPLIST}
+ @${MKDIR} ${STAGEDIR}${SCOREFILE:H}
+ ${TOUCH} ${STAGEDIR}${SCOREFILE}.sample
.include <bsd.port.mk>
diff --git a/games/greed/pkg-plist b/games/greed/pkg-plist
index 38781473fda5..2974cd9dd8b7 100644
--- a/games/greed/pkg-plist
+++ b/games/greed/pkg-plist
@@ -1,2 +1,6 @@
bin/greed
man/man6/greed.6.gz
+@cwd /
+@group games
+@mode 664
+@sample %%SCOREFILE%%.sample