From ea018f88ac82e97f58deba995465467d54785c19 Mon Sep 17 00:00:00 2001 From: Alarig Le Lay Date: Thu, 30 Apr 2020 14:01:05 +0200 Subject: [PATCH] games-server/factorio-server: New ebuild Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Alarig Le Lay --- games-server/factorio-server/Manifest | 1 + ....ebuild => factorio-server-0.17.79.ebuild} | 9 ++++++- .../factorio-server/files/factorio.confd | 4 ++++ .../factorio-server/files/factorio.initd | 24 +++++++++++++++++++ games-server/factorio-server/metadata.xml | 15 ++++++++++++ 5 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 games-server/factorio-server/Manifest rename games-server/factorio-server/{factorio-server-0.16.51-r1.ebuild => factorio-server-0.17.79.ebuild} (82%) create mode 100644 games-server/factorio-server/files/factorio.confd create mode 100755 games-server/factorio-server/files/factorio.initd create mode 100644 games-server/factorio-server/metadata.xml diff --git a/games-server/factorio-server/Manifest b/games-server/factorio-server/Manifest new file mode 100644 index 0000000..d554991 --- /dev/null +++ b/games-server/factorio-server/Manifest @@ -0,0 +1 @@ +DIST factorio-server-0.17.79.tar.xz 32864892 BLAKE2B c583e6c53b08977bf3ddfced5908babd02020ad932ca83fceaab2ef86a15ac62e2755dd9576bdf57dcb79ecc0291ef45772bc824222654c6f73cdcb090e5b928 SHA512 a1201a20914c0c90a91c9a329a4edb15f5904fc4f5b70687204381c9fc5ab157b4dd2a11928ac705de1afd44150f600d8087d6a52e16f9b236a51769d97a9bb6 diff --git a/games-server/factorio-server/factorio-server-0.16.51-r1.ebuild b/games-server/factorio-server/factorio-server-0.17.79.ebuild similarity index 82% rename from games-server/factorio-server/factorio-server-0.16.51-r1.ebuild rename to games-server/factorio-server/factorio-server-0.17.79.ebuild index 4dd7fe6..9e44c26 100644 --- a/games-server/factorio-server/factorio-server-0.16.51-r1.ebuild +++ b/games-server/factorio-server/factorio-server-0.17.79.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -10,6 +10,13 @@ LICENSE="Factorio" SLOT="0" KEYWORDS="~amd64" +DEPENDS=" + acct-group/factorio + acct-user/factorio +" + +RESTRICT="bindist mirror" + S="${WORKDIR}/factorio" src_install() { diff --git a/games-server/factorio-server/files/factorio.confd b/games-server/factorio-server/files/factorio.confd new file mode 100644 index 0000000..ca8997b --- /dev/null +++ b/games-server/factorio-server/files/factorio.confd @@ -0,0 +1,4 @@ +FACTORIO_PATH="/opt/factorio" +FACTORIO_OPTS="--start-server-load-latest --server-settings ./data/server-settings.json" +FACTORIO_USER="factorio" +FACTORIO_GROUP="factorio" diff --git a/games-server/factorio-server/files/factorio.initd b/games-server/factorio-server/files/factorio.initd new file mode 100755 index 0000000..194d5dc --- /dev/null +++ b/games-server/factorio-server/files/factorio.initd @@ -0,0 +1,24 @@ +#!/sbin/openrc-run +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +name="factorio daemon" +description="2D infinite game" +command="${FACTORIO_PATH}/bin/x64/factorio" +command_args="${factorio_args}" + +command_background=1 +directory="${FACTORIO_PATH}" +pidfile="/run/${RC_SVCNAME}.pid" + +command_user="${FACTORIO_USER:-root}" +command_group="${FACTORIO_GROUP:-root}" + +depend() { + need net +} + +start_pre() { + checkpath -d -m 0750 -o "${command_user}:${command_group}" \ + "${directory}" +} diff --git a/games-server/factorio-server/metadata.xml b/games-server/factorio-server/metadata.xml new file mode 100644 index 0000000..f9c7c32 --- /dev/null +++ b/games-server/factorio-server/metadata.xml @@ -0,0 +1,15 @@ + + + + + alarig@swordarmor.fr + Alarig Le Lay + + + You will be mining resources, researching technologies, building + infrastructure, automating production and fighting enemies. Use your + imagination to design your factory, combine simple elements into ingenious + structures, apply management skills to keep it working, and protect it from + the creatures who don't really like you. + +