1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00
freebsd-ports/games/minecraft-server/Makefile
Danilo G. Baio 46d3e322c2 games/minecraft-server: Update to 1.12.2
While here, mark as architecture neutral.

PR:		224792
Submitted by:	Jonathan Price <freebsd@jonathanprice.org> (maintainer)
2018-01-01 23:52:56 +00:00

70 lines
2.0 KiB
Makefile

# $FreeBSD$
PORTNAME= minecraft-server
PORTVERSION= 1.12.2
CATEGORIES= games java
MASTER_SITES= https://s3.amazonaws.com/Minecraft.Download/versions/${PORTVERSION}/
DISTFILES= minecraft_server.${PORTVERSION}.jar
EXTRACT_ONLY=
MAINTAINER= freebsd@jonathanprice.org
COMMENT= Dedicated server for the game Minecraft
LICENSE= minecraft
LICENSE_NAME= Minecraft End User License Agreement
LICENSE_TEXT= The license can be viewed at: https://account.mojang.com/documents/minecraft_eula
LICENSE_PERMS= no-dist-mirror no-dist-sell no-pkg-mirror no-pkg-sell
OPTIONS_SINGLE= RUN
OPTIONS_SINGLE_RUN= DAEMON STANDALONE
DAEMON_DESC= Run as a service
STANDALONE_DESC= Run the .jar file directly
OPTIONS_SUB= yes
OPTIONS_DEFAULT= STANDALONE
USERS= mcserver
GROUPS= ${USERS}
NO_BUILD= yes
USE_JAVA= yes
SUB_FILES= minecraft-server \
pkg-message \
pkg-deinstall
SUB_LIST= VERSION=${PORTVERSION}
PLIST_SUB= VERSION=${PORTVERSION}
CONFIG_FILES= banned-ips.json \
banned-players.json \
eula.txt \
ops.json \
server.properties \
usercache.json \
whitelist.json
DAEMON_VARS= USE_RC_SUBR=minecraft
DAEMON_RUN_DEPENDS= tmux:sysutils/tmux
NO_ARCH= yes
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}
${INSTALL_DATA} ${DISTDIR}/${DISTFILES} ${STAGEDIR}${PREFIX}/${PORTNAME}
${MKDIR} ${STAGEDIR}${ETCDIR}
${MKDIR} ${STAGEDIR}/var/db/minecraft-server
${MKDIR} ${STAGEDIR}/var/log/minecraft-server
.for file in ${CONFIG_FILES}
${LN} -s ${ETCDIR}/${file} ${STAGEDIR}${PREFIX}/${PORTNAME}/${file}
.endfor
${LN} -sf /var/log/minecraft-server ${STAGEDIR}${PREFIX}/${PORTNAME}/logs
${LN} -sf /var/log/minecraft-server/debug ${STAGEDIR}${PREFIX}/${PORTNAME}/debug
${LN} -sf /var/db/minecraft-server ${STAGEDIR}${PREFIX}/${PORTNAME}/world
${LN} -sf ${PREFIX}/${PORTNAME}/${DISTFILES} ${STAGEDIR}${PREFIX}/${PORTNAME}/minecraft_server.jar
post-install-STANDALONE-on:
${INSTALL_SCRIPT} ${WRKDIR}/minecraft-server ${STAGEDIR}${PREFIX}/bin
${CP} ${FILESDIR}/java-args.txt ${STAGEDIR}${ETCDIR}
.include <bsd.port.mk>