Bug 170455 - [MAINTAINER] games/blockrage: Makefile changed, added files/blockrage.in
Summary: [MAINTAINER] games/blockrage: Makefile changed, added files/blockrage.in
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Michael Scheidell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-07 16:40 UTC by nemysis
Modified: 2012-08-09 13:10 UTC (History)
0 users

See Also:


Attachments
blockrage-0.2.3_1.patch (1.92 KB, patch)
2012-08-07 16:40 UTC, nemysis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nemysis 2012-08-07 16:40:01 UTC
Makefile changed:

Added in Makefile for all ${PORTNAME}

Removed unsafe Script blockrage.sh


New Options for Makefile:

SUB_FILES=<--->${PORTNAME}

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDATA}

.if ${PORT_OPTIONS:MDOCS}


Added file(s):
- files/blockrage.in

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: ports)
Comment 1 Michael Scheidell freebsd_committer 2012-08-08 08:11:37 UTC
re:

diff -ruN --exclude=CVS /usr/ports/games/blockrage/files/blockrage.in ./files/blockrage.in
--- /usr/ports/games/blockrage/files/blockrage.in  1970-01-01 01:00:00.000000000 +0100
+++ ./files/blockrage.in    2012-08-07 16:33:17.000000000 +0200
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+echo "Block Rage: Starting up..."
+cd "%%DATADIR%%"
+./blockrage

could you take a look at, review and re-write the rc script file according to FreeBSD rs script standards?

<http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html>


-- 
Michael Scheidell, CTO
 >*| * SECNAP Network Security Corporation
d: +1.561.948.2259
w: http://people.freebsd.org/~scheidell
Comment 2 Michael Scheidell freebsd_committer 2012-08-08 08:29:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->scheidell

Ah, ok.  I'll take it then.
Comment 3 nemysis 2012-08-08 09:42:59 UTC
Thanks i have looked into this good FreeBSD Page.

This ./files/blockrage.in is not a RC script.

This is only to start a game from "%%DATADIR%%", which can't be started directly, not more.


I have this script as example from here

https://redports.org/browser/jgh/games/castlevox/files/CastleVox.in


This is better and safer as 

# Scripts                                                                                                                                                      
        @${PRINTF} "#!/bin/sh\n\ncd ${DATADIR} &&\                                                                                                             
                ./blockrage\n" > ${WRKDIR}/blockrage.sh                                                                                                        
        @${INSTALL_SCRIPT} ${WRKDIR}/blockrage.sh ${PREFIX}/bin/blockrage




--
Comment 4 Michael Scheidell freebsd_committer 2012-08-08 11:52:24 UTC

On 8/8/12 4:50 AM, nemysis wrote:
>
>   This ./files/blockrage.in is not a RC script.
>
>   This is only to start a game from "%%DATADIR%%", which can't be started directly, not more.
>
>
>   I have this script as example from here
>
>   https://redports.org/browser/jgh/games/castlevox/files/CastleVox.in
>
>
>   This is better and safer as
>
>   # Scripts
>           @${PRINTF} "#!/bin/sh\n\ncd ${DATADIR}&&\
>                   ./blockrage\n">  ${WRKDIR}/blockrage.sh
>           @${INSTALL_SCRIPT} ${WRKDIR}/blockrage.sh ${PREFIX}/bin/blockrage
>
>
the email above may have gotten mangled. I do not understand what you 
are asking.

is this intended to be in  in your Makefile?

please submit a new patch, to bug-followup@freebsg.org, with the patch 
attached as an ascii/text text file, not inline.


>
>
>   -- 

-- 
Michael Scheidell, CTO
 >*| * SECNAP Network Security Corporation
d: +1.561.948.2259
w: http://people.freebsd.org/~scheidell
Comment 5 Michael Scheidell freebsd_committer 2012-08-08 11:57:05 UTC
State Changed
From-To: open->feedback

Ask for maintainer fix.
Comment 6 nemysis 2012-08-08 12:30:31 UTC
On Wed, 8 Aug 2012 06:52:24 -0400
Michael Scheidell <scheidell@FreeBSD.org> wrote:

