aboutsummaryrefslogtreecommitdiffstats
path: root/games/blockrage
diff options
context:
space:
mode:
authorscheidell <scheidell@FreeBSD.org>2012-08-09 20:01:19 +0800
committerscheidell <scheidell@FreeBSD.org>2012-08-09 20:01:19 +0800
commit33b0d9ab91ac4254ce36d42500746cd1cf8f33e8 (patch)
treef20ebc844406dcf48349c441fb53ddd62c3bef3f /games/blockrage
parent319668899d61bbdad84e3aee0dde8c4bba2e52b6 (diff)
downloadfreebsd-ports-gnome-33b0d9ab91ac4254ce36d42500746cd1cf8f33e8.tar.gz
freebsd-ports-gnome-33b0d9ab91ac4254ce36d42500746cd1cf8f33e8.tar.zst
freebsd-ports-gnome-33b0d9ab91ac4254ce36d42500746cd1cf8f33e8.zip
- Replace unsafe blockrage.sh script
- Update to OptionsNG - Bump PORTREVISION PR: ports/170455 Submitted by: nemysis <nemysis@gmx.ch> (maintainer)
Diffstat (limited to 'games/blockrage')
-rw-r--r--games/blockrage/Makefile28
-rw-r--r--games/blockrage/files/blockrage.in7
2 files changed, 26 insertions, 9 deletions
diff --git a/games/blockrage/Makefile b/games/blockrage/Makefile
index 32541308eab0..30809211bb67 100644
--- a/games/blockrage/Makefile
+++ b/games/blockrage/Makefile
@@ -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 game with a 2-player hotseat mode
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}
diff --git a/games/blockrage/files/blockrage.in b/games/blockrage/files/blockrage.in
new file mode 100644
index 000000000000..2e50a1170316
--- /dev/null
+++ b/games/blockrage/files/blockrage.in
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+echo "Block Rage: Starting up..."
+cd "%%DATADIR%%"
+./blockrage \ No newline at end of file