aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/Makefile1
-rw-r--r--games/mtaserver/Makefile44
-rw-r--r--games/mtaserver/distinfo6
-rw-r--r--games/mtaserver/files/mtad.in39
-rw-r--r--games/mtaserver/files/pkg-message.in6
-rw-r--r--games/mtaserver/pkg-descr6
-rw-r--r--games/mtaserver/pkg-plist8
7 files changed, 110 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index e6e8ed5c2828..074fede26ba0 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -452,6 +452,7 @@
SUBDIR += moria
SUBDIR += mt_dolphin_ia
SUBDIR += mt_gtk_client
+ SUBDIR += mtaserver
SUBDIR += mudmagic
SUBDIR += mvdsv
SUBDIR += mythserver
diff --git a/games/mtaserver/Makefile b/games/mtaserver/Makefile
new file mode 100644
index 000000000000..ab99be3da03d
--- /dev/null
+++ b/games/mtaserver/Makefile
@@ -0,0 +1,44 @@
+# New ports collection makefile for: mtaserver
+# Date created: 25 November 2006
+# Whom: Alexander Logvinov <ports@logvinov.com>
+#
+# $FreeBSD$
+
+PORTNAME= ${MTANAME:L}
+PORTVERSION= 0.5
+CATEGORIES= games linux
+MASTER_SITES= http://files.gonnaplay.com/201/:main \
+ http://www.trancevibez.com/mta/:both \
+ http://files.gonnaplay.com/20104/:patch
+DISTFILES= ${MTANAME}0_5-linux.tar.gz:main,both ${MTANAME}0_5-linux-patch1.tar.gz:patch,both
+DIST_SUBDIR= mta
+
+MAINTAINER= ports@logvinov.com
+COMMENT= Multi Theft Auto: Vice City and GTA3 dedicated server
+
+USE_LINUX= yes
+NO_BUILD= yes
+NO_WRKSUBDIR= yes
+
+USE_RC_SUBR= mtad
+MTANAME= MTAServer
+FILES= CHANGELOG LICENSE ${PORTNAME} README banned.lst ${PORTNAME}.conf.dist
+PLIST_SUB= MTADIR="${PORTNAME}"
+SUB_FILES= pkg-message
+SUB_LIST= MTADIR="${PREFIX}/${PORTNAME}"
+
+post-patch:
+ @${MV} ${WRKSRC}/${MTANAME} ${WRKSRC}/${PORTNAME}
+ @${MV} ${WRKSRC}/${PORTNAME}.conf ${WRKSRC}/${PORTNAME}.conf.dist
+ @${CHMOD} 600 ${WRKSRC}/${PORTNAME}.conf.dist
+
+do-install:
+ @${MKDIR} ${PREFIX}/${PORTNAME}
+.for i in ${FILES}
+ @${CP} -p ${WRKSRC}/${i} ${PREFIX}/${PORTNAME}/${i}
+.endfor
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/games/mtaserver/distinfo b/games/mtaserver/distinfo
new file mode 100644
index 000000000000..4f4e2b6a8407
--- /dev/null
+++ b/games/mtaserver/distinfo
@@ -0,0 +1,6 @@
+MD5 (mta/MTAServer0_5-linux.tar.gz) = 564da53ca55d6c2c5b0c3b09a0f32193
+SHA256 (mta/MTAServer0_5-linux.tar.gz) = 0e4b58658299ac79b1ae6d0bbd4946fc22a7e063986896e69a0749a38c9d17b1
+SIZE (mta/MTAServer0_5-linux.tar.gz) = 229056
+MD5 (mta/MTAServer0_5-linux-patch1.tar.gz) = fba0f891cb4c25f76813fe16d49dbee5
+SHA256 (mta/MTAServer0_5-linux-patch1.tar.gz) = b829eaebfd74f972781153f5e7ede48d08c7ac39e93866b3bfc6ab874b5bb4c1
+SIZE (mta/MTAServer0_5-linux-patch1.tar.gz) = 90196
diff --git a/games/mtaserver/files/mtad.in b/games/mtaserver/files/mtad.in
new file mode 100644
index 000000000000..9e1149dfa576
--- /dev/null
+++ b/games/mtaserver/files/mtad.in
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: mtad
+# REQUIRE: NETWORKING
+#
+# Add the following line to /etc/rc.conf[.local] to enable mtad
+#
+# mtad_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable mtad.
+
+. %%RC_SUBR%%
+
+name="mtad"
+rcvar=${name}_enable
+
+load_rc_config $name
+
+: ${mtad_enable="NO"}
+: ${mtad_chdir="%%MTADIR%%"}
+
+command="%%MTADIR%%/mtaserver"
+command_args="-b 2>&1 > /dev/null &"
+required_files="%%MTADIR%%/mtaserver.conf"
+start_precmd="mtad_prestart"
+stop_precmd="mtad_prestop"
+
+mtad_prestart() {
+ if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then
+ err 1 "Linux support required"
+ fi
+}
+
+mtad_prestop() {
+ rc_pid=`echo $rc_pid | awk '{print $1}'`
+}
+
+run_rc_command "$1"
diff --git a/games/mtaserver/files/pkg-message.in b/games/mtaserver/files/pkg-message.in
new file mode 100644
index 000000000000..58c1f792d468
--- /dev/null
+++ b/games/mtaserver/files/pkg-message.in
@@ -0,0 +1,6 @@
+***********************************************************************
+# cp %%MTADIR%%/mtaserver.conf.dist \
+ %%MTADIR%%/mtaserver.conf
+
+Read %%MTADIR%%/README for details
+***********************************************************************
diff --git a/games/mtaserver/pkg-descr b/games/mtaserver/pkg-descr
new file mode 100644
index 000000000000..79477fc6fdb0
--- /dev/null
+++ b/games/mtaserver/pkg-descr
@@ -0,0 +1,6 @@
+Multi Theft Auto is a modification for
+Grand Theft Auto: Vice City and Grand Theft Auto: GTA3
+for PC that allows you to play it online against players
+around the world.
+
+WWW: http://www.mtavc.com/
diff --git a/games/mtaserver/pkg-plist b/games/mtaserver/pkg-plist
new file mode 100644
index 000000000000..414df341905d
--- /dev/null
+++ b/games/mtaserver/pkg-plist
@@ -0,0 +1,8 @@
+@unexec if cmp -s %D/%%MTADIR%%/mtaserver.conf %D/%%MTADIR%%/mtaserver.conf.dist; then rm -f %D/%%MTADIR%%/mtaserver.conf; fi
+%%MTADIR%%/CHANGELOG
+%%MTADIR%%/LICENSE
+%%MTADIR%%/mtaserver
+%%MTADIR%%/README
+%%MTADIR%%/banned.lst
+%%MTADIR%%/mtaserver.conf.dist
+@dirrmtry %%MTADIR%%