1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

Stage, and move pkg-install into the plist to handle modifying

files outside of $PREFIX correctly.
This commit is contained in:
Adam Weinberger 2014-07-24 16:24:05 +00:00
parent 3fb74cec5b
commit 1aa0ed2947
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=362826
3 changed files with 12 additions and 16 deletions

View File

@ -23,13 +23,9 @@ USE_XORG= xpm
ALL_TARGET= xrot ALL_TARGET= xrot
CFLAGS+= -Wno-return-type CFLAGS+= -Wno-return-type
PLIST_FILES= bin/xrot
NO_STAGE= yes
do-install: do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xrot ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/xrot ${STAGEDIR}${PREFIX}/bin
${CHOWN} root:games ${PREFIX}/bin/xrot @${MKDIR} ${STAGEDIR}/var/games
${CHMOD} g+s ${PREFIX}/bin/xrot ${TOUCH} ${STAGEDIR}/var/games/xrot.scores.sample
${SH} pkg-install ${PKGNAME} POST-INSTALL
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -1,9 +0,0 @@
#!/bin/sh
FILE="/var/games/xrot.scores"
[ "$2" != "POST-INSTALL" -o -f "$FILE" ] && exit 0
echo "===> Creating initial high score file $FILE"
touch $FILE
chown root:games $FILE
chmod 664 $FILE

9
games/xrot/pkg-plist Normal file
View File

@ -0,0 +1,9 @@
@group games
@mode 3755
bin/xrot
@mode
@cwd /
@sample var/games/xrot.scores.sample
@exec chmod 664 %B/%f
@group
@dirrmtry var/games