aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2014-04-18 16:09:22 +0800
committerpawel <pawel@FreeBSD.org>2014-04-18 16:09:22 +0800
commit2291fa4fec458c771c5a5cd0ab0bdc078043b51a (patch)
treecfdbb4422f12807fb29cfc94c547bc83d981029c /games
parent3a46f9d7801ce8bec87aafc7064b649f263b3621 (diff)
downloadfreebsd-ports-gnome-2291fa4fec458c771c5a5cd0ab0bdc078043b51a.tar.gz
freebsd-ports-gnome-2291fa4fec458c771c5a5cd0ab0bdc078043b51a.tar.zst
freebsd-ports-gnome-2291fa4fec458c771c5a5cd0ab0bdc078043b51a.zip
- Add staging support
- Define DOCS option - Use @sample for config file
Diffstat (limited to 'games')
-rw-r--r--games/sampsvr/Makefile42
-rw-r--r--games/sampsvr/files/pkg-message.in2
-rw-r--r--games/sampsvr/pkg-plist4
3 files changed, 16 insertions, 32 deletions
diff --git a/games/sampsvr/Makefile b/games/sampsvr/Makefile
index 3b2ca1fff633..c0ddde2ecec2 100644
--- a/games/sampsvr/Makefile
+++ b/games/sampsvr/Makefile
@@ -3,6 +3,7 @@
PORTNAME= sampsvr
PORTVERSION= 0.3c
+PORTREVISION= 1
CATEGORIES= games linux
MASTER_SITES= http://files.sa-mp.com/
DISTNAME= samp${PORTVERSION:S,.,,}svr
@@ -21,44 +22,29 @@ PORTDOCS= LICENSE README
PLIST_SUB= SAMPDIR="${SAMPDIR:S,^${PREFIX}/,,}"
SUB_FILES= pkg-message
SUB_LIST= SAMPDIR="${SAMPDIR}" SAMPBIN=samp03svr
-.if !defined(NOPORTDOCS)
-SUB_LIST+= NOTEWORK="Read ${DOCSDIR}/README to configure SA-MP Server"
-.else
-SUB_LIST+= NOTEWORK=""
-.endif
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE= DOCS
do-install:
- ${MKDIR} ${SAMPDIR}
+ @${MKDIR} ${STAGEDIR}${SAMPDIR}
.for i in announce samp-npc samp03svr
${BRANDELF} -t Linux ${WRKSRC}/${i}
- ${INSTALL_PROGRAM} ${WRKSRC}/${i} ${SAMPDIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/${i} ${STAGEDIR}${SAMPDIR}
.endfor
- ${MKDIR} ${DATADIR}
+ @${MKDIR} ${STAGEDIR}${DATADIR}
cd ${WRKSRC} && \
${FIND} . -type d ! -empty -exec \
- ${MKDIR} "${DATADIR}/{}" \;
+ ${MKDIR} "${STAGEDIR}${DATADIR}/{}" \;
.for i in filterscripts gamemodes include npcmodes scriptfiles
cd ${WRKSRC} && \
${FIND} ${i} -type f -exec \
- ${INSTALL_DATA} "{}" "${DATADIR}/{}" \;
- ${LN} -sf ${DATADIR}/${i}/ ${SAMPDIR}/${i}
+ ${INSTALL_DATA} "{}" "${STAGEDIR}${DATADIR}/{}" \;
+ ${LN} -sf ${DATADIR}/${i} ${STAGEDIR}${SAMPDIR}/${i}
.endfor
-.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}
+ ${INSTALL_DATA} ${WRKSRC}/server.cfg \
+ ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.cfg.sample
+ ${LN} -sf ${PREFIX}/etc/${PORTNAME}.cfg ${STAGEDIR}${SAMPDIR}/server.cfg
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/games/sampsvr/files/pkg-message.in b/games/sampsvr/files/pkg-message.in
index 03daa1adf618..b91a9084efd2 100644
--- a/games/sampsvr/files/pkg-message.in
+++ b/games/sampsvr/files/pkg-message.in
@@ -1,5 +1,5 @@
***********************************************************************
Edit %%PREFIX%%/etc/sampsvr.cfg before using
Your password must be changed from the default password
-%%NOTEWORK%%
+Read %%DOCSDIR%%/README to configure SA-MP Server
***********************************************************************
diff --git a/games/sampsvr/pkg-plist b/games/sampsvr/pkg-plist
index 1d649a2d9146..4503d0b89055 100644
--- a/games/sampsvr/pkg-plist
+++ b/games/sampsvr/pkg-plist
@@ -1,6 +1,4 @@
-@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
+@sample etc/sampsvr.cfg.sample
%%SAMPDIR%%/announce
%%SAMPDIR%%/samp-npc
%%SAMPDIR%%/samp03svr