1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

Update port: games/urban (fix high scores handling)

High scores were not saved when the game was installed from
	a package.

PR:		ports/76560
Submitted by:	Jean-Yves Lefort <jylefort@brutele.be>
This commit is contained in:
Edwin Groothuis 2005-01-22 09:43:01 +00:00
parent d58dc6c290
commit 39bca21123
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=127087
2 changed files with 14 additions and 6 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= urban
PORTVERSION= 1.5.3
PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= http://urban.bengburken.net/files/linux/
DIST_SUBDIR= urban
@ -17,14 +18,12 @@ COMMENT= A bloody, violent sidescrolling shoot-em-up
LIB_DEPENDS= ggi:${PORTSDIR}/graphics/libggi \
mikmod:${PORTSDIR}/audio/libmikmod
SCOREFILE= /var/games/urban.scores
USE_X_PREFIX= yes
GNU_CONFIGURE= yes
CFLAGS+= ${PTHREAD_CFLAGS}
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
CONFIGURE_ARGS= --with-global-highscore=${SCOREFILE}
CONFIGURE_ARGS= --with-global-highscore=/var/games/urban.scores
OPTIONS= CHEAT_CODES "Enable cheat codes" off
@ -35,9 +34,6 @@ CONFIGURE_ARGS+= --enable-cheat-codes
.endif
post-install:
${TOUCH} ${SCOREFILE}
${CHGRP} games ${SCOREFILE}
${CHMOD} g+w ${SCOREFILE}
${CHGRP} games ${PREFIX}/bin/urban
${CHMOD} g+s ${PREFIX}/bin/urban
.if !defined(NOPORTDOCS)
@ -50,6 +46,7 @@ post-install:
${WRKSRC}/README.swe \
${DOCSDIR}
.endif
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

11
games/urban/pkg-install Normal file
View File

@ -0,0 +1,11 @@
#!/bin/sh
SCOREDIR="/var/games"
SCOREFILE="/var/games/urban.scores"
[ "$2" != "POST-INSTALL" -o -f "$SCOREFILE" ] && exit 0
mkdir -p $SCOREDIR
touch $SCOREFILE
chown root:games $SCOREFILE
chmod 664 $SCOREFILE