aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2005-01-22 17:43:01 +0800
committeredwin <edwin@FreeBSD.org>2005-01-22 17:43:01 +0800
commit0d5a409b6f2f6018ccd5717352272c2b4b0ab9db (patch)
treec81b68d1a058e9cf2c829fa6021608aba857556e /games
parent07bfe64477172d2bb13684b0538abd53d3ee73a1 (diff)
downloadfreebsd-ports-graphics-0d5a409b6f2f6018ccd5717352272c2b4b0ab9db.tar.gz
freebsd-ports-graphics-0d5a409b6f2f6018ccd5717352272c2b4b0ab9db.tar.zst
freebsd-ports-graphics-0d5a409b6f2f6018ccd5717352272c2b4b0ab9db.zip
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>
Diffstat (limited to 'games')
-rw-r--r--games/urban/Makefile9
-rw-r--r--games/urban/pkg-install11
2 files changed, 14 insertions, 6 deletions
diff --git a/games/urban/Makefile b/games/urban/Makefile
index a2582a39108..c241c927617 100644
--- a/games/urban/Makefile
+++ b/games/urban/Makefile
@@ -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>
diff --git a/games/urban/pkg-install b/games/urban/pkg-install
new file mode 100644
index 00000000000..722be32d91b
--- /dev/null
+++ b/games/urban/pkg-install
@@ -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