games-server/factorio-server: Init adaptation for SLOT
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
parent
98c350ace9
commit
683a388dbc
|
@ -20,6 +20,9 @@ RESTRICT="bindist mirror"
|
||||||
S="${WORKDIR}/factorio"
|
S="${WORKDIR}/factorio"
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
|
sed -i "s/%SLOT/${SLOT}" "${FILESDIR}"/factorio.confd || \
|
||||||
|
die "SLOTing sed failed"
|
||||||
|
|
||||||
insinto "/opt/factorio-${SLOT}"
|
insinto "/opt/factorio-${SLOT}"
|
||||||
doins -r *
|
doins -r *
|
||||||
exeinto "/opt/factorio-${SLOT}"/bin/x64
|
exeinto "/opt/factorio-${SLOT}"/bin/x64
|
||||||
|
|
|
@ -8,7 +8,6 @@ HOMEPAGE="https://www.factorio.com/"
|
||||||
SRC_URI="https://www.factorio.com/get-download/${PV}/headless/linux64 -> ${P}.tar.xz"
|
SRC_URI="https://www.factorio.com/get-download/${PV}/headless/linux64 -> ${P}.tar.xz"
|
||||||
LICENSE="Factorio"
|
LICENSE="Factorio"
|
||||||
SLOT="${PV%.*}"
|
SLOT="${PV%.*}"
|
||||||
KEYWORDS="~amd64"
|
|
||||||
|
|
||||||
DEPEND="
|
DEPEND="
|
||||||
acct-group/factorio
|
acct-group/factorio
|
||||||
|
@ -20,13 +19,16 @@ RESTRICT="bindist mirror"
|
||||||
S="${WORKDIR}/factorio"
|
S="${WORKDIR}/factorio"
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
|
sed -i "s/%SLOT/${SLOT}" "${FILESDIR}"/factorio.confd || \
|
||||||
|
die "SLOTing sed failed"
|
||||||
|
|
||||||
insinto "/opt/factorio-${SLOT}"
|
insinto "/opt/factorio-${SLOT}"
|
||||||
doins -r *
|
doins -r *
|
||||||
exeinto "/opt/factorio-${SLOT}"/bin/x64
|
exeinto "/opt/factorio-${SLOT}"/bin/x64
|
||||||
doexe bin/x64/factorio
|
doexe bin/x64/factorio
|
||||||
|
|
||||||
newinitd "${FILESDIR}"/factorio.initd factorio
|
newinitd "${FILESDIR}"/factorio.initd "factorio-${SLOT}"
|
||||||
newconfd "${FILESDIR}"/factorio.confd factorio
|
newconfd "${FILESDIR}"/factorio.confd "factorio-${SLOT}"
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst() {
|
pkg_postinst() {
|
||||||
|
|
|
@ -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_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_USER="factorio"
|
||||||
FACTORIO_GROUP="factorio"
|
FACTORIO_GROUP="factorio"
|
||||||
|
|
Loading…
Reference in a new issue