mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
1: Stagify.
2: use @sample on pkg-plist. 3: bump version.
This commit is contained in:
parent
5b2f3e36c2
commit
55e9152176
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=356968
@ -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>
|
||||
|
@ -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%%
|
||||
|
Loading…
Reference in New Issue
Block a user