From 683a388dbc6637369d2e121e731111c2f8fb9be5 Mon Sep 17 00:00:00 2001 From: Alarig Le Lay Date: Sun, 31 May 2020 17:25:43 +0200 Subject: [PATCH] games-server/factorio-server: Init adaptation for SLOT Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Alarig Le Lay --- .../factorio-server/factorio-server-0.17.79.ebuild | 3 +++ .../factorio-server/factorio-server-0.18.28.ebuild | 8 +++++--- games-server/factorio-server/files/factorio.confd | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/games-server/factorio-server/factorio-server-0.17.79.ebuild b/games-server/factorio-server/factorio-server-0.17.79.ebuild index 8855c89..d9d5ef9 100644 --- a/games-server/factorio-server/factorio-server-0.17.79.ebuild +++ b/games-server/factorio-server/factorio-server-0.17.79.ebuild @@ -20,6 +20,9 @@ RESTRICT="bindist mirror" S="${WORKDIR}/factorio" src_install() { + sed -i "s/%SLOT/${SLOT}" "${FILESDIR}"/factorio.confd || \ + die "SLOTing sed failed" + insinto "/opt/factorio-${SLOT}" doins -r * exeinto "/opt/factorio-${SLOT}"/bin/x64 diff --git a/games-server/factorio-server/factorio-server-0.18.28.ebuild b/games-server/factorio-server/factorio-server-0.18.28.ebuild index 91d41f1..bbc82d6 100644 --- a/games-server/factorio-server/factorio-server-0.18.28.ebuild +++ b/games-server/factorio-server/factorio-server-0.18.28.ebuild @@ -8,7 +8,6 @@ HOMEPAGE="https://www.factorio.com/" SRC_URI="https://www.factorio.com/get-download/${PV}/headless/linux64 -> ${P}.tar.xz" LICENSE="Factorio" SLOT="${PV%.*}" -KEYWORDS="~amd64" DEPEND=" acct-group/factorio @@ -20,13 +19,16 @@ RESTRICT="bindist mirror" S="${WORKDIR}/factorio" src_install() { + sed -i "s/%SLOT/${SLOT}" "${FILESDIR}"/factorio.confd || \ + die "SLOTing sed failed" + insinto "/opt/factorio-${SLOT}" doins -r * exeinto "/opt/factorio-${SLOT}"/bin/x64 doexe bin/x64/factorio - newinitd "${FILESDIR}"/factorio.initd factorio - newconfd "${FILESDIR}"/factorio.confd factorio + newinitd "${FILESDIR}"/factorio.initd "factorio-${SLOT}" + newconfd "${FILESDIR}"/factorio.confd "factorio-${SLOT}" } pkg_postinst() { diff --git a/games-server/factorio-server/files/factorio.confd b/games-server/factorio-server/files/factorio.confd index 0154785..940a5f0 100644 --- a/games-server/factorio-server/files/factorio.confd +++ b/games-server/factorio-server/files/factorio.confd @@ -1,4 +1,4 @@ -FACTORIO_PATH="/opt/factorio" +FACTORIO_PATH="/opt/factorio-%SLOT%" FACTORIO_OPTS="--start-server-load-latest --server-settings config/server-settings.json --use-server-whitelist true --server-whitelist config/server-whitelist.json" FACTORIO_USER="factorio" FACTORIO_GROUP="factorio"