blob: f81015f946abcd940d7821520359d5cd7c595c5c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# New ports collection makefile for: sampsvr
# Date created: 6 November 2006
# Whom: Alexander Logvinov <ports@logvinov.com>
#
# $FreeBSD$
PORTNAME= sampsvr
DISTVERSION= 0.2.1.2
CATEGORIES= games linux
MASTER_SITES= http://www.sa-mp.com/files/ \
http://eu.littlewhitey.com/ \
http://dedi.azer.nl/upload/ \
http://www.kfcgang.com/files/
DISTNAME= samp021r2.svr
MAINTAINER= ports@logvinov.com
COMMENT= Rockstar's GTA: San Andreas multiplayer modification dedicated server
USE_LINUX= yes
NO_BUILD= yes
WRKSRC= ${WRKDIR}/samp02
USE_DOS2UNIX= server.cfg *.pwn
USE_RC_SUBR= sampd
SAMPDIR= ${PREFIX}/lib/${PORTNAME}
PORTDOCS= README
PLIST_SUB= SAMPDIR="${SAMPDIR:S,^${PREFIX}/,,}"
SUB_FILES= pkg-message
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>
do-install:
${MKDIR} ${SAMPDIR}
.for i in samp02svr 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.post.mk>
|