[gentoo-commits] repo/gentoo:master commit in: games-server/minecraft-server/files/, games-server/minecraft-server/

2024-04-24 Thread Conrad Kostecki
commit: 7ac36649f0fd687fbe945949b7356c4f3b8f5301
Author: Tomasz Regdos  regdos  com>
AuthorDate: Wed Apr 24 12:34:37 2024 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Wed Apr 24 12:50:44 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ac36649

games-server/minecraft-server: fix java version - 1.20.5 requires Java 21

Signed-off-by: Tomasz Regdos  regdos.com>
Closes: https://github.com/gentoo/gentoo/pull/36402
Signed-off-by: Conrad Kostecki  gentoo.org>

 games-server/minecraft-server/files/minecraft-server-bin | 2 +-
 games-server/minecraft-server/minecraft-server-1.20.5.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/games-server/minecraft-server/files/minecraft-server-bin 
b/games-server/minecraft-server/files/minecraft-server-bin
index b2664211f2cf..eb81aaf02103 100644
--- a/games-server/minecraft-server/files/minecraft-server-bin
+++ b/games-server/minecraft-server/files/minecraft-server-bin
@@ -6,7 +6,7 @@ JAVA_OPTS="$@"
 MINECRAFT_OPTS="nogui"
 
 # Choose JAVA
-set -- /opt/openjdk-bin-17.* /usr/lib*/openjdk-17
+set -- /opt/openjdk-bin-21.* /usr/lib*/openjdk-21
 while ! [ -d "${1}" ]; do
if [ ${#} -eq 1 ]; then
echo "Error: No JAVA 17 runtime found!"

diff --git a/games-server/minecraft-server/minecraft-server-1.20.5.ebuild 
b/games-server/minecraft-server/minecraft-server-1.20.5.ebuild
index 7158fdbaf129..1c1c43fc0149 100644
--- a/games-server/minecraft-server/minecraft-server-1.20.5.ebuild
+++ b/games-server/minecraft-server/minecraft-server-1.20.5.ebuild
@@ -23,8 +23,8 @@ RDEPEND="
acct-user/minecraft
app-misc/dtach
|| (
-   dev-java/openjdk:17
-   dev-java/openjdk-bin:17
+   dev-java/openjdk:21
+   dev-java/openjdk-bin:21
)
 "
 



[gentoo-commits] repo/gentoo:master commit in: games-server/minecraft-server/files/, games-server/minecraft-server/

2022-01-20 Thread Conrad Kostecki
commit: e79731e7162418a4799e78365f1cafed2370f70f
Author: Conrad Kostecki  gentoo  org>
AuthorDate: Thu Jan 20 22:50:41 2022 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Thu Jan 20 22:57:53 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e79731e7

games-server/minecraft-server: drop 1.16.5-r1

Signed-off-by: Conrad Kostecki  gentoo.org>

 games-server/minecraft-server/Manifest |  1 -
 .../minecraft-server/files/log4j2_112-116.xml  | 28 --
 .../files/minecraft-server.initd-r5| 62 --
 .../files/minecraft-server.service | 16 --
 .../minecraft-server-1.16.5-r1.ebuild  | 55 ---
 5 files changed, 162 deletions(-)

diff --git a/games-server/minecraft-server/Manifest 
b/games-server/minecraft-server/Manifest
index a2e003172ba4..85eabaa31e91 100644
--- a/games-server/minecraft-server/Manifest
+++ b/games-server/minecraft-server/Manifest
@@ -1,2 +1 @@
-DIST minecraft-server-1.16.5.jar 37962360 BLAKE2B 
355715b809c09581e457f54618bd6ddab91b1c488d709d402fa6690d32244298d44191d439b8d9f27f4853f7e7658bfa2db88b61697a1caeb66da76ab211d9f8
 SHA512 
8321c50d788c6a3a3e8b2146bf1b20f6a3da87dd21ec4bd1fda0031d26f728d64e56a6a230ba5d857f4d500d7ba281eb4e3c28b6715f29d8dcba79d8c0ddf03f
 DIST minecraft-server-1.18.1.jar 46324407 BLAKE2B 
bc974116c00692910955fab6fff2f21f4363c575b28e03af5e7750d98d8f0b9ed52123ac7fffbb0739c775f22190ace2ea7ebe916e1b4deafca82278c4f6a5af
 SHA512 
cb306772c06e88b70475961ec1f057a9edfcef8db334479ec5c28e8b07287b3209bc54d83f7da7e8c63a8581e7ddbb93109acbf491ff74806b27486368640e71

diff --git a/games-server/minecraft-server/files/log4j2_112-116.xml 
b/games-server/minecraft-server/files/log4j2_112-116.xml
deleted file mode 100644
index 569223572f64..
--- a/games-server/minecraft-server/files/log4j2_112-116.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

diff --git a/games-server/minecraft-server/files/minecraft-server.initd-r5 
b/games-server/minecraft-server/files/minecraft-server.initd-r5
deleted file mode 100644
index bfaad750b8c7..
--- a/games-server/minecraft-server/files/minecraft-server.initd-r5
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2021 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} ${MINECRAFT_OPTS}"
-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
-}

