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:
parent
4982f90ea0
commit
d58dc6c290
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=127086
@ -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>
|
||||
|
11
games/dodgindiamond2/pkg-install
Normal file
11
games/dodgindiamond2/pkg-install
Normal 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
|
Loading…
Reference in New Issue
Block a user