aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvanilla <vanilla@FreeBSD.org>2014-06-08 11:11:56 +0800
committervanilla <vanilla@FreeBSD.org>2014-06-08 11:11:56 +0800
commitdf20de8851b9e6048cc6afc6a015870a3708f9bc (patch)
tree19324d8f5421b9a53c781a9251013e3a9a300741
parent127433db79026df97eb31964299621a7847fcece (diff)
downloadfreebsd-ports-gnome-df20de8851b9e6048cc6afc6a015870a3708f9bc.tar.gz
freebsd-ports-gnome-df20de8851b9e6048cc6afc6a015870a3708f9bc.tar.zst
freebsd-ports-gnome-df20de8851b9e6048cc6afc6a015870a3708f9bc.zip
1: Stagify.
2: use @sample on pkg-plist. 3: bump version.
-rw-r--r--games/minecraft-server/Makefile27
-rw-r--r--games/minecraft-server/pkg-plist34
2 files changed, 20 insertions, 41 deletions
diff --git a/games/minecraft-server/Makefile b/games/minecraft-server/Makefile
index 46016140c178..8c15c2a61263 100644
--- a/games/minecraft-server/Makefile
+++ b/games/minecraft-server/Makefile
@@ -3,6 +3,7 @@
PORTNAME= minecraft-server
PORTVERSION= 1.4.7
+PORTREVISION= 1
CATEGORIES= games java
MASTER_SITES= http://assets.minecraft.net/${PORTVERSION:S|.|_|g}/ \
http://media-mcw.cursecdn.com/f/f7/:icon
@@ -40,7 +41,6 @@ CONFIG_FILES= banned-ips.txt \
server.properties \
white-list.txt
-NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MX11}
@@ -59,10 +59,10 @@ PLIST_SUB+= X11="@comment "
.endif
do-install:
- ${MKDIR} ${DATADIR}
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/minecraft_server.jar ${DATADIR}/
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/minecraft_server.jar ${STAGEDIR}${DATADIR}/
.if ${PORT_OPTIONS:MX11}
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/Bookshelf.png ${PREFIX}/share/pixmaps/minecraft-server.png
+ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/Bookshelf.png ${STAGEDIR}${PREFIX}/share/pixmaps/minecraft-server.png
.endif
echo "#!/bin/sh" > ${WRKDIR}/${PORTNAME}
echo "if ! test -d ~/.minecraft-server ; then" >> ${WRKDIR}/${PORTNAME}
@@ -73,22 +73,13 @@ do-install:
echo "java -Xmx1024M -Xms1024M -jar ${DATADIR}/minecraft_server.jar" >> ${WRKDIR}/${PORTNAME}
echo "java -Xmx1024M -Xms1024M -jar ${DATADIR}/minecraft_server.jar nogui" >> ${WRKDIR}/${PORTNAME}-nogui
.if ${PORT_OPTIONS:MX11}
- ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin/
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
.endif
- ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}-nogui ${PREFIX}/bin/
- ${MKDIR} ${ETCDIR}
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}-nogui ${STAGEDIR}${PREFIX}/bin/
+ ${MKDIR} ${STAGEDIR}${ETCDIR}
.for file in ${CONFIG_FILES}
- ${INSTALL_DATA} ${FILESDIR}/${file}.sample ${DATADIR}
- if [ ! -f ${ETCDIR}/${file} ]; then \
- ${CP} -p ${DATADIR}/${file}.sample ${ETCDIR}/${file} ; \
- fi
- ${CHMOD} 644 ${DATADIR}/${file}* ${ETCDIR}/${file}
- ${LN} -s ${ETCDIR}/${file} ${DATADIR}/${file}
+ ${INSTALL_DATA} ${FILESDIR}/${file}.sample ${STAGEDIR}${ETCDIR}
+ ${CHMOD} 644 ${STAGEDIR}${ETCDIR}/${file}.sample
.endfor
- ${CHOWN} -R ${USERS}:${GROUPS} ${DATADIR}
- ${CHOWN} -R ${USERS}:${GROUPS} ${ETCDIR}
-
-post-install:
- ${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/games/minecraft-server/pkg-plist b/games/minecraft-server/pkg-plist
index 3fc644a0b5c5..1e983d9ea631 100644
--- a/games/minecraft-server/pkg-plist
+++ b/games/minecraft-server/pkg-plist
@@ -1,28 +1,16 @@
@stopdaemon minecraft
-%%DATADIR%%/minecraft_server.jar
%%X11%%bin/minecraft-server
bin/minecraft-server-nogui
-@exec mkdir -p %D/etc/minecraft
-@unexec if cmp -s %D/%%DATADIR%%/ops.txt.sample %D/etc/minecraft/ops.txt; then rm -f %D/etc/minecraft/ops.txt; fi
-@unexec if cmp -s %D/%%DATADIR%%/banned-ips.txt.sample %D/etc/minecraft/banned-ips.txt; then rm -f %D/etc/minecraft/banned-ips.txt; fi
-@unexec if cmp -s %D/%%DATADIR%%/banned-players.txt.sample %D/etc/minecraft/banned-players.txt; then rm -f %D/etc/minecraft/banned-players.txt; fi
-@unexec if cmp -s %D/%%DATADIR%%/white-list.txt.sample %D/etc/minecraft/white-list.txt; then rm -f %D/etc/minecraft/white-list.txt; fi
-@unexec if cmp -s %D/%%DATADIR%%/server.properties.sample %D/etc/minecraft/server.properties; then rm -f %D/etc/minecraft/server.properties; fi
-%%DATADIR%%/server.properties
-%%DATADIR%%/ops.txt
-%%DATADIR%%/white-list.txt
-%%DATADIR%%/banned-ips.txt
-%%DATADIR%%/banned-players.txt
-%%DATADIR%%/server.properties.sample
-@exec if [ ! -f %D/etc/minecraft/server.properties ] ; then cp -p %D/%F %B/server.properties; fi
-%%DATADIR%%/ops.txt.sample
-@exec if [ ! -f %D/etc/minecraft/ops.txt ] ; then cp -p %D/%F %B/ops.txt; fi
-%%DATADIR%%/white-list.txt.sample
-@exec if [ ! -f %D/etc/minecraft/white-list.txt ] ; then cp -p %D/%F %B/white-list.txt; fi
-%%DATADIR%%/banned-ips.txt.sample
-@exec if [ ! -f %D/etc/minecraft/banned-ips.txt ] ; then cp -p %D/%F %B/banned-ips.txt; fi
-%%DATADIR%%/banned-players.txt.sample
-@exec if [ ! -f %D/etc/minecraft/banned-players.txt ] ; then cp -p %D/%F %B/banned-players.txt; fi
+@owner mcserver
+@group mcserver
+@sample %%ETCDIR%%/banned-ips.txt.sample
+@sample %%ETCDIR%%/banned-players.txt.sample
+@sample %%ETCDIR%%/ops.txt.sample
+@sample %%ETCDIR%%/server.properties.sample
+@sample %%ETCDIR%%/white-list.txt.sample
+%%DATADIR%%/minecraft_server.jar
+@owner
+@group
%%X11%%share/pixmaps/minecraft-server.png
@dirrmtry %%DATADIR%%
-@dirrmtry etc/minecraft
+@dirrmtry %%ETCDIR%%