diff --git a/games-server/minecraft-server/files/minecraft-server.service 
b/games-server/minecraft-server/files/minecraft-server.service
deleted file mode 100644
index ad9167e5b1c9..
--- 

[gentoo-commits] repo/gentoo:master commit in: games-server/minecraft-server/files/, games-server/minecraft-server/

2021-12-05 Thread Conrad Kostecki
commit: ecb57aff97af9b05af6ae1b92096bf7234cfc104
Author: Conrad Kostecki  gentoo  org>
AuthorDate: Sun Dec  5 20:48:18 2021 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Sun Dec  5 21:45:09 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecb57aff

games-server/minecraft-server: add 1.18

Signed-off-by: Conrad Kostecki  gentoo.org>

 games-server/minecraft-server/Manifest |  1 +
 .../files/minecraft-server.initd-r5| 62 ++
 .../minecraft-server/minecraft-server-1.18.ebuild  | 54 +++
 3 files changed, 117 insertions(+)

diff --git a/games-server/minecraft-server/Manifest 
b/games-server/minecraft-server/Manifest
index f752d9b23835..0d4cb060fd8b 100644
--- a/games-server/minecraft-server/Manifest
+++ b/games-server/minecraft-server/Manifest
@@ -1,2 +1,3 @@
 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.initd-r5 
b/games-server/minecraft-server/files/minecraft-server.initd-r5
new file mode 100644
index ..bfaad750b8c7
--- /dev/null
+++ b/games-server/minecraft-server/files/minecraft-server.initd-r5
@@ -0,0 +1,62 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 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} ${MINECRAFT_OPTS}"
+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
+}

diff --git a/games-server/minecraft-server/minecraft-server-1.18.ebuild 
b/games-server/minecraft-server/minecraft-server-1.18.ebuild
new file mode 100644
index ..0cb12a0680d7
--- /dev/null
+++ b/games-server/minecraft-server/minecraft-server-1.18.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGIT_COMMIT="3cf24a8694aca6267883b17d934efacc5e0d"
+README_GENTOO_SUFFIX="-r1"
+
+inherit readme.gentoo-r1 java-pkg-2 systemd
+
+DESCRIPTION="The official server for the sandbox video game"

[gentoo-commits] repo/gentoo:master commit in: games-server/minecraft-server/files/, games-server/minecraft-server/

2020-11-03 Thread Conrad Kostecki
commit: e3af652a6121b5d82043b51532a183a39e4782ce
Author: Ross Charles Campbell  gmail  com>
AuthorDate: Mon Oct 26 03:51:15 2020 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Tue Nov  3 08:20:56 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3af652a

games-server/minecraft-server: Add systemd unit, add ~arm64 keyword

Tested fine on Pi4

Closes: https://github.com/gentoo/gentoo/pull/18038
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Ross Charles Campbell  gmail.com>
Signed-off-by: Conrad Kostecki  gentoo.org>

 .../files/minecraft-server.service | 16 +++
 .../minecraft-server-1.16.3-r1.ebuild  | 54 ++
 2 files changed, 70 insertions(+)

