From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C3DBA138335 for ; Sun, 5 Aug 2018 21:48:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D1767E0856; Sun, 5 Aug 2018 21:48:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 85CBFE0856 for ; Sun, 5 Aug 2018 21:48:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6C5B3335CEE for ; Sun, 5 Aug 2018 21:48:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1BA7C39E for ; Sun, 5 Aug 2018 21:48:02 +0000 (UTC) From: "Patrice Clement" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrice Clement" Message-ID: <1533505651.27c7803e28b027c7adfbd598c2d4190b7a8d0329.monsieurp@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-server/minecraft-server/files/, games-server/minecraft-server/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-server/minecraft-server/Manifest games-server/minecraft-server/files/README.gentoo games-server/minecraft-server/files/minecraft-server-r1.initd games-server/minecraft-server/minecraft-server-1.13.ebuild X-VCS-Directories: games-server/minecraft-server/ games-server/minecraft-server/files/ X-VCS-Committer: monsieurp X-VCS-Committer-Name: Patrice Clement X-VCS-Revision: 27c7803e28b027c7adfbd598c2d4190b7a8d0329 X-VCS-Branch: master Date: Sun, 5 Aug 2018 21:48:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 27862f7f-dad9-4f1b-9422-40cb9e0c8eba X-Archives-Hash: 6123599501c6f45369c8cc4c4d8437b9 commit: 27c7803e28b027c7adfbd598c2d4190b7a8d0329 Author: Conrad Kostecki kostecki com> AuthorDate: Mon Jul 30 14:05:28 2018 +0000 Commit: Patrice Clement gentoo org> CommitDate: Sun Aug 5 21:47:31 2018 +0000 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 00000000000..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 00000000000..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 00000000000..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/" +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-r1.initd 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 +}