aboutsummaryrefslogtreecommitdiff
path: root/games/sampsvr
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2007-02-20 08:03:51 +0000
committerRong-En Fan <rafan@FreeBSD.org>2007-02-20 08:03:51 +0000
commitf068026dad925403602e7785e15ad585a76132c9 (patch)
treec07eaa0acfccd9dce063bc782f5354120048e36c /games/sampsvr
parentd7ce389c96160b2ebc15a4c65c14cdd6837f50be (diff)
downloadports-f068026dad925403602e7785e15ad585a76132c9.tar.gz
ports-f068026dad925403602e7785e15ad585a76132c9.zip
- Update to 0.1b r2
- Respect DOCSDIR, DATADIR - Install files into PREFIX/lib/PORTNAME - Handle configuration files according to Porter's Handbook - BRANDELF where necessary PR: ports/109303 Submitted by: Alexander Logvinov <ports at logvinov.com> (maintainer)
Notes
Notes: svn path=/head/; revision=185551
Diffstat (limited to 'games/sampsvr')
-rw-r--r--games/sampsvr/Makefile52
-rw-r--r--games/sampsvr/distinfo6
-rw-r--r--games/sampsvr/files/pkg-message.in5
-rw-r--r--games/sampsvr/files/sampd.in2
-rw-r--r--games/sampsvr/pkg-plist62
5 files changed, 81 insertions, 46 deletions
diff --git a/games/sampsvr/Makefile b/games/sampsvr/Makefile
index 8ec06633b343..7272c0f95fb4 100644
--- a/games/sampsvr/Makefile
+++ b/games/sampsvr/Makefile
@@ -6,32 +6,64 @@
PORTNAME= sampsvr
PORTVERSION= 0.1b
+PORTREVISION= 1
CATEGORIES= games linux
MASTER_SITES= http://www.sa-mp.com/files/ \
- http://eu.littlewhitey.com/ \
- http://server.safclan.net/upload/
-DISTNAME= ${SAMPVER}.linux.cpp6
+ http://eu.littlewhitey.com/
+DISTNAME= ${SAMPVER}-cpp6
MAINTAINER= ports@logvinov.com
COMMENT= Rockstar's GTA: San Andreas multiplayer modification dedicated server
USE_LINUX= yes
NO_BUILD= yes
-SAMPVER= samp01b
+SAMPVER= samp01b-r2
USE_RC_SUBR= sampd
-WRKSRC= ${WRKDIR}/${PORTNAME}
-PLIST_SUB= SAMPDIR="${PORTNAME}"
+SAMPDIR= ${PREFIX}/lib/${PORTNAME}
+PORTDOCS= README
+PLIST_SUB= SAMPDIR="${SAMPDIR:S,^${PREFIX}/,,}"
SUB_FILES= pkg-message
-SUB_LIST= SAMPDIR="${PREFIX}/${PORTNAME}"
+SUB_LIST= SAMPDIR="${SAMPDIR}"
+.if !defined(NOPORTDOCS)
+SUB_LIST+= NOTEWORK="Read ${DOCSDIR}/README to configure SA-MP Server"
+.else
+SUB_LIST+= NOTEWORK=""
+.endif
+
+.include <bsd.port.pre.mk>
post-patch:
- @${MV} ${WRKSRC}/server.cfg ${WRKSRC}/server.cfg.dist
@${MV} ${WRKSRC}/${SAMPVER} ${WRKSRC}/${USE_RC_SUBR}
do-install:
- @${CP} -Rp ${WRKSRC}/ ${PREFIX}/${PORTNAME}
+ ${MKDIR} ${SAMPDIR}
+.for i in ${USE_RC_SUBR} announce
+ ${BRANDELF} -t Linux ${WRKSRC}/${i}
+ ${INSTALL_PROGRAM} ${WRKSRC}/${i} ${SAMPDIR}
+.endfor
+ ${MKDIR} ${DATADIR}
+ cd ${WRKSRC} && \
+ ${FIND} . -type d ! -empty -exec \
+ ${MKDIR} "${DATADIR}/{}" \; && \
+ ${FIND} filterscripts -type f -exec \
+ ${INSTALL_DATA} "{}" "${DATADIR}/{}" \; && \
+ ${FIND} gamemodes -type f -exec \
+ ${INSTALL_DATA} "{}" "${DATADIR}/{}" \;
+ ${LN} -sf ${DATADIR}/filterscripts/ ${SAMPDIR}/filterscripts
+ ${LN} -sf ${DATADIR}/gamemodes/ ${SAMPDIR}/gamemodes
+.if !exists(${PREFIX}/etc/${PORTNAME}.cfg)
+ ${INSTALL_DATA} ${WRKSRC}/server.cfg ${PREFIX}/etc/${PORTNAME}.cfg
+.endif
+ ${INSTALL_DATA} ${WRKSRC}/server.cfg ${PREFIX}/etc/${PORTNAME}.cfg.dist
+ ${LN} -sf ${PREFIX}/etc/${PORTNAME}.cfg ${SAMPDIR}/server.cfg
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for i in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
+.endfor
+.endif
post-install:
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/games/sampsvr/distinfo b/games/sampsvr/distinfo
index 0b3bba55da21..2cb1c15509cc 100644
--- a/games/sampsvr/distinfo
+++ b/games/sampsvr/distinfo
@@ -1,3 +1,3 @@
-MD5 (samp01b.linux.cpp6.tar.gz) = 2923c82d27b5af4e306a0bbe2a5a655d
-SHA256 (samp01b.linux.cpp6.tar.gz) = fc9ff738506989985f1f224761a22906af8b5e6910c6860aaddae617fce0cfba
-SIZE (samp01b.linux.cpp6.tar.gz) = 230006
+MD5 (samp01b-r2-cpp6.tar.gz) = 2f29871118e0aa39dd789af1685d62cb
+SHA256 (samp01b-r2-cpp6.tar.gz) = 6096dde84636063dea432bc57ad85ddd48e4d11fe9c5355b498ef5d3eed174de
+SIZE (samp01b-r2-cpp6.tar.gz) = 189703
diff --git a/games/sampsvr/files/pkg-message.in b/games/sampsvr/files/pkg-message.in
index 568fe8bc43e2..6ec8eaa2c45f 100644
--- a/games/sampsvr/files/pkg-message.in
+++ b/games/sampsvr/files/pkg-message.in
@@ -1,5 +1,4 @@
***********************************************************************
-# cp %%SAMPDIR%%/server.cfg.dist %%SAMPDIR%%/server.cfg
-
-Read %%SAMPDIR%%/README to configure SA-MP Server
+Edit %%PREFIX%%/etc/sampsvr.cfg before using
+%%NOTEWORK%%
***********************************************************************
diff --git a/games/sampsvr/files/sampd.in b/games/sampsvr/files/sampd.in
index f494fbc2d26c..94a571dab35e 100644
--- a/games/sampsvr/files/sampd.in
+++ b/games/sampsvr/files/sampd.in
@@ -22,7 +22,7 @@ load_rc_config $name
command="%%SAMPDIR%%/sampd"
command_args="&"
-required_files="%%SAMPDIR%%/server.cfg"
+required_files="%%PREFIX%%/etc/sampsvr.cfg"
start_precmd="sampd_prestart"
stop_precmd="sampd_prestop"
diff --git a/games/sampsvr/pkg-plist b/games/sampsvr/pkg-plist
index 3a11cc2bbc2d..f792781bbedb 100644
--- a/games/sampsvr/pkg-plist
+++ b/games/sampsvr/pkg-plist
@@ -1,31 +1,35 @@
-@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
+@unexec if cmp -s %D/etc/sampsvr.cfg %D/etc/sampsvr.cfg.dist; then rm -f %D/etc/sampsvr.cfg; fi
+etc/sampsvr.cfg.dist
+@exec [ -f %B/sampsvr.cfg ] || cp %B/%f %B/sampsvr.cfg
%%SAMPDIR%%/sampd
-%%SAMPDIR%%/server.cfg.dist
-@dirrmtry %%SAMPDIR%%/gamemodes/src
-@dirrmtry %%SAMPDIR%%/gamemodes
-@dirrmtry %%SAMPDIR%%/filterscripts
+%%SAMPDIR%%/announce
+%%SAMPDIR%%/server.cfg
+%%SAMPDIR%%/filterscripts
+%%SAMPDIR%%/gamemodes
+%%DATADIR%%/filterscripts/admingivecash.amx
+%%DATADIR%%/gamemodes/src/sftdm.pwn
+%%DATADIR%%/gamemodes/src/rivershell.pwn
+%%DATADIR%%/gamemodes/src/lvdm.pwn
+%%DATADIR%%/gamemodes/src/lyse.pwn
+%%DATADIR%%/gamemodes/src/ls-parachute.pwn
+%%DATADIR%%/gamemodes/src/manhunt-lv.pwn
+%%DATADIR%%/gamemodes/src/minigunmadness.pwn
+%%DATADIR%%/gamemodes/src/area51.pwn
+%%DATADIR%%/gamemodes/src/cng.pwn
+%%DATADIR%%/gamemodes/src/monster.pwn
+%%DATADIR%%/gamemodes/src/freighter.pwn
+%%DATADIR%%/gamemodes/lyse.amx
+%%DATADIR%%/gamemodes/ls-parachute.amx
+%%DATADIR%%/gamemodes/sftdm.amx
+%%DATADIR%%/gamemodes/lvdm.amx
+%%DATADIR%%/gamemodes/monster.amx
+%%DATADIR%%/gamemodes/rivershell.amx
+%%DATADIR%%/gamemodes/freighter.amx
+%%DATADIR%%/gamemodes/manhunt-lv.amx
+%%DATADIR%%/gamemodes/area51.amx
+%%DATADIR%%/gamemodes/minigunmadness.amx
+@dirrmtry %%DATADIR%%/gamemodes/src
+@dirrmtry %%DATADIR%%/gamemodes
+@dirrmtry %%DATADIR%%/filterscripts
+@dirrmtry %%DATADIR%%
@dirrmtry %%SAMPDIR%%