diff --git a/games-server/minecraft-server/files/minecraft-server.service 
b/games-server/minecraft-server/files/minecraft-server.service
new file mode 100644
index 000..ad9167e5b1c
--- /dev/null
+++ b/games-server/minecraft-server/files/minecraft-server.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Minecraft Server (World: %I)
+After=network.target
+
+[Service]
+User=minecraft
+Group=minecraft
+WorkingDirectory=-/var/lib/minecraft-server/%I
+PIDFile=/run/minecraft-server.%I.pid
+ExecStartPre=!/bin/mkdir -p /var/lib/minecraft-server/%I
+ExecStartPre=!/bin/chown -R minecraft:minecraft /var/lib/minecraft-server/%I
+ExecStartPre=/bin/sh -c 'echo "eula=true" > 
/var/lib/minecraft-server/%I/eula.txt'
+ExecStart=/bin/sh -c '/usr/bin/dtach -N $(mktemp -u) /usr/bin/minecraft-server'
+
+[Install]
+WantedBy=multi-user.target

diff --git a/games-server/minecraft-server/minecraft-server-1.16.3-r1.ebuild 
b/games-server/minecraft-server/minecraft-server-1.16.3-r1.ebuild
new file mode 100644
index 000..59b209b8263
--- /dev/null
+++ b/games-server/minecraft-server/minecraft-server-1.16.3-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGIT_COMMIT="f02f4473dbf152c23d7d484952121db0b36698cb"
+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
+}



[gentoo-commits] repo/gentoo:master commit in: games-server/minecraft-server/files/, games-server/minecraft-server/

2020-11-03 Thread Conrad Kostecki
commit: 16ba4dab8c9dd60b55e85b72b3a305f05ca6ecf5
Author: Conrad Kostecki  gentoo  org>
AuthorDate: Tue Nov  3 07:47:53 2020 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Tue Nov  3 08:20:54 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16ba4dab

games-server/minecraft-server: drop old version

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Conrad Kostecki  gentoo.org>

 games-server/minecraft-server/Manifest |  1 -
 games-server/minecraft-server/files/README.gentoo  | 20 -
 .../minecraft-server/files/minecraft-server.confd  |  7 
 .../files/minecraft-server.initd-r3| 47 -
 .../minecraft-server-1.16.1.ebuild | 48 --
 5 files changed, 123 deletions(-)

diff --git a/games-server/minecraft-server/Manifest 
b/games-server/minecraft-server/Manifest
index 8c6ae129bfd..f7dc629e613 100644
--- a/games-server/minecraft-server/Manifest
+++ b/games-server/minecraft-server/Manifest
@@ -1,2 +1 @@
-DIST minecraft-server-1.16.1.jar 37968964 BLAKE2B 
08c9f3f5b7c5618fd55b40e77a3ab92ed2d8cdf64771fe171292045ee611b6c549f0e732ed3dec2553f2219c219ff8f9b2187563717be14edbffa68ceb05b555
 SHA512 
8fa8bf001cb50e59351f58598fdbd4b7b13cee8d5a6ae7d4486f6259d419c8101123cb18efc96cac7c796ca98483d6d1e9ac3888d6b364d81b86927aee3f350d
 DIST minecraft-server-1.16.3.jar 37942656 BLAKE2B 
1ed70ac476dd202797f46a4844519d816f17c272d0703791d74b651fa8ac4c343a6939b50c5a0230d5bf149a564af6c7603297f0b114ce9fd2487f4bebef1c7e
 SHA512 
ef9956ec55638b54e21e3b504ba2d2ce1b9d09769b5e118a36fbf2d97bd84a5bb49adf9a07328ae3e1c9fd76fe3da0b7d56baaa77bdc55b99d0f45039ada2ac3

diff --git a/games-server/minecraft-server/files/README.gentoo 
b/games-server/minecraft-server/files/README.gentoo
deleted file mode 100644
index ae8c62a9cbf..000
--- a/games-server/minecraft-server/files/README.gentoo
+++ /dev/null
@@ -1,20 +0,0 @@
-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'.

diff --git a/games-server/minecraft-server/files/minecraft-server.confd 
b/games-server/minecraft-server/files/minecraft-server.confd
deleted file mode 100644
index 700498e5aea..000
--- a/games-server/minecraft-server/files/minecraft-server.confd
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# 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"

diff --git a/games-server/minecraft-server/files/minecraft-server.initd-r3 
b/games-server/minecraft-server/files/minecraft-server.initd-r3
deleted file mode 100644
index a76d6d23e67..000
--- a/games-server/minecraft-server/files/minecraft-server.initd-r3
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/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
-

[gentoo-commits] repo/gentoo:master commit in: games-server/minecraft-server/files/, games-server/minecraft-server/

