aboutsummaryrefslogtreecommitdiff
path: root/games/dodgindiamond2
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2005-01-22 09:42:14 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2005-01-22 09:42:14 +0000
commitd58dc6c290af199b20cd11063562a3d3bddbcbc4 (patch)
treebda9615d3d0859af241b8b0ee9e4b77431007e54 /games/dodgindiamond2
parent4982f90ea0527b180b5616a2ae3bcbad4202c5e8 (diff)
downloadports-d58dc6c290af199b20cd11063562a3d3bddbcbc4.tar.gz
ports-d58dc6c290af199b20cd11063562a3d3bddbcbc4.zip
Notes
Diffstat (limited to 'games/dodgindiamond2')
-rw-r--r--games/dodgindiamond2/Makefile6
-rw-r--r--games/dodgindiamond2/pkg-install11
2 files changed, 13 insertions, 4 deletions
diff --git a/games/dodgindiamond2/Makefile b/games/dodgindiamond2/Makefile
index cd1ef6185bf5..089f9779f4a8 100644
--- a/games/dodgindiamond2/Makefile
+++ b/games/dodgindiamond2/Makefile
@@ -7,6 +7,7 @@
PORTNAME= dodgindiamond2
PORTVERSION= 0.2.1
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= http://www.usebox.net/jjm/dd2/releases/
DISTNAME= dd2-${PORTVERSION}
@@ -32,11 +33,8 @@ post-install:
.if !exists(${PREFIX}/etc/dd2.cfg)
${INSTALL_DATA} ${WRKSRC}/src/data/dd2.cfg ${PREFIX}/etc
.endif
-.if !exists(/var/games/dd2-hiscore)
- ${MKDIR} /var/games
- ${INSTALL} -g games -m 664 ${WRKSRC}/src/data/dd2-hiscore /var/games
-.endif
${CHGRP} games ${PREFIX}/bin/dd2
${CHMOD} g+s ${PREFIX}/bin/dd2
+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>
diff --git a/games/dodgindiamond2/pkg-install b/games/dodgindiamond2/pkg-install
new file mode 100644
index 000000000000..aad6adcbe46f
--- /dev/null
+++ b/games/dodgindiamond2/pkg-install
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+SCOREDIR="/var/games"
+SCOREFILE="/var/games/dd2-hiscore"
+
+[ "$2" != "POST-INSTALL" -o -f "$SCOREFILE" ] && exit 0
+
+mkdir -p $SCOREDIR
+touch $SCOREFILE
+chown root:games $SCOREFILE
+chmod 664 $SCOREFILE