aboutsummaryrefslogtreecommitdiffstats
path: root/games/xrot
diff options
context:
space:
mode:
authoradamw <adamw@FreeBSD.org>2014-07-25 00:24:05 +0800
committeradamw <adamw@FreeBSD.org>2014-07-25 00:24:05 +0800
commiteddbf12059e41184d100338c621a47f09dd9db8d (patch)
treeb023d66b46b1079f6414289feb213a90efe9fbfc /games/xrot
parentf9af7f8362fbcf7f0765ab412cef599f6d3ec821 (diff)
downloadfreebsd-ports-gnome-eddbf12059e41184d100338c621a47f09dd9db8d.tar.gz
freebsd-ports-gnome-eddbf12059e41184d100338c621a47f09dd9db8d.tar.zst
freebsd-ports-gnome-eddbf12059e41184d100338c621a47f09dd9db8d.zip
Stage, and move pkg-install into the plist to handle modifying
files outside of $PREFIX correctly.
Diffstat (limited to 'games/xrot')
-rw-r--r--games/xrot/Makefile10
-rw-r--r--games/xrot/pkg-install9
-rw-r--r--games/xrot/pkg-plist9
3 files changed, 12 insertions, 16 deletions
diff --git a/games/xrot/Makefile b/games/xrot/Makefile
index 7846ff8b52bf..7ecf5380aeb7 100644
--- a/games/xrot/Makefile
+++ b/games/xrot/Makefile
@@ -23,13 +23,9 @@ USE_XORG= xpm
ALL_TARGET= xrot
CFLAGS+= -Wno-return-type
-PLIST_FILES= bin/xrot
-
-NO_STAGE= yes
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/xrot ${PREFIX}/bin
- ${CHOWN} root:games ${PREFIX}/bin/xrot
- ${CHMOD} g+s ${PREFIX}/bin/xrot
- ${SH} pkg-install ${PKGNAME} POST-INSTALL
+ ${INSTALL_PROGRAM} ${WRKSRC}/xrot ${STAGEDIR}${PREFIX}/bin
+ @${MKDIR} ${STAGEDIR}/var/games
+ ${TOUCH} ${STAGEDIR}/var/games/xrot.scores.sample
.include <bsd.port.mk>
diff --git a/games/xrot/pkg-install b/games/xrot/pkg-install
deleted file mode 100644
index 97b40ce47230..000000000000
--- a/games/xrot/pkg-install
+++ /dev/null
@@ -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
diff --git a/games/xrot/pkg-plist b/games/xrot/pkg-plist
new file mode 100644
index 000000000000..ea01ae43cbd6
--- /dev/null
+++ b/games/xrot/pkg-plist
@@ -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