2020-08-23 Thread Conrad Kostecki
commit: 12cf26ce1ef4d7712b2aba972d805aea7f6ca545
Author: Conrad Kostecki  gentoo  org>
AuthorDate: Sun Aug 23 16:51:05 2020 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Sun Aug 23 17:21:45 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12cf26ce

games-server/minecraft-server: add custom attach command

Since the minecraft-server is running as an interactive console process
in background, this custom command 'attach' enables the possibility to
connect with dtach to that interactive console and send commands to
the running server.

Closes: https://github.com/gentoo/gentoo/pull/15055
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Conrad Kostecki  gentoo.org>

 .../minecraft-server/files/README.gentoo-r1| 26 +
 .../files/minecraft-server.confd-r1| 12 +
 .../files/minecraft-server.initd-r4| 62 ++
 games-server/minecraft-server/metadata.xml | 14 -
 .../minecraft-server-1.16.2-r1.ebuild  | 49 +
 5 files changed, 162 insertions(+), 1 deletion(-)

diff --git a/games-server/minecraft-server/files/README.gentoo-r1 
b/games-server/minecraft-server/files/README.gentoo-r1
new file mode 100644
index 000..903ef5a7d9d
--- /dev/null
+++ b/games-server/minecraft-server/files/README.gentoo-r1
@@ -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

diff --git a/games-server/minecraft-server/files/minecraft-server.confd-r1 
b/games-server/minecraft-server/files/minecraft-server.confd-r1
new file mode 100644
index 000..8b380349e9a
--- /dev/null
+++ b/games-server/minecraft-server/files/minecraft-server.confd-r1
@@ -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"

diff --git a/games-server/minecraft-server/files/minecraft-server.initd-r4 
b/games-server/minecraft-server/files/minecraft-server.initd-r4
new file mode 100644
index 000..e81337a7d19
--- /dev/null
+++ b/games-server/minecraft-server/files/minecraft-server.initd-r4
@@ -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 

[gentoo-commits] repo/gentoo:master commit in: games-server/minecraft-server/files/, games-server/minecraft-server/

2020-02-04 Thread Conrad Kostecki
commit: 1b30f4cb34da0d573e81d5e0c9047a43cff6a497
Author: Conrad Kostecki  gentoo  org>
AuthorDate: Tue Feb  4 15:15:18 2020 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Tue Feb  4 17:48:17 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b30f4cb

games-server/minecraft-server: drop old version

Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Conrad Kostecki  gentoo.org>

 games-server/minecraft-server/Manifest |  1 -
 .../files/minecraft-server.initd-r2| 47 --
 .../minecraft-server-1.14.4.ebuild | 57 --
 3 files changed, 105 deletions(-)

diff --git a/games-server/minecraft-server/Manifest 
b/games-server/minecraft-server/Manifest
index 4bddfad1928..29a41498d75 100644
--- a/games-server/minecraft-server/Manifest
+++ b/games-server/minecraft-server/Manifest
@@ -1,2 +1 @@
-DIST minecraft-server-1.14.4.jar 35958734 BLAKE2B 
058d6609296394e4714a159976d4de0261a552a919e33db1e54d97e3d2ee90cd4356b60190b807050d3c7ab336149d1c9be55093ba002735ccc6a162706c6ee3
 SHA512 
b3d2852c6fa1b996bbf2fa9fc1fb860c6bca5136bcc5ddd3d236d85789c6bce81620f6b2d69eaa10c41d020fe0bb54de2fa601b3df3093af2691853a4445e1f8
 DIST minecraft-server-1.15.1.jar 36164938 BLAKE2B 
21ee30c92b3060810fb766a54924b5273f44bfb906592770c101bed3f41cd65fc0cd05b9610fce805860f71088ccf89ac6cbf6a364eb8ca16047b39b8f0aa69f
 SHA512 
4458daa6cd87b04ddbf0819dfc0538d24b8d08c529a94f1abff9b894d24ffb4eb3d0b23b8bfb088b2b6f43fb6f71d17700d9f80dab2ed56dc51c5bef329ba6bb

