summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-server/minecraft-server/minecraft-server-1.16.5-r1.ebuild')
-rw-r--r--games-server/minecraft-server/minecraft-server-1.16.5-r1.ebuild55
1 files changed, 55 insertions, 0 deletions
diff --git a/games-server/minecraft-server/minecraft-server-1.16.5-r1.ebuild b/games-server/minecraft-server/minecraft-server-1.16.5-r1.ebuild
new file mode 100644
index 000000000000..d66a93f97015
--- /dev/null
+++ b/games-server/minecraft-server/minecraft-server-1.16.5-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGIT_COMMIT="1b557e7b033b583cd9f66746b7a9ab1ec1673ced"
+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"
+S="${WORKDIR}"
+
+LICENSE="Mojang"
+SLOT="0"
+KEYWORDS="amd64 ~arm64 x86"
+RESTRICT="bindist mirror"
+
+RDEPEND="
+ acct-group/minecraft
+ acct-user/minecraft
+ app-misc/dtach
+ || (
+ >=virtual/jre-1.8
+ >=virtual/jdk-1.8
+ )
+"
+
+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} -Dlog4j.configurationFile=log4j2_112-116.xml" --pkg_args nogui
+
+ insinto /usr/share/minecraft-server
+ doins "${FILESDIR}"/log4j2_112-116.xml
+
+ newinitd "${FILESDIR}"/minecraft-server.initd-r6 minecraft-server
+ newconfd "${FILESDIR}"/minecraft-server.confd-r1 minecraft-server
+ systemd_newunit "${FILESDIR}"/minecraft-server.service-r1 minecraft-server@.service
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}