2006-12-02 01:32:11 +01:00
|
|
|
# New ports collection makefile for: sampsvr
|
|
|
|
# Date created: 6 November 2006
|
|
|
|
# Whom: Alexander Logvinov <ports@logvinov.com>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= sampsvr
|
2011-01-05 09:38:59 +01:00
|
|
|
PORTVERSION= 0.3c
|
2006-12-02 01:32:11 +01:00
|
|
|
CATEGORIES= games linux
|
2008-12-02 07:58:14 +01:00
|
|
|
MASTER_SITES= http://files.sa-mp.com/
|
2011-01-05 09:38:59 +01:00
|
|
|
DISTNAME= samp${PORTVERSION:S,.,,}svr
|
2006-12-02 01:32:11 +01:00
|
|
|
|
2009-05-28 22:44:16 +02:00
|
|
|
MAINTAINER= avl@FreeBSD.org
|
2006-12-02 01:32:11 +01:00
|
|
|
COMMENT= Rockstar's GTA: San Andreas multiplayer modification dedicated server
|
|
|
|
|
|
|
|
USE_LINUX= yes
|
|
|
|
NO_BUILD= yes
|
2010-09-13 12:05:29 +02:00
|
|
|
WRKSRC= ${WRKDIR}/samp03
|
2009-10-22 13:28:10 +02:00
|
|
|
USE_DOS2UNIX= *.txt *.pwn *.inc
|
2006-12-02 01:32:11 +01:00
|
|
|
USE_RC_SUBR= sampd
|
2008-12-02 07:58:14 +01:00
|
|
|
SAMPDIR= ${PREFIX}/libexec/${PORTNAME}
|
2009-10-22 13:28:10 +02:00
|
|
|
PORTDOCS= LICENSE README
|
|
|
|
PLIST_SUB= SAMPDIR="${SAMPDIR:S,^${PREFIX}/,,}"
|
2006-12-02 01:32:11 +01:00
|
|
|
SUB_FILES= pkg-message
|
2009-10-22 13:28:10 +02:00
|
|
|
SUB_LIST= SAMPDIR="${SAMPDIR}" SAMPBIN=samp03svr
|
2007-02-20 09:03:51 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
SUB_LIST+= NOTEWORK="Read ${DOCSDIR}/README to configure SA-MP Server"
|
|
|
|
.else
|
|
|
|
SUB_LIST+= NOTEWORK=""
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
2006-12-02 01:32:11 +01:00
|
|
|
|
|
|
|
do-install:
|
2007-02-20 09:03:51 +01:00
|
|
|
${MKDIR} ${SAMPDIR}
|
2009-10-22 13:28:10 +02:00
|
|
|
.for i in announce samp-npc samp03svr
|
2007-02-20 09:03:51 +01:00
|
|
|
${BRANDELF} -t Linux ${WRKSRC}/${i}
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/${i} ${SAMPDIR}
|
|
|
|
.endfor
|
|
|
|
${MKDIR} ${DATADIR}
|
|
|
|
cd ${WRKSRC} && \
|
|
|
|
${FIND} . -type d ! -empty -exec \
|
2008-12-02 07:58:14 +01:00
|
|
|
${MKDIR} "${DATADIR}/{}" \;
|
2009-10-22 13:28:10 +02:00
|
|
|
.for i in filterscripts gamemodes include npcmodes scriptfiles
|
2008-12-02 07:58:14 +01:00
|
|
|
cd ${WRKSRC} && \
|
|
|
|
${FIND} ${i} -type f -exec \
|
2007-02-20 09:03:51 +01:00
|
|
|
${INSTALL_DATA} "{}" "${DATADIR}/{}" \;
|
2008-12-02 07:58:14 +01:00
|
|
|
${LN} -sf ${DATADIR}/${i}/ ${SAMPDIR}/${i}
|
|
|
|
.endfor
|
2007-02-20 09:03:51 +01:00
|
|
|
.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
|
2006-12-02 01:32:11 +01:00
|
|
|
|
|
|
|
post-install:
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
2007-02-20 09:03:51 +01:00
|
|
|
.include <bsd.port.post.mk>
|