diff --git a/games-server/minecraft-server/files/minecraft-server.initd-r2 
b/games-server/minecraft-server/files/minecraft-server.initd-r2
deleted file mode 100644
index ec659d145f8..000
--- a/games-server/minecraft-server/files/minecraft-server.initd-r2
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/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.14.4.ebuild 
b/games-server/minecraft-server/minecraft-server-1.14.4.ebuild
deleted file mode 100644
index cfddb597af2..000
--- a/games-server/minecraft-server/minecraft-server-1.14.4.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-EGIT_COMMIT="3dc3d84a581f14691199cf6831b71ed1296a9fdf"
-
-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/screen
-   || (
-   >=virtual/jre-1.8
-   >=virtual/jdk-1.8
-   )
-"
-
-RESTRICT="bindist mirror strip"
-
-S="${WORKDIR}"
-
-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 

[gentoo-commits] repo/gentoo:master commit in: games-server/minecraft-server/files/, games-server/minecraft-server/

2018-09-15 Thread Michał Górny
commit: 540a42375c94647e82d24ecdae085b55c2208d2e
Author: Conrad Kostecki  kostecki  com>
AuthorDate: Wed Sep  5 21:52:42 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Sep 15 20:09:58 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=540a4237

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

 games-server/minecraft-server/Manifest |  1 +
 .../files/minecraft-server.initd-r2| 47 ++
 .../minecraft-server-1.13.1.ebuild | 55 ++
 3 files changed, 103 insertions(+)

diff --git a/games-server/minecraft-server/Manifest 
b/games-server/minecraft-server/Manifest
index b67b5dafa63..f721e094371 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 000..ec659d145f8
--- /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 000..5d2c669486e
--- /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 

[gentoo-commits] repo/gentoo:master commit in: games-server/minecraft-server/files/, games-server/minecraft-server/

2018-08-05 Thread Patrice Clement
commit: 27c7803e28b027c7adfbd598c2d4190b7a8d0329
Author: Conrad Kostecki  kostecki  com>
AuthorDate: Mon Jul 30 14:05:28 2018 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Sun Aug  5 21:47:31 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27c7803e

games-server/minecraft-server: version bump to 1.13.

Closes: https://bugs.gentoo.org/662434
Package-Manager: Portage-2.3.43, Repoman-2.3.10
Closes: https://github.com/gentoo/gentoo/pull/9382

 games-server/minecraft-server/Manifest |  1 +
 games-server/minecraft-server/files/README.gentoo  | 20 
 .../files/minecraft-server-r1.initd| 47 ++
 .../minecraft-server/minecraft-server-1.13.ebuild  | 55 ++
 4 files changed, 123 insertions(+)

diff --git a/games-server/minecraft-server/Manifest 
b/games-server/minecraft-server/Manifest
index 7c3f0d5cf48..5d94477231b 100644
--- a/games-server/minecraft-server/Manifest
+++ b/games-server/minecraft-server/Manifest
@@ -1 +1,2 @@
 DIST minecraft-server-1.12.2.jar 30222121 BLAKE2B 
91733822789405dbec5d335fc67e47d3278138929280c4fdcf6053fb0824651474c8e2310c342862fc1aefdf74f55d0a21d78b3c34f32484ec8196b7c5921d72
 SHA512 
327196bfb833160ae6fb7d12b7d372d031bc0ffbac3455481c1635b01e00f0d5502d4698fbc4f8e7ee59cc3902d56c41261c45d1f1c8f3972e192631f504a0fc
+DIST minecraft-server-1.13.jar 32649675 BLAKE2B 
c137e8009ea201fafe148277aa2d81f7683b99653f74f335659ec239a2cdb3b1271eea290bbda58967fd81075f76edf14622d64d4f25e92e92bb186348acea5d
 SHA512 
726e9775163338660429886dbf940e9ad43d75fa315a8bb2936d23491e8c5717fbd365490b91ff74f876eb498a3674b88f41a526b06a64acbc33d8670b48c342

diff --git a/games-server/minecraft-server/files/README.gentoo 
b/games-server/minecraft-server/files/README.gentoo
new file mode 100644
index 000..ae8c62a9cbf
--- /dev/null
+++ b/games-server/minecraft-server/files/README.gentoo
@@ -0,0 +1,20 @@
+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'.

