From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Aug 10 09:20:10 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC68816A420 for ; Wed, 10 Aug 2005 09:20:10 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF65343D58 for ; Wed, 10 Aug 2005 09:20:08 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7A9K8Qr089657 for ; Wed, 10 Aug 2005 09:20:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7A9K8us089656; Wed, 10 Aug 2005 09:20:08 GMT (envelope-from gnats) Resent-Date: Wed, 10 Aug 2005 09:20:08 GMT Resent-Message-Id: <200508100920.j7A9K8us089656@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jean-Yves Lefort Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 592D016A41F for ; Wed, 10 Aug 2005 09:13:33 +0000 (GMT) (envelope-from jylefort@brutele.be) Received: from 212.68.242.136.brutele.be (212.68.242.136.brutele.be [212.68.242.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8890343D53 for ; Wed, 10 Aug 2005 09:13:32 +0000 (GMT) (envelope-from jylefort@brutele.be) Received: from jsite.lefort.net (jsite.lefort.net [192.168.1.2]) by gateway.lefort.net (Postfix) with ESMTP id A4178551E for ; Wed, 10 Aug 2005 11:13:30 +0200 (CEST) Received: by jsite.lefort.net (Postfix, from userid 1000) id 5345DC2D1; Wed, 10 Aug 2005 11:13:30 +0200 (CEST) Message-Id: <20050810091330.5345DC2D1@jsite.lefort.net> Date: Wed, 10 Aug 2005 11:13:30 +0200 (CEST) From: Jean-Yves Lefort To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/84738: Update port: games/dsnake (misc fixes) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jean-Yves Lefort List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2005 09:20:10 -0000 >Number: 84738 >Category: ports >Synopsis: Update port: games/dsnake (misc fixes) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Aug 10 09:20:08 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Jean-Yves Lefort >Release: FreeBSD 5.4-RELEASE i386 >Organization: >Environment: System: FreeBSD jsite.lefort.net 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Wed Jul 27 11:27:58 CEST 2005 jylefort@jsite.lefort.net:/usr/obj/usr/src/sys/JSITE i386 >Description: - Also create scores and configuration when installing from a package - Preserve modified scores and configuration across updates - Install using ${INSTALL_xxx}, to ensure proper permissions and ownerships - Pass command-line arguments through the wrapper script - Replace the shell process with the game, to save some memory while playing - Install documentation in ${DOCSDIR}, and respect ${NOPORTDOCS} >How-To-Repeat: >Fix: diff -ruN /usr/ports/games/dsnake/Makefile dsnake/Makefile --- /usr/ports/games/dsnake/Makefile Sat Jun 18 00:59:09 2005 +++ dsnake/Makefile Wed Aug 10 10:50:43 2005 @@ -7,7 +7,7 @@ PORTNAME= dsnake PORTVERSION= 3.0.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= games linux MASTER_SITES= http://bitblaze.com/downloads/ DISTNAME= ${PORTNAME}-linux-${PORTVERSION} @@ -24,16 +24,27 @@ USE_X_PREFIX= yes WRKSRC= ${WRKDIR}/DeluxeSnake +SUB_FILES= pkg-install pkg-deinstall +SUB_LIST= CONFIG_FILES="config.dat hiscores.dat stats.dat" + +PORTDOCS= * + do-build: ${BRANDELF} -t Linux ${WRKSRC}/dsnake do-install: - ${MKDIR} ${DATADIR} - (cd ${WRKSRC}; ${TAR} -cf - *) | (cd ${DATADIR}; ${TAR} -xf -) - ${TOUCH} ${DATADIR}/config.dat ${DATADIR}/hiscores.dat ${DATADIR}/stats.dat - ${CHMOD} 0666 ${DATADIR}/config.dat ${DATADIR}/hiscores.dat ${DATADIR}/stats.dat +.for d in data midi + ${MKDIR} ${DATADIR}/${d} + ${INSTALL_DATA} ${WRKSRC}/${d}/* ${DATADIR}/${d} +.endfor + ${INSTALL_PROGRAM} ${WRKSRC}/dsnake ${DATADIR} ${ECHO_CMD} "#!/bin/sh" > ${WRKDIR}/dsnake.sh - ${ECHO_CMD} "cd ${DATADIR} && ./dsnake -win" >> ${WRKDIR}/dsnake.sh + ${ECHO_CMD} "cd ${DATADIR} && exec ./dsnake \"\$$@\"" >> ${WRKDIR}/dsnake.sh ${INSTALL_SCRIPT} ${WRKDIR}/dsnake.sh ${PREFIX}/bin/dsnake +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/ReadMe.txt ${DOCSDIR} +.endif + @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include diff -ruN /usr/ports/games/dsnake/files/pkg-deinstall.in dsnake/files/pkg-deinstall.in --- /usr/ports/games/dsnake/files/pkg-deinstall.in Thu Jan 1 01:00:00 1970 +++ dsnake/files/pkg-deinstall.in Wed Aug 10 10:20:00 2005 @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ "$2" = "DEINSTALL" ]; then + for f in %%CONFIG_FILES%%; do + if [ ! -s %%DATADIR%%/$f ]; then + rm -f %%DATADIR%%/$f + fi + done +fi diff -ruN /usr/ports/games/dsnake/files/pkg-install.in dsnake/files/pkg-install.in --- /usr/ports/games/dsnake/files/pkg-install.in Thu Jan 1 01:00:00 1970 +++ dsnake/files/pkg-install.in Wed Aug 10 10:48:06 2005 @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ "$2" = "POST-INSTALL" ]; then + for f in %%CONFIG_FILES%%; do + if [ ! -f %%DATADIR%%/$f ]; then + touch %%DATADIR%%/$f + chown root:wheel %%DATADIR%%/$f + chmod 666 %%DATADIR%%/$f + fi + done +fi diff -ruN /usr/ports/games/dsnake/pkg-plist dsnake/pkg-plist --- /usr/ports/games/dsnake/pkg-plist Sun Nov 23 00:00:50 2003 +++ dsnake/pkg-plist Wed Aug 10 10:51:38 2005 @@ -1,5 +1,4 @@ bin/dsnake -%%DATADIR%%/config.dat %%DATADIR%%/data/fonts.dat %%DATADIR%%/data/logos.dat %%DATADIR%%/data/sfx.dat @@ -7,12 +6,9 @@ %%DATADIR%%/data/sprites2.dat %%DATADIR%%/data/textures.dat %%DATADIR%%/dsnake -%%DATADIR%%/hiscores.dat %%DATADIR%%/midi/fall.mid %%DATADIR%%/midi/partille.mid %%DATADIR%%/midi/The_Jayomon_Beat.mid -%%DATADIR%%/ReadMe.txt -%%DATADIR%%/stats.dat @dirrm %%DATADIR%%/midi @dirrm %%DATADIR%%/data -@dirrm %%DATADIR%% +@unexec rmdir %D/%%DATADIR%% 2>/dev/null || true >Release-Note: >Audit-Trail: >Unformatted: