aboutsummaryrefslogtreecommitdiff
path: root/games/sampsvr
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2006-12-02 00:32:11 +0000
committerMartin Wilke <miwi@FreeBSD.org>2006-12-02 00:32:11 +0000
commit620cb3cae5559e875bdb0541bf8233238aa9cd84 (patch)
tree9d62ea9356f36169b11e0a70660f9a7da398f155 /games/sampsvr
parent918ed17c0cabce1bf1735da86bf5a04b1f53e799 (diff)
downloadports-620cb3cae5559e875bdb0541bf8233238aa9cd84.tar.gz
ports-620cb3cae5559e875bdb0541bf8233238aa9cd84.zip
Notes
Diffstat (limited to 'games/sampsvr')
-rw-r--r--games/sampsvr/Makefile37
-rw-r--r--games/sampsvr/distinfo3
-rw-r--r--games/sampsvr/files/pkg-message.in5
-rw-r--r--games/sampsvr/files/sampd.in39
-rw-r--r--games/sampsvr/pkg-descr5
-rw-r--r--games/sampsvr/pkg-plist31
6 files changed, 120 insertions, 0 deletions
diff --git a/games/sampsvr/Makefile b/games/sampsvr/Makefile
new file mode 100644
index 000000000000..8ec06633b343
--- /dev/null
+++ b/games/sampsvr/Makefile
@@ -0,0 +1,37 @@
+# New ports collection makefile for: sampsvr
+# Date created: 6 November 2006
+# Whom: Alexander Logvinov <ports@logvinov.com>
+#
+# $FreeBSD$
+
+PORTNAME= sampsvr
+PORTVERSION= 0.1b
+CATEGORIES= games linux
+MASTER_SITES= http://www.sa-mp.com/files/ \
+ http://eu.littlewhitey.com/ \
+ http://server.safclan.net/upload/
+DISTNAME= ${SAMPVER}.linux.cpp6
+
+MAINTAINER= ports@logvinov.com
+COMMENT= Rockstar's GTA: San Andreas multiplayer modification dedicated server
+
+USE_LINUX= yes
+NO_BUILD= yes
+SAMPVER= samp01b
+USE_RC_SUBR= sampd
+WRKSRC= ${WRKDIR}/${PORTNAME}
+PLIST_SUB= SAMPDIR="${PORTNAME}"
+SUB_FILES= pkg-message
+SUB_LIST= SAMPDIR="${PREFIX}/${PORTNAME}"
+
+post-patch:
+ @${MV} ${WRKSRC}/server.cfg ${WRKSRC}/server.cfg.dist
+ @${MV} ${WRKSRC}/${SAMPVER} ${WRKSRC}/${USE_RC_SUBR}
+
+do-install:
+ @${CP} -Rp ${WRKSRC}/ ${PREFIX}/${PORTNAME}
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/games/sampsvr/distinfo b/games/sampsvr/distinfo
new file mode 100644
index 000000000000..0b3bba55da21
--- /dev/null
+++ b/games/sampsvr/distinfo
@@ -0,0 +1,3 @@
+MD5 (samp01b.linux.cpp6.tar.gz) = 2923c82d27b5af4e306a0bbe2a5a655d
+SHA256 (samp01b.linux.cpp6.tar.gz) = fc9ff738506989985f1f224761a22906af8b5e6910c6860aaddae617fce0cfba
+SIZE (samp01b.linux.cpp6.tar.gz) = 230006
diff --git a/games/sampsvr/files/pkg-message.in b/games/sampsvr/files/pkg-message.in
new file mode 100644
index 000000000000..568fe8bc43e2
--- /dev/null
+++ b/games/sampsvr/files/pkg-message.in
@@ -0,0 +1,5 @@
+***********************************************************************
+# cp %%SAMPDIR%%/server.cfg.dist %%SAMPDIR%%/server.cfg
+
+Read %%SAMPDIR%%/README to configure SA-MP Server
+***********************************************************************
diff --git a/games/sampsvr/files/sampd.in b/games/sampsvr/files/sampd.in
new file mode 100644
index 000000000000..f494fbc2d26c
--- /dev/null
+++ b/games/sampsvr/files/sampd.in
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: sampd
+# REQUIRE: NETWORKING
+#
+# Add the following line to /etc/rc.conf[.local] to enable sampd
+#
+# sampd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable sampd.
+
+. %%RC_SUBR%%
+
+name="sampd"
+rcvar=${name}_enable
+
+load_rc_config $name
+
+: ${sampd_enable="NO"}
+: ${sampd_chdir="%%SAMPDIR%%"}
+
+command="%%SAMPDIR%%/sampd"
+command_args="&"
+required_files="%%SAMPDIR%%/server.cfg"
+start_precmd="sampd_prestart"
+stop_precmd="sampd_prestop"
+
+sampd_prestart() {
+ if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then
+ err 1 "Linux support required"
+ fi
+}
+
+sampd_prestop() {
+ rc_pid=`echo $rc_pid | awk '{print $1}'`
+}
+
+run_rc_command "$1"
diff --git a/games/sampsvr/pkg-descr b/games/sampsvr/pkg-descr
new file mode 100644
index 000000000000..9ccf8e3163e9
--- /dev/null
+++ b/games/sampsvr/pkg-descr
@@ -0,0 +1,5 @@
+A multiplayer modification for the PC version
+of Rockstar's GTA: San Andreas allowing users
+to play together over internet or LAN connections
+
+WWW: http://www.sa-mp.com/
diff --git a/games/sampsvr/pkg-plist b/games/sampsvr/pkg-plist
new file mode 100644
index 000000000000..3a11cc2bbc2d
--- /dev/null
+++ b/games/sampsvr/pkg-plist
@@ -0,0 +1,31 @@
+@unexec if cmp -s %D/%%SAMPDIR%%/server.cfg %D/%%SAMPDIR%%/server.cfg.dist; then rm -f %D/%%SAMPDIR%/server.cfg; fi
+%%SAMPDIR%%/filterscripts/admingivecash.amx
+%%SAMPDIR%%/gamemodes/src/freighter.pwn
+%%SAMPDIR%%/gamemodes/src/rivershell.pwn
+%%SAMPDIR%%/gamemodes/src/lvdm.pwn
+%%SAMPDIR%%/gamemodes/src/lyse.pwn
+%%SAMPDIR%%/gamemodes/src/ls-parachute.pwn
+%%SAMPDIR%%/gamemodes/src/manhunt-lv.pwn
+%%SAMPDIR%%/gamemodes/src/minigunmadness.pwn
+%%SAMPDIR%%/gamemodes/src/area51.pwn
+%%SAMPDIR%%/gamemodes/src/cng.pwn
+%%SAMPDIR%%/gamemodes/src/monster.pwn
+%%SAMPDIR%%/gamemodes/src/sftdm.pwn
+%%SAMPDIR%%/gamemodes/ls-parachute.amx
+%%SAMPDIR%%/gamemodes/sftdm.amx
+%%SAMPDIR%%/gamemodes/lvdm.amx
+%%SAMPDIR%%/gamemodes/monster.amx
+%%SAMPDIR%%/gamemodes/rivershell.amx
+%%SAMPDIR%%/gamemodes/freighter.amx
+%%SAMPDIR%%/gamemodes/manhunt-lv.amx
+%%SAMPDIR%%/gamemodes/area51.amx
+%%SAMPDIR%%/gamemodes/lyse.amx
+%%SAMPDIR%%/gamemodes/minigunmadness.amx
+%%SAMPDIR%%/announce
+%%SAMPDIR%%/README
+%%SAMPDIR%%/sampd
+%%SAMPDIR%%/server.cfg.dist
+@dirrmtry %%SAMPDIR%%/gamemodes/src
+@dirrmtry %%SAMPDIR%%/gamemodes
+@dirrmtry %%SAMPDIR%%/filterscripts
+@dirrmtry %%SAMPDIR%%