aboutsummaryrefslogtreecommitdiffstats
path: root/games/sokoban
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2014-10-08 07:26:11 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2014-10-08 07:26:11 +0800
commit356dba270c9a47318e6717aff105e385df5b73a3 (patch)
tree90d65c9f70f7bdc29a2d914ce39a353aba2b15cd /games/sokoban
parent6180127b2a8b890c98516803efa860b89e22dd4e (diff)
downloadfreebsd-ports-gnome-356dba270c9a47318e6717aff105e385df5b73a3.tar.gz
freebsd-ports-gnome-356dba270c9a47318e6717aff105e385df5b73a3.tar.zst
freebsd-ports-gnome-356dba270c9a47318e6717aff105e385df5b73a3.zip
- Use new pkg plist-related features
- Move highscore file into /var/games PR: 193852 Submitted by: lifanov@mail.lifanov.com (maintainer)
Diffstat (limited to 'games/sokoban')
-rw-r--r--games/sokoban/Makefile6
-rw-r--r--games/sokoban/files/patch-sokoban.h8
-rw-r--r--games/sokoban/pkg-plist14
3 files changed, 12 insertions, 16 deletions
diff --git a/games/sokoban/Makefile b/games/sokoban/Makefile
index a461c14a47dc..7df317bac0bd 100644
--- a/games/sokoban/Makefile
+++ b/games/sokoban/Makefile
@@ -3,7 +3,7 @@
PORTNAME= sokoban
PORTVERSION= 1.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= games/strategy
@@ -20,4 +20,8 @@ do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}/screens
@${INSTALL_DATA} ${WRKSRC}/screens/* ${STAGEDIR}${DATADIR}/screens
+post-install:
+ @${MKDIR} ${STAGEDIR}/var/games/sokoban
+ @truncate -s 512 ${STAGEDIR}/var/games/sokoban/scores.sample
+
.include <bsd.port.mk>
diff --git a/games/sokoban/files/patch-sokoban.h b/games/sokoban/files/patch-sokoban.h
index 5c4651705d4c..a5e9e1a15dba 100644
--- a/games/sokoban/files/patch-sokoban.h
+++ b/games/sokoban/files/patch-sokoban.h
@@ -1,5 +1,5 @@
---- ./sokoban.h.orig 1992-05-15 01:15:26.000000000 -0400
-+++ ./sokoban.h 2014-03-11 22:16:45.005739636 -0400
+--- sokoban.h.orig 1992-05-15 05:15:26 UTC
++++ sokoban.h
@@ -1,6 +1,14 @@
/***********************************************************************
You may wish to alter the following directory paths
@@ -7,9 +7,9 @@
+
+#ifdef PREFIX
+#define SCREENPATH PREFIX "/share/sokoban/screens"
-+#define SAVEPATH PREFIX "/share/sokoban"
++#define SAVEPATH "/var/games/sokoban"
+#define LOCKFILE "/tmp/sok.tmp"
-+#define SCOREFILE "/var/games/sokoban"
++#define SCOREFILE "/var/games/sokoban/scores"
+#else
+
/**/
diff --git a/games/sokoban/pkg-plist b/games/sokoban/pkg-plist
index 4eff945b4e69..a6ddd19a3fea 100644
--- a/games/sokoban/pkg-plist
+++ b/games/sokoban/pkg-plist
@@ -1,11 +1,6 @@
-@group games
-@mode 2555
-bin/sokoban
-@group
-@mode
-@exec truncate -s 512B /var/games/sokoban
-@exec chgrp games /var/games/sokoban
-@exec chmod 0664 /var/games/sokoban
+@(root,games,2555) bin/sokoban
+@dir(root,games,0775) /var/games/sokoban
+@sample(root,games,0664) /var/games/sokoban/scores.sample
%%DATADIR%%/screens/sokoban.help
%%DATADIR%%/screens/screen.1
%%DATADIR%%/screens/screen.2
@@ -57,6 +52,3 @@ bin/sokoban
%%DATADIR%%/screens/screen.48
%%DATADIR%%/screens/screen.49
%%DATADIR%%/screens/screen.50
-@dirrm %%DATADIR%%/screens
-@dirrm %%DATADIR%%
-@unexec rm -f /var/games/sokoban