svn commit: r359016 - in head/games/tetrinet-x: . files
Guido Falsi
madpilot at FreeBSD.org
Mon Jun 23 22:29:09 UTC 2014
Author: madpilot
Date: Mon Jun 23 22:29:07 2014
New Revision: 359016
URL: http://svnweb.freebsd.org/changeset/ports/359016
QAT: https://qat.redports.org/buildarchive/r359016/
Log:
- Stagify
- Add modern rc script
- Install in DATADIR
Approved by: gmarco at gufi.org (maintainer)
Added:
head/games/tetrinet-x/files/pkg-message.in (contents, props changed)
head/games/tetrinet-x/files/tetrinetx.in (contents, props changed)
- copied, changed from r359015, head/games/tetrinet-x/files/tetrinet-x.sh
Deleted:
head/games/tetrinet-x/files/tetrinet-x.sh
Modified:
head/games/tetrinet-x/Makefile
head/games/tetrinet-x/pkg-plist
Modified: head/games/tetrinet-x/Makefile
==============================================================================
--- head/games/tetrinet-x/Makefile Mon Jun 23 22:03:48 2014 (r359015)
+++ head/games/tetrinet-x/Makefile Mon Jun 23 22:29:07 2014 (r359016)
@@ -3,7 +3,7 @@
PORTNAME= tetrinet-x
PORTVERSION= 1.13.16
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= games
MASTER_SITES= http://utenti.gufi.org/~gmarco/files/distfiles/ \
ftp://ftp.dementia.nu/tetrinet/servers/tetrix/
@@ -14,10 +14,9 @@ MAINTAINER= gmarco at gufi.org
COMMENT= Addictive 6 player tetr*s game
WRKSRC= ${WRKDIR}/tetrinetx-${PORTVERSION}
+SUB_FILES= pkg-message
+USE_RC_SUBR= tetrinetx
-INSTALLDIR= ${PREFIX}/tetrinet-x
-
-NO_STAGE= yes
do-build:
(cd ${WRKSRC}/src && \
${CC} ${CFLAGS} main.c -o ../bin/tetrix.freebsd)
@@ -25,21 +24,13 @@ do-build:
${CC} ${CFLAGS} query.c -o ../../../bin/server-query)
do-install:
- ${MKDIR} ${INSTALLDIR}
- ${INSTALL_PROGRAM} ${WRKDIR}/tetrinetx-1.13.16/bin/tetrix.freebsd ${INSTALLDIR}
- ${INSTALL_PROGRAM} ${WRKDIR}/tetrinetx-1.13.16/bin/server-query ${INSTALLDIR}
- ${INSTALL_DATA} -m 644 ${WRKDIR}/tetrinetx-1.13.16/bin/game.conf ${INSTALLDIR}
- ${INSTALL_DATA} -m 644 ${WRKDIR}/tetrinetx-1.13.16/bin/game.log ${INSTALLDIR}
- ${INSTALL_DATA} -m 644 ${WRKDIR}/tetrinetx-1.13.16/bin/game.secure ${INSTALLDIR}
- ${INSTALL_DATA} -m 644 ${WRKDIR}/tetrinetx-1.13.16/bin/game.winlist ${INSTALLDIR}
-
-post-install:
- @${ECHO} ""
- @${ECHO} "Installing ${PREFIX}/etc/rc.d/tetrinet-x.sh startup file."
- @${INSTALL_SCRIPT} -m 751 ${FILESDIR}/tetrinet-x.sh ${PREFIX}/etc/rc.d
- @${ECHO} ""
- @${ECHO} "Please modify configuration files located in ${INSTALLDIR}"
- @${ECHO} "before attempting to run Tetrinet server"
- @${ECHO} ""
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/tetrix.freebsd ${STAGEDIR}${DATADIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/server-query ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} -m 644 ${WRKSRC}/bin/game.conf ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} -m 644 ${WRKSRC}/bin/game.log ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} -m 644 ${WRKSRC}/bin/game.secure ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} -m 644 ${WRKSRC}/bin/game.winlist ${STAGEDIR}${DATADIR}
+ ${INSTALL_SCRIPT} -m 751 ${WRKDIR}/tetrinetx ${STAGEDIR}${PREFIX}/etc/rc.d
.include <bsd.port.mk>
Added: head/games/tetrinet-x/files/pkg-message.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/tetrinet-x/files/pkg-message.in Mon Jun 23 22:29:07 2014 (r359016)
@@ -0,0 +1,5 @@
+A startup script for the Tetrinet server has been installed in
+%%PREFIX%%/etc/rc.d/tetrinetx.
+
+Please modify configuration files located in %%DATADIR%%
+before attempting to run Tetrinet server.
Copied and modified: head/games/tetrinet-x/files/tetrinetx.in (from r359015, head/games/tetrinet-x/files/tetrinet-x.sh)
==============================================================================
--- head/games/tetrinet-x/files/tetrinet-x.sh Mon Jun 23 22:03:48 2014 (r359015, copy source)
+++ head/games/tetrinet-x/files/tetrinetx.in Mon Jun 23 22:29:07 2014 (r359016)
@@ -1,18 +1,25 @@
#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: tetrinetx
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable tetrinet-x
+#
+# tetrinetx_enable (bool): Set it to "YES" to enabl tetrinet-x
+# Default is "NO".
-tetrixdir=/usr/local/tetrinet-x
-tetrix=tetrix.freebsd
+. /etc/rc.subr
-case "$1" in
-start)
- [ -x ${tetrixdir}/${tetrix} ] && cd ${tetrixdir} && \
- ${tetrixdir}/${tetrix} > /dev/null && echo -n ' tetrinet-x'
- ;;
-stop)
- killall ${tetrix} && echo -n ' tetrinet-x'
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- exit 64
- ;;
-esac
+name=tetrinetx
+rcvar=tetrinetx_enable
+
+load_rc_config $name
+
+: ${tetrinetx_enable:=NO}
+
+command="%%DATADIR%%/tetrix.freebsd"
+
+run_rc_command "$1"
Modified: head/games/tetrinet-x/pkg-plist
==============================================================================
--- head/games/tetrinet-x/pkg-plist Mon Jun 23 22:03:48 2014 (r359015)
+++ head/games/tetrinet-x/pkg-plist Mon Jun 23 22:29:07 2014 (r359016)
@@ -1,8 +1,7 @@
-tetrinet-x/tetrix.freebsd
-tetrinet-x/server-query
-tetrinet-x/game.conf
-tetrinet-x/game.log
-tetrinet-x/game.secure
-tetrinet-x/game.winlist
-etc/rc.d/tetrinet-x.sh
- at dirrm tetrinet-x
+%%DATADIR%%/tetrix.freebsd
+%%DATADIR%%/server-query
+%%DATADIR%%/game.conf
+%%DATADIR%%/game.log
+%%DATADIR%%/game.secure
+%%DATADIR%%/game.winlist
+ at dirrm %%DATADIR%%
More information about the svn-ports-all
mailing list