summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conrad@kostecki.com>2018-09-05 23:52:42 +0200
committerMichał Górny <mgorny@gentoo.org>2018-09-15 22:09:58 +0200
commit540a42375c94647e82d24ecdae085b55c2208d2e (patch)
treef53ce48af72a04166890c370c73bf5298baacbec /games-server
parentmedia-gfx/tuxpaint-stamps: Drop old (diff)
downloadgentoo-540a42375c94647e82d24ecdae085b55c2208d2e.tar.gz
gentoo-540a42375c94647e82d24ecdae085b55c2208d2e.tar.bz2
gentoo-540a42375c94647e82d24ecdae085b55c2208d2e.zip
games-server/minecraft-server: bump to version 1.13.1
Closes: https://bugs.gentoo.org/665316 Package-Manager: Portage-2.3.49, Repoman-2.3.10
Diffstat (limited to 'games-server')
-rw-r--r--games-server/minecraft-server/Manifest1
-rw-r--r--games-server/minecraft-server/files/minecraft-server.initd-r247
-rw-r--r--games-server/minecraft-server/minecraft-server-1.13.1.ebuild55
3 files changed, 103 insertions, 0 deletions
diff --git a/games-server/minecraft-server/Manifest b/games-server/minecraft-server/Manifest
index b67b5dafa63d..f721e0943718 100644
--- a/games-server/minecraft-server/Manifest
+++ b/games-server/minecraft-server/Manifest
@@ -1 +1,2 @@
+DIST minecraft-server-1.13.1.jar 33832589 BLAKE2B 87f3d1bc0650db52c5053ca58785827b30c845fac42f37a98b463ede8341307a881cb06b9a9f3656c0258fdffa88ab9dd41fe28be51263369f24397d50ea2b79 SHA512 a82805cc0b6ea0c3481405eef1910549623db9b025ff78d228ef9c767950b34d1e8c30452f2f6f9ec22a53445a8dd64ebaec7c13cee1a9eac63bfc80725fcc44
DIST minecraft-server-1.13.jar 32649675 BLAKE2B c137e8009ea201fafe148277aa2d81f7683b99653f74f335659ec239a2cdb3b1271eea290bbda58967fd81075f76edf14622d64d4f25e92e92bb186348acea5d SHA512 726e9775163338660429886dbf940e9ad43d75fa315a8bb2936d23491e8c5717fbd365490b91ff74f876eb498a3674b88f41a526b06a64acbc33d8670b48c342
diff --git a/games-server/minecraft-server/files/minecraft-server.initd-r2 b/games-server/minecraft-server/files/minecraft-server.initd-r2
new file mode 100644
index 000000000000..ec659d145f85
--- /dev/null
+++ b/games-server/minecraft-server/files/minecraft-server.initd-r2
@@ -0,0 +1,47 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+if [ "${SVCNAME}" = "minecraft-server" ]; then
+ instance="main"
+else
+ instance="${SVCNAME#minecraft-server.}"
+fi
+
+minecraft_command="/usr/bin/minecraft-server"
+minecraft_logs="/var/log/minecraft-server"
+minecraft_path="/var/lib/minecraft-server/${instance}"
+name="Minecraft Server (World: ${instance})"
+pidfile="/run/minecraft-server.${instance}.pid"
+screen_name="minecraft-server.${instance}"
+start_stop_daemon_args="--chdir ${minecraft_path} --env JAVA_OPTS=\"${MINECRAFT_OPTS}\""
+
+command="screen"
+command_args="-DmUS ${screen_name} ${minecraft_command}"
+command_background="true"
+command_group="minecraft"
+command_user="minecraft"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -o "${command_user}:${command_group}" -q "${minecraft_path}"
+
+ checkpath -f -o "${command_user}:${command_group}" -q "${minecraft_path}"/eula.txt
+ echo "eula=true" > "${minecraft_path}"/eula.txt
+
+ checkpath -d -o "${command_user}:${command_group}" -q "${minecraft_logs}"/"${instance}"
+
+ if [ ! -L "${minecraft_path}"/logs ]; then
+ cd "${minecraft_path}" && 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
+
+ return 0
+}
diff --git a/games-server/minecraft-server/minecraft-server-1.13.1.ebuild b/games-server/minecraft-server/minecraft-server-1.13.1.ebuild
new file mode 100644
index 000000000000..5d2c669486e8
--- /dev/null
+++ b/games-server/minecraft-server/minecraft-server-1.13.1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_PV="fe123682e9cb30031eae351764f653500b7396c9"
+
+inherit readme.gentoo-r1 java-pkg-2 user
+
+DESCRIPTION="The official server for the sandbox video game"
+HOMEPAGE="https://www.minecraft.net/"
+SRC_URI="https://launcher.mojang.com/mc/game/${PV}/server/${MY_PV}/server.jar -> ${P}.jar"
+
+LICENSE="Mojang"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="app-misc/screen
+ >=virtual/jre-1.8"
+
+RESTRICT="bindist mirror strip"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ enewgroup minecraft
+ enewuser minecraft -1 -1 /var/lib/minecraft-server minecraft
+}
+
+src_unpack() {
+ # Don't unpack that jar, just copy it to WORKDIR
+ 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-r2 minecraft-server
+ newconfd "${FILESDIR}"/minecraft-server.confd minecraft-server
+
+ diropts -o minecraft -g minecraft
+ keepdir /var/lib/minecraft-server
+ keepdir /var/log/minecraft-server
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}