ports/76559: Update port: games/dodgindiamond2 (fix high scores handling)

Jean-Yves Lefort jylefort at brutele.be
Sat Jan 22 01:40:15 UTC 2005


>Number:         76559
>Category:       ports
>Synopsis:       Update port: games/dodgindiamond2 (fix high scores handling)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 22 01:40:14 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Jean-Yves Lefort
>Release:        FreeBSD 5.3-RELEASE i386
>Organization:
>Environment:
System: FreeBSD jsite.lefort.net 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Thu Dec 2 15:08:28 CET 2004 jylefort at jsite.lefort.net:/usr/obj/usr/src/sys/JSITE i386
>Description:
High scores were not saved when the game was installed from a package:
fixed.

Added file: pkg-install
>How-To-Repeat:
>Fix:
diff -ruN /usr/ports/games/dodgindiamond2/Makefile dodgindiamond2/Makefile
--- /usr/ports/games/dodgindiamond2/Makefile	Sat Jul 17 17:53:26 2004
+++ dodgindiamond2/Makefile	Sat Jan 22 02:26:57 2005
@@ -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 @@
 .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 -ruN /usr/ports/games/dodgindiamond2/pkg-install dodgindiamond2/pkg-install
--- /usr/ports/games/dodgindiamond2/pkg-install	Thu Jan  1 01:00:00 1970
+++ dodgindiamond2/pkg-install	Sat Jan 22 02:23:57 2005
@@ -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
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list