games/minecraft-server: Update to 1.18.1

PR:             260452
(cherry picked from commit 9b7bf0835c)
This commit is contained in:
Jonathan Price 2021-12-26 14:40:41 +01:00 committed by Juraj Lutter
parent 966b63a041
commit 190d1538ad
6 changed files with 34 additions and 6 deletions

View File

@ -1,7 +1,7 @@
PORTNAME= minecraft-server
PORTVERSION= 1.17.1
PORTVERSION= 1.18.1
CATEGORIES= games java
MASTER_SITES= https://launcher.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/
MASTER_SITES= https://launcher.mojang.com/v1/objects/125e5adf40c659fd3bce3e66e67a16bb49ecc1b9/
DISTNAME= server
EXTRACT_SUFX= .jar
DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
@ -29,6 +29,7 @@ GROUPS= ${USERS}
NO_BUILD= yes
USE_JAVA= yes
JAVA_VERSION= 17
SUB_FILES= minecraft-server pkg-deinstall pkg-message
SUB_LIST= VERSION=${PORTVERSION}
PLIST_SUB= VERSION=${PORTVERSION}

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1626387031
SHA256 (minecraft-server-1.17.1/server.jar) = e8c211b41317a9f5a780c98a89592ecb72eb39a6e475d4ac9657e5bc9ffaf55f
SIZE (minecraft-server-1.17.1/server.jar) = 43626592
TIMESTAMP = 1639124790
SHA256 (minecraft-server-1.18.1/server.jar) = ebcd120ad81480b968a548df6ffb83b88075e95195c8ff63d461c9df4df5dbdf
SIZE (minecraft-server-1.18.1/server.jar) = 46324407

View File

@ -5,5 +5,6 @@ if [ "$(id -u)" != "0" ]; then
exit 1
fi
export JAVA_VERSION=17
cd %%PREFIX%%/minecraft-server
su -m mcserver -c "java $(cat %%PREFIX%%/etc/minecraft-server/java-args.txt) -jar server.jar nogui"
su -m mcserver -c "%%LOCALBASE%%/bin/java $(cat %%PREFIX%%/etc/minecraft-server/java-args.txt) -jar server.jar nogui"

View File

@ -28,6 +28,8 @@ console_cmd="${name}_console"
status_cmd="${name}_status"
kill_cmd="${name}_kill"
export JAVA_VERSION=17
is_running()
{
pgrep -qu mcserver java

View File

@ -4,6 +4,9 @@ if [ "$2" != "POST-DEINSTALL" ]; then
exit 0
fi
find "%%PREFIX%%/minecraft-server/libraries" -type d -empty -delete
find "%%PREFIX%%/minecraft-server/versions" -type d -empty -delete
echo
echo "NOTE: The game world has not been deleted. It is still in"
echo "/var/db/minecraft-server. If it is no longer required, it will"

View File

@ -17,5 +17,26 @@ minecraft-server/world
@dir minecraft-server
@dir /var/db/minecraft-server
@dir /var/log/minecraft-server
@rmtry minecraft-server/libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar
@rmtry minecraft-server/libraries/it/unimi/dsi/fastutil/8.5.6/fastutil-8.5.6.jar
@rmtry minecraft-server/libraries/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar
@rmtry minecraft-server/libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
@rmtry minecraft-server/libraries/org/apache/logging/log4j/log4j-core/2.14.1/log4j-core-2.14.1.jar
@rmtry minecraft-server/libraries/org/apache/logging/log4j/log4j-slf4j18-impl/2.14.1/log4j-slf4j18-impl-2.14.1.jar
@rmtry minecraft-server/libraries/org/apache/logging/log4j/log4j-api/2.14.1/log4j-api-2.14.1.jar
@rmtry minecraft-server/libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar
@rmtry minecraft-server/libraries/net/java/dev/jna/jna/5.9.0/jna-5.9.0.jar
@rmtry minecraft-server/libraries/net/java/dev/jna/jna-platform/5.9.0/jna-platform-5.9.0.jar
@rmtry minecraft-server/libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar
@rmtry minecraft-server/libraries/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar
@rmtry minecraft-server/libraries/com/google/code/gson/gson/2.8.8/gson-2.8.8.ja
@rmtry minecraft-server/libraries/com/google/code/gson/gson/2.8.8/gson-2.8.8.jar
@rmtry minecraft-server/libraries/com/mojang/datafixerupper/4.0.26/datafixerupper-4.0.26.jar
@rmtry minecraft-server/libraries/com/mojang/brigadier/1.0.18/brigadier-1.0.18.jar
@rmtry minecraft-server/libraries/com/mojang/authlib/3.2.38/authlib-3.2.38.jar
@rmtry minecraft-server/libraries/com/mojang/javabridge/1.2.24/javabridge-1.2.24.jar
@rmtry minecraft-server/libraries/com/github/oshi/oshi-core/5.8.2/oshi-core-5.8.2.jar
@rmtry minecraft-server/libraries/io/netty/netty-all/4.1.68.Final/netty-all-4.1.68.Final.jar
@rmtry minecraft-server/versions/1.18.1/server-1.18.1.jar
@owner
@group