Date: Fri, 3 Aug 2012 00:19:39 GMT From: nemysis <nemysis@gmx.ch> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/170343: [PATCH] games/monsterz Version 0.7.1_4 install in wrong Directories Message-ID: <201208030019.q730Jdek013198@red.freebsd.org> Resent-Message-ID: <201208030020.q730KJxe040325@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 170343 >Category: ports >Synopsis: [PATCH] games/monsterz Version 0.7.1_4 install in wrong Directories >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Aug 03 00:20:19 UTC 2012 >Closed-Date: >Last-Modified: >Originator: nemysis >Release: FreeBSD 9.0-RELEASE amd64 >Organization: >Environment: FreeBSD FreeBSD_Ports 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC >Description: Monsterz Version 0.7.1_4 install in wrong Directories /usr/local/games/monsterz /usr/local/share/games/monsterz and with symlink ls -l /usr/local/bin/monsterz /usr/local/bin/monsterz -> /usr/local/games/monsterz This Version have too ===> SECURITY REPORT >How-To-Repeat: Use normal Directories /usr/local/share/monsterz >Fix: Have made this Patch and revised Port, please look diff. cd /usr/local/ports/local/patch/games/monsterz ; port diff > ../monsterz.diff files/patch-Makefile Use normal directories pkg-plist No more pkg-plist and scripts in it. Makefile Date created: changed to ISO 8601 Added PLIST_FILES PORTDATA= * A pixmaps for Monsterz in /usr/local/share/pixmaps And others in Makefile, what is now usable in new FreeBSD Ports. Patch attached with submission follows: Diff mode was set to CVS, but there's no CVS subdirectory Trying /usr/ports ... found ===> Generating patch ===> Viewing diff with more diff -ruN --exclude=CVS /usr/ports/games/monsterz/Makefile ./Makefile --- /usr/ports/games/monsterz/Makefile 2012-06-01 07:19:03.000000000 +0200 +++ ./Makefile 2012-08-03 01:18:11.000000000 +0200 @@ -1,5 +1,5 @@ # New ports collection makefile for: monsterz -# Date created: Fri 29 apr 2005 +# Date created: 2005-04-29 # Whom: thierry@pompo.net # # $FreeBSD: ports/games/monsterz/Makefile,v 1.11 2012/06/01 05:19:03 dinoex Exp $ @@ -7,7 +7,7 @@ PORTNAME= monsterz PORTVERSION= 0.7.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= games MASTER_SITES= http://sam.zoy.org/monsterz/ @@ -20,24 +20,45 @@ LICENSE_PERMS= ${_LICENSE_PERMS_DEFAULT} BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/pygame/__init__.py:${PORTSDIR}/devel/py-game -RUN_DEPENDS:= ${BUILD_DEPENDS} USE_PYTHON= yes -MAKE_ENV= prefix=${PREFIX} + +PLIST_FILES= bin/monsterz \ + share/pixmaps/${PORTNAME}.png + +PORTDATA= * +PORTDOCS= AUTHORS INSTALL README TODO SCOREDIR= /var/games -PLIST_SUB= SCOREDIR=${SCOREDIR} -PORTDOCS= AUTHORS COPYING INSTALL README TODO +do-install: + ${MKDIR} ${DATADIR} + ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${DATADIR} + ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.py ${DATADIR} + +# Scripts + @${PRINTF} "#!/bin/sh\n\ncd ${DATADIR} &&\ + exec ${PYTHON_CMD} ${PORTNAME}.py --score /var/games/monsterz \"$$\@\"\n" > ${WRKDIR}/${PORTNAME}.sh + @${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/bin/${PORTNAME} + +# Data +.if !defined (NOPORTDATA) +. for d in graphics sound + @(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${DATADIR}) +. endfor +.endif -post-install: - ${STRIP_CMD} ${PREFIX}/games/monsterz - ${LN} -sf ${PREFIX}/games/monsterz ${PREFIX}/bin - @${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${PREFIX}/share/games/monsterz - @${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${PREFIX}/share/games/monsterz +# Documentation .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR} +. for f in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} +. endfor + ${INSTALL_DATA} ${WRKSRC}/graphics/icon.png ${PREFIX}/share/pixmaps/${PORTNAME}.png .endif +post-install: + @(if [ ! -e ${SCOREDIR} ] ; then ${MKDIR} -m 775 ${SCOREDIR} ; fi) + @(if [ ! -e ${SCOREDIR}/monsterz ] ; then ${TOUCH} ${SCOREDIR}/monsterz && ${CHMOD} g+w ${SCOREDIR}/monsterz ; fi) + .include <bsd.port.mk> diff -ruN --exclude=CVS /usr/ports/games/monsterz/files/patch-Makefile ./files/patch-Makefile --- /usr/ports/games/monsterz/files/patch-Makefile 2006-05-14 00:32:56.000000000 +0200 +++ ./files/patch-Makefile 2012-08-02 22:16:33.000000000 +0200 @@ -1,12 +1,18 @@ ---- Makefile.orig Fri May 12 18:39:38 2006 -+++ Makefile Sat May 13 19:06:56 2006 -@@ -1,5 +1,5 @@ +--- Makefile.orig 2007-12-17 23:05:00.000000000 +0100 ++++ Makefile 2012-08-02 21:44:04.000000000 +0200 +@@ -1,8 +1,8 @@ -prefix = /usr/local -+prefix?= /usr/local - gamesdir = ${prefix}/games - datadir = ${prefix}/share - pkgdatadir = $(datadir)/games/monsterz +-gamesdir = ${prefix}/games +-datadir = ${prefix}/share +-pkgdatadir = $(datadir)/games/monsterz ++prefix? = /usr/local ++gamesdir = ${prefix}/share/monsterz ++datadir = ${gamesdir} ++pkgdatadir = $(gamesdir) + scoredir = /var/games + scorefile = $(scoredir)/monsterz + @@ -22,7 +22,7 @@ all: monsterz diff -ruN --exclude=CVS /usr/ports/games/monsterz/pkg-plist ./pkg-plist --- /usr/ports/games/monsterz/pkg-plist 2006-05-14 00:32:56.000000000 +0200 +++ ./pkg-plist 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -bin/monsterz -games/monsterz -share/games/monsterz/graphics/background.png -share/games/monsterz/graphics/bigtiles.png -share/games/monsterz/graphics/board.png -share/games/monsterz/graphics/icon.png -share/games/monsterz/graphics/logo.png -share/games/monsterz/graphics/tiles.png -share/games/monsterz/monsterz.py -share/games/monsterz/monsterz.pyc -share/games/monsterz/monsterz.pyo -share/games/monsterz/sound/applause.wav -share/games/monsterz/sound/boing.wav -share/games/monsterz/sound/click.wav -share/games/monsterz/sound/ding.wav -share/games/monsterz/sound/duh.wav -share/games/monsterz/sound/grunt.wav -share/games/monsterz/sound/laugh.wav -share/games/monsterz/sound/music.s3m -share/games/monsterz/sound/pop.wav -share/games/monsterz/sound/warning.wav -share/games/monsterz/sound/whip.wav -@dirrm share/games/monsterz/sound -@dirrm share/games/monsterz/graphics -@dirrm share/games/monsterz -@dirrmtry share/games -@dirrmtry games -@exec if [ ! -e %%SCOREDIR%% ] ; then mkdir -p -m 775 %%SCOREDIR%% ; fi -@exec [ -e %%SCOREDIR%%/monsterz ] || touch %%SCOREDIR%%/monsterz && chmod g+w %%SCOREDIR%%/monsterz -@unexec if [ ! -s %%SCOREDIR%%/monsterz ] ; then rm -f %%SCOREDIR%%/monsterz && rm -r %%SCOREDIR%% || true ; fi ===> Done >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208030019.q730Jdek013198>