blob: e2d01c6a84b6b692316ebd2c74a749e7667c9938 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
PORTNAME= minecraft-server
PORTVERSION= 1.16.5
CATEGORIES= games java
MASTER_SITES= https://launcher.mojang.com/v1/objects/1b557e7b033b583cd9f66746b7a9ab1ec1673ced/
DISTNAME= server
EXTRACT_SUFX= .jar
DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
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-deinstall pkg-message
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}/${DIST_SUBDIR}/${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
post-install-STANDALONE-on:
${INSTALL_SCRIPT} ${WRKDIR}/minecraft-server \
${STAGEDIR}${PREFIX}/bin
${CP} ${FILESDIR}/java-args.txt ${STAGEDIR}${ETCDIR}
.include <bsd.port.mk>
|