From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Feb 27 11:00:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B67693B4 for ; Thu, 27 Feb 2014 11:00:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8CE9E1925 for ; Thu, 27 Feb 2014 11:00:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s1RB00r6004913 for ; Thu, 27 Feb 2014 11:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s1RB002c004912; Thu, 27 Feb 2014 11:00:00 GMT (envelope-from gnats) Resent-Date: Thu, 27 Feb 2014 11:00:00 GMT Resent-Message-Id: <201402271100.s1RB002c004912@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mattia Basone Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0484A137 for ; Thu, 27 Feb 2014 10:53:44 +0000 (UTC) Received: from FreeBSD10-TEST.texilia.org (83-103-26-34.ip.fastwebnet.it [83.103.26.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7186418DA for ; Thu, 27 Feb 2014 10:53:42 +0000 (UTC) Received: from FreeBSD10-TEST.texilia.org (localhost [127.0.0.1]) by FreeBSD10-TEST.texilia.org (8.14.7/8.14.7) with ESMTP id s1QL1DWh029085 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 26 Feb 2014 22:01:13 +0100 (CET) (envelope-from root@FreeBSD10-TEST.texilia.org) Received: (from root@localhost) by FreeBSD10-TEST.texilia.org (8.14.7/8.14.7/Submit) id s1QL1D8X029084; Wed, 26 Feb 2014 22:01:13 +0100 (CET) (envelope-from root) Message-Id: <201402262101.s1QL1D8X029084@FreeBSD10-TEST.texilia.org> Date: Wed, 26 Feb 2014 22:01:13 +0100 (CET) From: Mattia Basone To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: ports/187106: [NEW PORT] games/spigot Minecraft server X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Mattia Basone List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 11:00:00 -0000 >Number: 187106 >Category: ports >Synopsis: [NEW PORT] games/spigot Minecraft server >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: Thu Feb 27 11:00:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Mattia Basone >Release: FreeBSD 10.0-RELEASE amd64 >Organization: mattia.basone@gmail.com >Environment: System: FreeBSD FreeBSD10-TEST 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 Port Depends: java/openjdk7 sysutils/tmux >Description: High performance Server for the block building game Minecraft http://www.spigotmc.org/ >How-To-Repeat: >Fix: --- spigot.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # spigot # spigot/files # spigot/files/pkg-deinstall.in # spigot/files/pkg-message.in # spigot/files/spigot.in # spigot/distinfo # spigot/pkg-descr # spigot/pkg-plist # spigot/Makefile # spigot/UIDs.diff # spigot/GIDs.diff # echo c - spigot mkdir -p spigot > /dev/null 2>&1 echo c - spigot/files mkdir -p spigot/files > /dev/null 2>&1 echo x - spigot/files/pkg-deinstall.in sed 's/^X//' >spigot/files/pkg-deinstall.in << 'a928ef0d464ca69e6df308c9dbe151d5' X#!/bin/sh X Xif [ "$2" != "POST-DEINSTALL" ]; then X exit 0 Xfi X Xif [ -d %%PREFIX%%/share/spigot ]; then X echo "There are some files (like your world and your server logs)" X echo "left in %%PREFIX%%/share/spigot." X echo "Use 'rm -rf %%PREFIX%%/share/spigot' to delete them." Xfi X Xexit 0 a928ef0d464ca69e6df308c9dbe151d5 echo x - spigot/files/pkg-message.in sed 's/^X//' >spigot/files/pkg-message.in << 'ff4ecdfdbab661dc3e1a2387157b3bab' X################################################################################### X# X# The user mcspigot has been added to your system. X# X# To run the server automativally with the system X# add the following line to your /etc/rc.conf: X# X# spigot_enable="YES" X# X# Other options: X# spigot_session="spigot-session" --> tmux session name X# spigot_user="mcspigot" --> server user X# spigot_jar="spigot-1.7.2-R0.4-SNAPSHOT.jar" --> server JAR name X# spigot_chdir="%%PREFIX%%/share/spigot/" --> Server files path X# spigot_args="-Xmx2048M" --> Java args X# X# Serverfiles will be in X# %%PREFIX%%/share/spigot X# X# You can delete all the server logs (latest and compressed) X# using the following command: X# X# %%PREFIX%%/etc/rc.d/spigot clearlog X# X# You can open server console with command X# %%PREFIX%%/etc/rc.d/spigot console X# Press Ctrl+B than D to exit X# X# Run the server at least one time to create configs files X# X################################################################################## ff4ecdfdbab661dc3e1a2387157b3bab echo x - spigot/files/spigot.in sed 's/^X//' >spigot/files/spigot.in << '17658cc255e36d11ca12191adb0157b8' X#!/bin/sh X# X# PROVIDE: spigot X# REQUIRE: LOGIN X# KEYWORD: shutdown X X. /etc/rc.subr X Xname="spigot" Xrcvar=spigot_enable X Xload_rc_config $name X X: ${spigot_session="spigot-session"} X: ${spigot_user="mcspigot"} X: ${spigot_jar="spigot-1.7.2-R0.4-SNAPSHOT.jar"} X: ${spigot_chdir="%%PREFIX%%/share/spigot/"} X: ${spigot_path="${spigot_chdir}${spigot_jar}"} X: ${spigot_args="-Xmx2048M"} X Xextra_commands="clearlog console status" Xstart_cmd="${name}_start" Xstop_cmd="${name}_stop" Xrestart_cmd="${name}_restart" Xstatus_cmd="${name}_status" Xclearlog_cmd="${name}_clearlog" Xconsole_cmd="${name}_console" X Xtmux="/usr/local/bin/tmux" Xjava="/usr/local/bin/java" X Xeval "${rcvar}=\${${rcvar}:-'NO'}" X Xspigot_start(){ Xif spigot_running; then X echo "Spigot Server already running!" Xelse X echo "Starting Spigot Server..." X cd ${spigot_chdir} X /usr/bin/su ${spigot_user} -c "${tmux} new-session -d -s ${spigot_session} '${java} ${spigot_args} -jar ${spigot_path} nogui'" X sleep 1 X if spigot_running; then X echo "Server running." X else X echo "ERROR: Server could not be started!" X fi Xfi X} X Xspigot_stop(){ Xif spigot_running; then X echo "Halting Spigot server." X /usr/bin/su ${spigot_user} -c "${tmux} send -t ${spigot_session}:0.0 stop \"Enter\"" X X i=0 X while [ $i -lt 15 ]; do X i=$(($i + 1)) X if spigot_running; then X sleep 1 X else X echo "Spigot server halted." X break X fi X done X X if [ $i -ge 14 ];then X echo "ERROR: Server could not be halted." X fi Xelse X echo "Spigot server is not running." Xfi X} X Xspigot_restart(){ X if spigot_running; then X echo "Server running, restarting..." X spigot_stop X spigot_start X else X echo "Can't restart, server not running" X fi X X} X Xspigot_status(){ X if spigot_running; then X echo "Spigot server is running." X else X echo "Spigot server is not running." X fi X} X Xspigot_clearlog(){ X echo "Trying to delete server logs..." X if spigot_running; then X echo "Server seems to be running. Stop server before deletion." X else X check=`ls -l ${spigot_chdir}logs/ | grep "log.gz" | wc -l` X if [ $check -ge 1 ]; then X rm ${spigot_chdir}logs/*.log.gz X echo "*.log.gz deleted" X else X echo "No old logs found." X fi X if [ -e ${spigot_chdir}logs/latest.log ]; then X rm ${spigot_chdir}logs/latest.log X echo "latest.log deleted" X fi X fi X} X Xspigot_running(){ X local check X check=`ps axf | grep "${spigot_path}" | grep -v grep | awk '{print \$1}' | egrep '^[0-9]+$'` X if [ $check ]; then X return 0 X else X return 1 X fi X} X Xspigot_console(){ X /usr/bin/su ${spigot_user} -c "${tmux} attach -t ${spigot_session}" X} X Xrun_rc_command "$1" 17658cc255e36d11ca12191adb0157b8 echo x - spigot/distinfo sed 's/^X//' >spigot/distinfo << '67df215ec027088e017c4f30d2c59cd1' XSHA256 (spigot-1.7.2-R0.4-SNAPSHOT.jar) = 5f4472c885ad2c742db47f50c44d478058fd552f2d539f932a24172b7e588334 XSIZE (spigot-1.7.2-R0.4-SNAPSHOT.jar) = 22553919 67df215ec027088e017c4f30d2c59cd1 echo x - spigot/pkg-descr sed 's/^X//' >spigot/pkg-descr << '889004ae8cc6357449bd3b3ad95c0a88' XThis is a modified server version for the popular block building game Minecraft X XWWW: http://www.spigotmc.org/ 889004ae8cc6357449bd3b3ad95c0a88 echo x - spigot/pkg-plist sed 's/^X//' >spigot/pkg-plist << '2e2b5411f2ea4c84c7dfee2906e9f94a' X@owner mcspigot X@group mcspigot X%%DATADIR%%/ X%%DATADIR%%/spigot-1.7.2-R0.4-SNAPSHOT.jar X@dirrmtry %%DATADIR%% 2e2b5411f2ea4c84c7dfee2906e9f94a echo x - spigot/Makefile sed 's/^X//' >spigot/Makefile << 'ea4f737474975c3856145b8f1cef4bde' X# Created by: Mattia Basone X# $FreeBSD$ X XPORTNAME= spigot XPORTVERSION= 1.7.2R0.4 XCATEGORIES= games java XMASTER_SITES= http://ci.md-5.net/view/Spigot/job/Spigot/lastStableBuild/artifact/Spigot-Server/target/ XDISTNAME= spigot-1.7.2-R0.4-SNAPSHOT.jar XEXTRACT_SUFX= XEXTRACT_ONLY= X XMAINTAINER= mattia.basone@gmail.com XCOMMENT= High performance Server for the block building game Minecraft X XLICENSE= GPLv3 X XRUN_DEPENDS= tmux:${PORTSDIR}/sysutils/tmux X XNO_WRKSUBDIR= yes XNO_BUILD= yes XUSE_JAVA= yes XJAVA_VERSION= 1.7 XUSERS= mcspigot XGROUPS= mcspigot XUSE_RC_SUBR= spigot XSUB_FILES= pkg-deinstall \ X pkg-message X Xdo-install: X ${MKDIR} ${STAGEDIR}${PREFIX}/share/${PORTNAME} X ${INSTALL_DATA} ${DISTDIR}/spigot-1.7.2-R0.4-SNAPSHOT.jar ${STAGEDIR}${PREFIX}/share/${PORTNAME}/spigot-1.7.2-R0.4-SNAPSHOT.jar X X.include ea4f737474975c3856145b8f1cef4bde echo x - spigot/UIDs.diff sed 's/^X//' >spigot/UIDs.diff << 'fabd31aef8cceb316c0f8baae958eac5' X282d281 X< mcspigot:*:978:978::0:0:Spigot Server:/nonexistent:/bin/sh fabd31aef8cceb316c0f8baae958eac5 echo x - spigot/GIDs.diff sed 's/^X//' >spigot/GIDs.diff << 'c2b0afe829dcbe53ec615260db0e1af5' X275d274 X< mcspigot:*:978: c2b0afe829dcbe53ec615260db0e1af5 exit --- spigot.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted: