summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2019-12-13 00:37:20 +0100
committerConrad Kostecki <conikost@gentoo.org>2019-12-13 01:14:25 +0100
commitd79058fa965ac6f2737f9a236e3b06678b67169a (patch)
tree40b68440925c61496952bd0d77490dbf5fd874df /games-server
parentgames-server/bedrock-server: drop old version (diff)
downloadgentoo-d79058fa965ac6f2737f9a236e3b06678b67169a.tar.gz
gentoo-d79058fa965ac6f2737f9a236e3b06678b67169a.tar.bz2
gentoo-d79058fa965ac6f2737f9a236e3b06678b67169a.zip
games-server/minecraft-server: bump to version 1.15.0
Also changed from app-misc/screen to app-misc/dtach, to use a lightweight alternative for the interactive process. Package-Manager: Portage-2.3.81, Repoman-2.3.20 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'games-server')
-rw-r--r--games-server/minecraft-server/Manifest1
-rw-r--r--games-server/minecraft-server/files/minecraft-server.initd-r347
-rw-r--r--games-server/minecraft-server/minecraft-server-1.15.0.ebuild48
3 files changed, 96 insertions, 0 deletions
diff --git a/games-server/minecraft-server/Manifest b/games-server/minecraft-server/Manifest
index 59a1c2a41bf9..8eefe9cc834a 100644
--- a/games-server/minecraft-server/Manifest
+++ b/games-server/minecraft-server/Manifest
@@ -1 +1,2 @@
DIST minecraft-server-1.14.4.jar 35958734 BLAKE2B 058d6609296394e4714a159976d4de0261a552a919e33db1e54d97e3d2ee90cd4356b60190b807050d3c7ab336149d1c9be55093ba002735ccc6a162706c6ee3 SHA512 b3d2852c6fa1b996bbf2fa9fc1fb860c6bca5136bcc5ddd3d236d85789c6bce81620f6b2d69eaa10c41d020fe0bb54de2fa601b3df3093af2691853a4445e1f8
+DIST minecraft-server-1.15.0.jar 36164465 BLAKE2B e209abacd4a90964b7ccf19333224c0235c91f6f560a9c83f585c92cc973f3dea292032a67ef99aac8e8f17aedd557a0d8f548edda5a187c6a20def091e1ed9a SHA512 66775b4be5a38fe7e3fc94c50b870d58cc21d4da1b4f4437d749b5b6f93680a2206b5a1eac7e55b42072619686b0bdf16ed5850ce8db9c65f6d2508529bac0a4
diff --git a/games-server/minecraft-server/files/minecraft-server.initd-r3 b/games-server/minecraft-server/files/minecraft-server.initd-r3
new file mode 100644
index 000000000000..a76d6d23e67f
--- /dev/null
+++ b/games-server/minecraft-server/files/minecraft-server.initd-r3
@@ -0,0 +1,47 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+if [ "${SVCNAME}" = "minecraft-server" ]; then
+ instance="main"
+else
+ instance="${SVCNAME#minecraft-server.}"
+fi
+
+dtach_tmpfile="$(mktemp -u)"
+minecraft_command="/usr/bin/minecraft-server"
+minecraft_logs="/var/log/minecraft-server"
+minecraft_logs_instance="${minecraft_logs}/${instance}"
+minecraft_path="/var/lib/minecraft-server"
+minecraft_path_instance="${minecraft_path}/${instance}"
+name="Minecraft Server (World: ${instance})"
+pidfile="/run/minecraft-server.${instance}.pid"
+start_stop_daemon_args="--chdir ${minecraft_path_instance} --env JAVA_OPTS='${MINECRAFT_OPTS}'"
+
+command="/usr/bin/dtach"
+command_background="true"
+command_args="-N ${dtach_tmpfile} ${minecraft_command}"
+command_group="minecraft"
+command_user="minecraft"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -o "${command_user}:${command_group}" -q "${minecraft_path}" "${minecraft_path_instance}"
+
+ checkpath -f -o "${command_user}:${command_group}" -q "${minecraft_path_instance}"/eula.txt
+ echo "eula=true" > "${minecraft_path_instance}"/eula.txt
+
+ checkpath -d -o "${command_user}:${command_group}" -q "${minecraft_logs}" "${minecraft_logs_instance}"
+
+ if [ ! -L "${minecraft_path_instance}"/logs ]; then
+ cd "${minecraft_path_instance}" && ln -s ../../../log/minecraft-server/"${instance}" logs
+ fi
+
+ if [ -z "${MINECRAFT_OPTS}" ]; then
+ eerror "You must define MINECRAFT_OPTS in /etc/conf.d/minecraft.${SVCNAME}!"
+ return 1
+ fi
+}
diff --git a/games-server/minecraft-server/minecraft-server-1.15.0.ebuild b/games-server/minecraft-server/minecraft-server-1.15.0.ebuild
new file mode 100644
index 000000000000..83a226fa6960
--- /dev/null
+++ b/games-server/minecraft-server/minecraft-server-1.15.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGIT_COMMIT="e9f105b3c5c7e85c7b445249a93362a22f62442d"
+
+inherit readme.gentoo-r1 java-pkg-2
+
+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 ~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_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-r3 minecraft-server
+ newconfd "${FILESDIR}"/minecraft-server.confd minecraft-server
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}