games-server/minecraft-server: Version bump to 1.16.3

Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
Alarig Le Lay 2020-09-10 21:32:46 +02:00
parent e24a4b5f28
commit 05ea8dedf6
Signed by: alarig
GPG key ID: 7AFE62C6DF8BCDEC
6 changed files with 119 additions and 6 deletions

View file

@ -1 +1 @@
DIST minecraft-server-1.16.2.jar 37942337 BLAKE2B 538eef87ecfaa13c55a2a177a813914761ff6bc91f5017016207ff90af7eaa02432c3277d01c42b55cfc173f4654d202f954e0058c77b2200c1cebd6839a0021 SHA512 c95500c30e7008784766d8fea2356949eb8477ad7f1eed5e6aa478929468d05437ed322d5c805c26e430a59301f5c96cad79aa258412870ecc0ddc4efe13550f DIST minecraft-server-1.16.3.jar 37942656 BLAKE2B 1ed70ac476dd202797f46a4844519d816f17c272d0703791d74b651fa8ac4c343a6939b50c5a0230d5bf149a564af6c7603297f0b114ce9fd2487f4bebef1c7e SHA512 ef9956ec55638b54e21e3b504ba2d2ce1b9d09769b5e118a36fbf2d97bd84a5bb49adf9a07328ae3e1c9fd76fe3da0b7d56baaa77bdc55b99d0f45039ada2ac3

View file

@ -0,0 +1,26 @@
This package provides an init script and a conf file.
You don't have to modify those files directly,
but instead you can make a symlink of that init script
and a copy of that conf file.
You would do this for every server, you want to setup.
For example, you wan't to setup an world called 'gentoo',
you would do:
cd /etc/init.d
ln -s minecraft-server minecraft-server.gentoo
cd /etc/conf.d
cp minecraft-server minecraft-server.gentoo
After that, make your settings in
/etc/conf.d/minecraft-server.gentoo.
If you don't make a symlink, but use the default scripts,
your world will be called 'main'.
To interact with the console of the corresponding world,
you can use the extra command attach:
rc-service minecraft-server attach
rc-service minecraft-server.gentoo attach

View file

@ -0,0 +1,12 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Dtach options, which will used, when the `attach` extra command is called.
# By default, CTRL+D is used, and no redraw is done,
# when you want to detach from the attached console.
DTACH_OPTS="-e '^D' -r none"
# Java options for your started server
# You should at least define some memory settings (-Xms, -Xmx),
# for maximum memory, as the java default is far to low for Minecraft
MINECRAFT_OPTS="-Xms1024m -Xmx1024m"

View file

@ -0,0 +1,62 @@
#!/sbin/openrc-run
# Copyright 1999-2020 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}'"
description_attach="Attaches to the session (interactive console) of the Minecraft server"
extra_started_commands="attach"
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/${SVCNAME}'!"
return 1
fi
}
attach() {
pidnumber="$(cat ${pidfile})"
dtach_tmpfile="$(cat /proc/${pidnumber}/cmdline | tr '\0' ' ' | awk '{print $3}')"
if [ -S "${dtach_tmpfile}" ]; then
eval "${command}" -a "${dtach_tmpfile}" "${DTACH_OPTS}"
else
eerror "The determined socket file for dtach could not be found!"
eerror "Did the process crash?"
fi
}

View file

@ -5,10 +5,22 @@
<email>conikost@gentoo.org</email> <email>conikost@gentoo.org</email>
<name>Conrad Kostecki</name> <name>Conrad Kostecki</name>
</maintainer> </maintainer>
<longdescription> <longdescription lang="en">
Minecraft is a sandbox video game created and designed Minecraft is a sandbox video game created and designed
by Swedish game designer Markus "Notch" Persson, by Swedish game designer Markus "Notch" Persson,
and later fully developed and published by Mojang. and later fully developed and published by Mojang.
This is the headless server for Minecraft. This is the headless server for Minecraft.
</longdescription> </longdescription>
<longdescription lang="fr">
Minecraft est un jeu vidéo bac à sable créé et conçu par
le développeur Markus Person (alias "Notch"), et plus
tard, pleinement maintenu et édité par Mojang.
Ceci est le serveur "headless" pour Minecraft.
</longdescription>
<upstream>
<bugs-to>https://bugs.mojang.com/projects/MC/issues</bugs-to>
<maintainer status="active">
<name>Mojang</name>
</maintainer>
</upstream>
</pkgmetadata> </pkgmetadata>

View file

@ -3,7 +3,8 @@
EAPI=7 EAPI=7
EGIT_COMMIT="c5f6fb23c3876461d46ec380421e42b289789530" EGIT_COMMIT="f02f4473dbf152c23d7d484952121db0b36698cb"
README_GENTOO_SUFFIX="-r1"
inherit readme.gentoo-r1 java-pkg-2 inherit readme.gentoo-r1 java-pkg-2
@ -30,15 +31,15 @@ RESTRICT="bindist mirror"
S="${WORKDIR}" S="${WORKDIR}"
src_unpack() { src_unpack() {
cp "${DISTDIR}"/${A} "${WORKDIR}" || die cp "${DISTDIR}/${A}" "${WORKDIR}" || die
} }
src_install() { src_install() {
java-pkg_newjar minecraft-server-${PV}.jar minecraft-server.jar java-pkg_newjar minecraft-server-${PV}.jar minecraft-server.jar
java-pkg_dolauncher minecraft-server --jar minecraft-server.jar --java_args "\${JAVA_OPTS}" java-pkg_dolauncher minecraft-server --jar minecraft-server.jar --java_args "\${JAVA_OPTS}"
newinitd "${FILESDIR}"/minecraft-server.initd-r3 minecraft-server newinitd "${FILESDIR}"/minecraft-server.initd-r4 minecraft-server
newconfd "${FILESDIR}"/minecraft-server.confd minecraft-server newconfd "${FILESDIR}"/minecraft-server.confd-r1 minecraft-server
readme.gentoo_create_doc readme.gentoo_create_doc
} }