diff --git a/games-server/minecraft-server/files/minecraft-server-r1.initd 
b/games-server/minecraft-server/files/minecraft-server-r1.initd
new file mode 100644
index 000..872885ecd64
--- /dev/null
+++ b/games-server/minecraft-server/files/minecraft-server-r1.initd
@@ -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.ebuild 
b/games-server/minecraft-server/minecraft-server-1.13.ebuild
new file mode 100644
index 000..2ef64c02f1a
--- /dev/null
+++ b/games-server/minecraft-server/minecraft-server-1.13.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="d0caafb8438ebd206f99930cfaecfa6c9a13dca0"
+
+inherit readme.gentoo-r1 java-pkg-2 user
+
+DESCRIPTION="The official server for the sandbox video game"
+HOMEPAGE="https://www.minecraft.net/;

[gentoo-commits] repo/gentoo:master commit in: games-server/minecraft-server/files/, games-server/minecraft-server/

2018-07-11 Thread Tony Vroon
commit: 98c36709a0e9bfd4e9c61f88b5383a780727a83d
Author: Conrad Kostecki  kostecki  com>
AuthorDate: Wed Jul 11 11:00:18 2018 +
Commit: Tony Vroon  gentoo  org>
CommitDate: Wed Jul 11 11:17:45 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98c36709

games-server/minecraft-server: New package

Closes: https://bugs.gentoo.org/652338
Package-Manager: Portage-2.3.41, Repoman-2.3.9

 games-server/minecraft-server/Manifest |  1 +
 .../minecraft-server/files/minecraft-server.confd  |  7 +++
 .../minecraft-server/files/minecraft-server.initd  | 48 
 games-server/minecraft-server/metadata.xml | 18 ++
 .../minecraft-server-1.12.2.ebuild | 67 ++
 5 files changed, 141 insertions(+)

diff --git a/games-server/minecraft-server/Manifest 
b/games-server/minecraft-server/Manifest
new file mode 100644
index 000..7c3f0d5cf48
--- /dev/null
+++ b/games-server/minecraft-server/Manifest
@@ -0,0 +1 @@
+DIST minecraft-server-1.12.2.jar 30222121 BLAKE2B 
91733822789405dbec5d335fc67e47d3278138929280c4fdcf6053fb0824651474c8e2310c342862fc1aefdf74f55d0a21d78b3c34f32484ec8196b7c5921d72
 SHA512 
327196bfb833160ae6fb7d12b7d372d031bc0ffbac3455481c1635b01e00f0d5502d4698fbc4f8e7ee59cc3902d56c41261c45d1f1c8f3972e192631f504a0fc

diff --git a/games-server/minecraft-server/files/minecraft-server.confd 
b/games-server/minecraft-server/files/minecraft-server.confd
new file mode 100644
index 000..700498e5aea
--- /dev/null
+++ b/games-server/minecraft-server/files/minecraft-server.confd
@@ -0,0 +1,7 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# 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"

diff --git a/games-server/minecraft-server/files/minecraft-server.initd 
b/games-server/minecraft-server/files/minecraft-server.initd
new file mode 100644
index 000..630c88871d7
--- /dev/null
+++ b/games-server/minecraft-server/files/minecraft-server.initd
@@ -0,0 +1,48 @@
+#!/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
+
+java="${JAVA_HOME-/usr}"/bin/java
+minecraft_jar="/usr/share/games/minecraft-server/minecraft-server.jar"
+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}"
+
+command="screen"
+command_args="-DmUS ${screen_name} ${java} ${MINECRAFT_OPTS} -jar 
${minecraft_jar}"
+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/metadata.xml 
b/games-server/minecraft-server/metadata.xml
new file mode 100644
index 000..45b32f4be81
--- /dev/null
+++ b/games-server/minecraft-server/metadata.xml
@@ -0,0 +1,18 @@
+
+http://www.gentoo.org/dtd/metadata.dtd;>
+
+   
+   ck+gen...@bl4ckb0x.de
+   Conrad Kostecki
+   
+   
+   proxy-ma...@gentoo.org
+   Proxy Maintainers
+   
+   
+   Minecraft is a sandbox video game created and designed
+   by Swedish game designer Markus "Notch" Persson,
+   and later fully developed and published by Mojang.
+   This is the headless server for Minecraft.
+   
+

diff --git a/games-server/minecraft-server/minecraft-server-1.12.2.ebuild 
b/games-server/minecraft-server/minecraft-server-1.12.2.ebuild
new file mode 100644
index 000..5b0f749a455
--- /dev/null
+++ b/games-server/minecraft-server/minecraft-server-1.12.2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user
+