2020-08-21 13:59:48 +02:00
|
|
|
# Copyright 1999-2020 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=7
|
|
|
|
|
2020-09-10 21:32:46 +02:00
|
|
|
EGIT_COMMIT="f02f4473dbf152c23d7d484952121db0b36698cb"
|
|
|
|
README_GENTOO_SUFFIX="-r1"
|
2020-08-21 13:59:48 +02:00
|
|
|
|
|
|
|
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/dtach
|
|
|
|
|| (
|
|
|
|
>=virtual/jre-1.8
|
|
|
|
>=virtual/jdk-1.8
|
|
|
|
)
|
|
|
|
"
|
|
|
|
|
|
|
|
RESTRICT="bindist mirror"
|
|
|
|
|
|
|
|
S="${WORKDIR}"
|
|
|
|
|
|
|
|
src_unpack() {
|
2020-09-10 21:32:46 +02:00
|
|
|
cp "${DISTDIR}/${A}" "${WORKDIR}" || die
|
2020-08-21 13:59:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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}"
|
|
|
|
|
2020-09-10 21:32:46 +02:00
|
|
|
newinitd "${FILESDIR}"/minecraft-server.initd-r4 minecraft-server
|
|
|
|
newconfd "${FILESDIR}"/minecraft-server.confd-r1 minecraft-server
|
2020-08-21 13:59:48 +02:00
|
|
|
|
|
|
|
readme.gentoo_create_doc
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
readme.gentoo_print_elog
|
|
|
|
}
|