> 
> 
> On 8/8/12 4:50 AM, nemysis wrote:
> >
> >   This ./files/blockrage.in is not a RC script.
> >
> >   This is only to start a game from "%%DATADIR%%", which can't be started directly, not more.
> >
> >
> >   I have this script as example from here
> >
> >   https://redports.org/browser/jgh/games/castlevox/files/CastleVox.in
> >
> >
> >   This is better and safer as
> >
> >   # Scripts
> >           @${PRINTF} "#!/bin/sh\n\ncd ${DATADIR}&&\
> >                   ./blockrage\n">  ${WRKDIR}/blockrage.sh
> >           @${INSTALL_SCRIPT} ${WRKDIR}/blockrage.sh ${PREFIX}/bin/blockrage
> >
> >
> the email above may have gotten mangled. I do not understand what you 
> are asking.
> 
> is this intended to be in  in your Makefile?
> 
> please submit a new patch, to bug-followup@freebsg.org, with the patch 
> attached as an ascii/text text file, not inline.
> 
> 
> >
> >
> >   -- 
> 

This is not Patch what i have writed inline, sorry.

This was before in Makefile, please use only submited patch in the first Post.

Not need do submit a new Patch.


--
Comment 7 Michael Scheidell freebsd_committer 2012-08-08 15:20:40 UTC
State Changed
From-To: feedback->open

Feedback received.
Comment 8 Michael Scheidell freebsd_committer 2012-08-09 13:01:27 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 9 dfilter service freebsd_committer 2012-08-09 13:01:35 UTC
Author: scheidell
Date: Thu Aug  9 12:01:19 2012
New Revision: 302338
URL: http://svn.freebsd.org/changeset/ports/302338

Log:
  - Replace unsafe blockrage.sh script
  - Update to OptionsNG
  - Bump PORTREVISION
  
  PR:		ports/170455
  Submitted by:	nemysis <nemysis@gmx.ch> (maintainer)

Added:
  head/games/blockrage/files/blockrage.in   (contents, props changed)
Modified:
  head/games/blockrage/Makefile   (contents, props changed)

Modified: head/games/blockrage/Makefile
==============================================================================
--- head/games/blockrage/Makefile	Thu Aug  9 11:38:19 2012	(r302337)
+++ head/games/blockrage/Makefile	Thu Aug  9 12:01:19 2012	(r302338)
@@ -7,6 +7,7 @@
 
 PORTNAME=	blockrage
 PORTVERSION=	0.2.3
+PORTREVISION=	1
 CATEGORIES=	games
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}
 
@@ -15,36 +16,45 @@ COMMENT=	Block Rage is falling blocks ga
 
 LICENSE=	GPLv2
 
+OPTIONS_DEFINE=	DATA
+OPTIONS_DEFAULT=	DATA
+
 GNU_CONFIGURE=	yes
 ALL_TARGET=	${PORTNAME}
 USE_SDL=	sdl image mixer
 MAKE_JOBS_SAFE=	yes
 
-PLIST_FILES=	bin/blockrage
+PLIST_FILES=	bin/${PORTNAME}
 
-MAN6=		blockrage.6
+MAN6=		${PORTNAME}.6
 
 PORTDATA=	*
 PORTDOCS=	ChangeLog KNOWN_BUGS README TODO
 
+SUB_FILES=	${PORTNAME}
+
+.include <bsd.port.options.mk>
+
 do-install:
 # Scripts
-	@${PRINTF} "#!/bin/sh\n\ncd ${DATADIR} &&\
-		./blockrage\n" > ${WRKDIR}/blockrage.sh
-	@${INSTALL_SCRIPT} ${WRKDIR}/blockrage.sh ${PREFIX}/bin/blockrage
+	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin
+
 # Executable
 	${MKDIR} ${DATADIR}
-	${INSTALL_PROGRAM} ${WRKSRC}/blockrage ${DATADIR}
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${DATADIR}
 
 post-install:
 	${INSTALL_MAN} ${WRKSRC}/${MAN6} ${MAN6PREFIX}/man/man6
+
 # Data
-.for d in data blockrage-fhs.rc blockrage.cfg blockrage.rc
+.if ${PORT_OPTIONS:MDATA}
+.  for d in data blockrage-fhs.rc blockrage.cfg blockrage.rc
 	@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${DATADIR})
-.endfor
+.  endfor
+.endif
 
 # Documentations
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	${MKDIR} ${DOCSDIR}
 .  for f in ${PORTDOCS}
 	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}

Added: head/games/blockrage/files/blockrage.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/blockrage/files/blockrage.in	Thu Aug  9 12:01:19 2012	(r302338)
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+echo "Block Rage: Starting up..."
+cd "%%DATADIR%%"
+./blockrage
\ No newline at end of file
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"