summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2021-12-05 21:48:47 +0100
committerConrad Kostecki <conikost@gentoo.org>2021-12-05 22:45:09 +0100
commit192d06f996fdd9d536eb6b91595f2222f6e825a6 (patch)
treea5bd3c45afdb70ccb93cc838494d8fce433651d3 /games-server/minecraft-server
parentgames-server/minecraft-server: add 1.18 (diff)
downloadgentoo-192d06f996fdd9d536eb6b91595f2222f6e825a6.tar.gz
gentoo-192d06f996fdd9d536eb6b91595f2222f6e825a6.tar.bz2
gentoo-192d06f996fdd9d536eb6b91595f2222f6e825a6.zip
games-server/minecraft-server: drop 1.17.1
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'games-server/minecraft-server')
-rw-r--r--games-server/minecraft-server/Manifest1
-rw-r--r--games-server/minecraft-server/files/minecraft-server-bin21
-rw-r--r--games-server/minecraft-server/minecraft-server-1.17.1.ebuild54
3 files changed, 21 insertions, 55 deletions
diff --git a/games-server/minecraft-server/Manifest b/games-server/minecraft-server/Manifest
index 0d4cb060fd8b..7e5df1a3842c 100644
--- a/games-server/minecraft-server/Manifest
+++ b/games-server/minecraft-server/Manifest
@@ -1,3 +1,2 @@
DIST minecraft-server-1.16.5.jar 37962360 BLAKE2B 355715b809c09581e457f54618bd6ddab91b1c488d709d402fa6690d32244298d44191d439b8d9f27f4853f7e7658bfa2db88b61697a1caeb66da76ab211d9f8 SHA512 8321c50d788c6a3a3e8b2146bf1b20f6a3da87dd21ec4bd1fda0031d26f728d64e56a6a230ba5d857f4d500d7ba281eb4e3c28b6715f29d8dcba79d8c0ddf03f
-DIST minecraft-server-1.17.1.jar 43626592 BLAKE2B f926c01890faf6904eb38ea14f1affddd32dbe992c4df9d125507325fa11ec98eeaa63622387a3608d89bbf2602a447efc8560a49b24ba517ed55bf2fd18fac9 SHA512 fe6e48e2cee38224d2c88f04c19afca9c21fddbe6077b5538e0a0581c2f6c4478ec99bc369bec5131d709b89273dbd769659f149163f0c284b518a38e58a5bcc
DIST minecraft-server-1.18.jar 46323386 BLAKE2B f603477f69b0c675cff45585329dfd97f94343655946475b81d272e1ce27e08d79d3f9bdc07a476cfe2794602eaa83e353ebecdbc61043ff4f4b335a55639f08 SHA512 be8face6d0ad94578afa520eb0eecde31c1e3ea711a6f5349e0fa1a26e95069cc3a409435e37adc6a3d871a82ddfb86de8af3395c06b11148921058c220b03d0
diff --git a/games-server/minecraft-server/files/minecraft-server-bin b/games-server/minecraft-server/files/minecraft-server-bin
new file mode 100644
index 000000000000..b2664211f2cf
--- /dev/null
+++ b/games-server/minecraft-server/files/minecraft-server-bin
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# Options
+JAVA_JAR="/usr/share/minecraft-server/lib/minecraft-server.jar"
+JAVA_OPTS="$@"
+MINECRAFT_OPTS="nogui"
+
+# Choose JAVA
+set -- /opt/openjdk-bin-17.* /usr/lib*/openjdk-17
+while ! [ -d "${1}" ]; do
+ if [ ${#} -eq 1 ]; then
+ echo "Error: No JAVA 17 runtime found!"
+ exit 1
+ fi
+
+ shift
+done
+JAVA_HOME="${1}"
+
+# Launch Minecraft server
+"${JAVA_HOME}"/bin/java ${JAVA_OPTS} -jar "${JAVA_JAR}" "${MINECRAFT_OPTS}"
diff --git a/games-server/minecraft-server/minecraft-server-1.17.1.ebuild b/games-server/minecraft-server/minecraft-server-1.17.1.ebuild
deleted file mode 100644
index 3d1fcc0bad1e..000000000000
--- a/games-server/minecraft-server/minecraft-server-1.17.1.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-EGIT_COMMIT="a16d67e5807f57fc4e550299cf20226194497dc2"
-README_GENTOO_SUFFIX="-r1"
-
-inherit readme.gentoo-r1 java-pkg-2 systemd
-
-DESCRIPTION="The official server for the sandbox video game"
-HOMEPAGE="https://www.minecraft.net/"
-SRC_URI="https://launcher.mojang.com/v1/objects/${EGIT_COMMIT}/server.jar -> ${P}.jar"
-
-LICENSE="Mojang"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~x86"
-
-RDEPEND="
- acct-group/minecraft
- acct-user/minecraft
- app-misc/dtach
- || (
- >=virtual/jre-1.8
- >=virtual/jdk-1.8
- )
-"
-
-RESTRICT="bindist mirror"
-
-S="${WORKDIR}"
-
-src_unpack() {
- cp "${DISTDIR}/${A}" "${WORKDIR}" || die
-}
-
-src_compile() {
- :;
-}
-
-src_install() {
- java-pkg_newjar minecraft-server-${PV}.jar minecraft-server.jar
- java-pkg_dolauncher minecraft-server --jar minecraft-server.jar --java_args "\${JAVA_OPTS}"
-
- newinitd "${FILESDIR}"/minecraft-server.initd-r4 minecraft-server
- newconfd "${FILESDIR}"/minecraft-server.confd-r1 minecraft-server
- systemd_newunit "${FILESDIR}"/minecraft-server.service minecraft-server@.service
-
- readme.gentoo_create_doc
-}
-
-pkg_postinst() {
- readme.gentoo_print_elog
-}