1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

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>
This commit is contained in:
Edwin Groothuis 2005-01-22 09:42:14 +00:00
parent 4982f90ea0
commit d58dc6c290
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=127086
2 changed files with 13 additions and 4 deletions

View File

@ -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}
@ -31,12 +32,9 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/src/data/dd2.cfg ${PREFIX}/etc/dd2.cfg.sample
.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>

View File

@ -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