diff options
-rw-r--r-- | games/sokoban/Makefile | 6 | ||||
-rw-r--r-- | games/sokoban/files/patch-ab | 2 | ||||
-rw-r--r-- | games/sokoban/pkg-install | 9 | ||||
-rw-r--r-- | games/sokoban/pkg-plist | 1 |
4 files changed, 11 insertions, 7 deletions
diff --git a/games/sokoban/Makefile b/games/sokoban/Makefile index ba898f311bba..e55efeed6aa0 100644 --- a/games/sokoban/Makefile +++ b/games/sokoban/Makefile @@ -26,10 +26,6 @@ do-install: @ ${MKDIR} ${PREFIX}/share/sokoban/screens @ ${CHOWN} root:games ${PREFIX}/share/sokoban/screens @ ${INSTALL_DATA} ${WRKSRC}/screens/* ${PREFIX}/share/sokoban/screens - @ if [ ! -f ${PREFIX}/share/sokoban/highscore ]; then \ - dd if=/dev/zero of=${PREFIX}/share/sokoban/highscore bs=1 count=2; \ - fi - @ ${CHOWN} root:games ${PREFIX}/share/sokoban/highscore - @ ${CHMOD} 0600 ${PREFIX}/share/sokoban/highscore + @ ${SH} pkg-install ${PKGNAME} POST-INSTALL .include <bsd.port.mk> diff --git a/games/sokoban/files/patch-ab b/games/sokoban/files/patch-ab index ffdb5d958529..95e56f7e3de5 100644 --- a/games/sokoban/files/patch-ab +++ b/games/sokoban/files/patch-ab @@ -11,7 +11,7 @@ + #define SCREENPATH PREFIX "/share/sokoban/screens" + #define SAVEPATH PREFIX "/share/sokoban" + #define LOCKFILE "/tmp/sok.tmp" -+ #define SCOREFILE PREFIX "/share/sokoban/highscore" ++ #define SCOREFILE "/var/games/sokoban" + #else + /**/ diff --git a/games/sokoban/pkg-install b/games/sokoban/pkg-install new file mode 100644 index 000000000000..9587d65b8106 --- /dev/null +++ b/games/sokoban/pkg-install @@ -0,0 +1,9 @@ +#!/bin/sh + +FILE="/var/games/sokoban" +[ "$2" != "POST-INSTALL" -o -f "$FILE" ] && exit 0 + +echo "===> Creating initial high score file $FILE" +dd if=/dev/zero of=$FILE bs=1 count=2 +chmod 664 $FILE +chown root.games $FILE diff --git a/games/sokoban/pkg-plist b/games/sokoban/pkg-plist index 7dd05002ac3c..2bb8ba417136 100644 --- a/games/sokoban/pkg-plist +++ b/games/sokoban/pkg-plist @@ -1,5 +1,4 @@ bin/sokoban -share/sokoban/highscore share/sokoban/screens/sokoban.help share/sokoban/screens/screen.1 share/sokoban/screens/screen.2 |