mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-02 11:09:29 +00:00
- Stagify
- Add modern rc script - Install in DATADIR Approved by: gmarco@gufi.org (maintainer)
This commit is contained in:
parent
824ecccb44
commit
56c6383aef
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=359016
@ -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@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>
|
||||
|
5
games/tetrinet-x/files/pkg-message.in
Normal file
5
games/tetrinet-x/files/pkg-message.in
Normal file
@ -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.
|
@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
tetrixdir=/usr/local/tetrinet-x
|
||||
tetrix=tetrix.freebsd
|
||||
|
||||
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
|
25
games/tetrinet-x/files/tetrinetx.in
Normal file
25
games/tetrinet-x/files/tetrinetx.in
Normal file
@ -0,0 +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".
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=tetrinetx
|
||||
rcvar=tetrinetx_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${tetrinetx_enable:=NO}
|
||||
|
||||
command="%%DATADIR%%/tetrix.freebsd"
|
||||
|
||||
run_rc_command "$1"
|
@ -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
|
||||
@dirrm tetrinet-x
|
||||
%%DATADIR%%/tetrix.freebsd
|
||||
%%DATADIR%%/server-query
|
||||
%%DATADIR%%/game.conf
|
||||
%%DATADIR%%/game.log
|
||||
%%DATADIR%%/game.secure
|
||||
%%DATADIR%%/game.winlist
|
||||
@dirrm %%DATADIR%%
|
||||
|
Loading…
x
Reference in New Issue
Block a user