Verified Commit a620b600 authored by flussence's avatar flussence

Add minecraft server 18w16a snapshot

And comment the updater script so I can figure out this filename format next time I delete it
parent e48822cc
DIST minecraft-server-1.12.2.jar 30222121 BLAKE2B 91733822789405dbec5d335fc67e47d3278138929280c4fdcf6053fb0824651474c8e2310c342862fc1aefdf74f55d0a21d78b3c34f32484ec8196b7c5921d72 SHA512 327196bfb833160ae6fb7d12b7d372d031bc0ffbac3455481c1635b01e00f0d5502d4698fbc4f8e7ee59cc3902d56c41261c45d1f1c8f3972e192631f504a0fc
DIST minecraft-server-18w16a.jar 31620910 BLAKE2B 191dfbed67b1d41987fba116f99447a7e158d65eb4c3a000fde425c4b6006393aa75a3f9af56421bfdeffe62ada09ed35e0ffbdf23bbd0351ed8e758b767648d SHA512 ad470bbe0a9b7f6c56a4d43a631ac98a403a9a5433e3a7664d627780d7dffbd5dff3310bb99bad988e00545245f9b6c842e74ead8b93f0c3f7261d65dbec442e
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit java-pkg-2
# snapshot versions are mangled: "1433" for snapshot 14w33, "1450c" for 14w50c
if [[ ${PV} == [0-9][0-9][0-9][0-9]* ]]; then
MY_PV="${PV:0:2}w${PV:2:3}"
SLOT="snapshot-${MY_PV}"
elif [[ ${PV} == *_pre* ]]; then
MY_PV="${PV/_/-}"
SLOT="snapshot-${MY_PV}"
else
MY_PV="${PV}"
SLOT="stable"
fi
MY_BASEURI="http://s3.amazonaws.com/Minecraft.Download/versions"
DESCRIPTION="Official dedicated server for Minecraft"
HOMEPAGE="http://www.minecraft.net"
SRC_URI="${MY_BASEURI}/${MY_PV}/minecraft_server.${MY_PV}.jar -> ${PN}-${MY_PV}.jar"
LICENSE="Minecraft-clickwrap-EULA"
KEYWORDS="~amd64 ~x86"
IUSE="ipv6"
RESTRICT="mirror"
RDEPEND=">=virtual/jre-1.6"
S="${WORKDIR}"
pkg_setup() {
java-pkg-2_pkg_setup
}
src_unpack() {
true # NOOP!
}
src_install() {
local ARGS
use ipv6 || ARGS="-Djava.net.preferIPv4Stack=true"
java-pkg_newjar "${DISTDIR}/${PN}-${MY_PV}.jar"
java-pkg_dolauncher "${PN}-${MY_PV}" -pre "${FILESDIR}"/directory.sh \
--java_args "-Xmx1G -Xms1G ${ARGS}" --pkg_args "nogui" \
--main net.minecraft.server.MinecraftServer
}
......@@ -2,9 +2,9 @@
use Net::Minecraft::Version;
my Regex $snapshot = /^(\d ** 2) w (\d ** 2) (\w)$/;
my Regex $snapshot-fn = / \d ** 4 \w /;
my Regex $snapshot-fn = / \d ** 4 \w /; #= e.g. minecraft-server-1816a.ebuild
my Regex $prerelease = /^\d+ '.' \d+ '-pre' \d+$/;
my Regex $prerelease-fn = / \d+ '.' \d+ '_pre' \d+ /;
my Regex $prerelease-fn = / \d+ '.' \d+ '_pre' \d+ /; #= e.g. minecraft-server-1.12_pre.ebuild
sub MAIN {
my ($current, $current-file) = get-current-ebuild().kv;
......@@ -37,20 +37,19 @@ sub MAIN {
run(<git commit -a>);
}
sub get-repo-dir() returns IO::Path {
sub get-repo-dir(--> IO::Path) {
$*PROGRAM.parent.parent;
}
sub get-ebuild-dir() returns IO::Path {
sub get-ebuild-dir(--> IO::Path) {
get-repo-dir()
.child('games-server')
.child('minecraft-server')
.cleanup(:parent);
}
sub get-current-ebuild() returns Pair #`(version number => filehandle) {
my Regex $test = rx/'minecraft-server-'
($snapshot-fn | $prerelease-fn) '.ebuild'$/;
sub get-current-ebuild(--> Pair) #`(version number => filehandle) {
my Regex $test = rx/'minecraft-server-' ($snapshot-fn | $prerelease-fn) '.ebuild'$/;
my $ebuild-dir = get-ebuild-dir();
my $ebuild = $ebuild-dir.dir(:$test).cache;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment