aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2005-01-22 17:42:14 +0800
committeredwin <edwin@FreeBSD.org>2005-01-22 17:42:14 +0800
commit07bfe64477172d2bb13684b0538abd53d3ee73a1 (patch)
tree0a5b83b5411c27bee0283d39d54c074641eddb57
parent103b9a1ad2f48064b69aab336b8240d36461696c (diff)
downloadfreebsd-ports-gnome-07bfe64477172d2bb13684b0538abd53d3ee73a1.tar.gz
freebsd-ports-gnome-07bfe64477172d2bb13684b0538abd53d3ee73a1.tar.zst
freebsd-ports-gnome-07bfe64477172d2bb13684b0538abd53d3ee73a1.zip
Update port: games/dodgindiamond2 (fix high scores handling)
High scores were not saved when the game was installed from a package: fixed. PR: ports/76559 Submitted by: Jean-Yves Lefort <jylefort@brutele.be>
-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