diff --git a/games-server/factorio-server/Manifest b/games-server/factorio-server/Manifest index a46d2a3..82eda6b 100644 --- a/games-server/factorio-server/Manifest +++ b/games-server/factorio-server/Manifest @@ -1 +1,2 @@ DIST factorio-server-1.1.104.tar.xz 59010576 BLAKE2B bc1de3483e28e005adc787304d6eeb955a3e978ee2e0028fa47d7e5a90b188539e02c1c97650ea396f08088a413907340aa275a92596e68b5c5d1aad5e105545 SHA512 664b5f2ff08b96f18febcd9743859e2910283d8a53c303c07c8fede6afe187e4b113fccde01b537ae0a1d91076f051be22be7fb57884cb7dfa397964ae8fe9f5 +DIST factorio-server-2.0.8.tar.xz 81837616 BLAKE2B e2f58d4e80191bce98147b038084e6878a68fd31806bd5079a0934dc0247feed84368a3fb089de3ff4a7ca499744e1a9026d346fcccfb2fdfcf5481829551efb SHA512 207ff2aa43e81940da792bdb3c991e49c58261157449bd026155b43695de3b7ed8d0a718fdb778375b5baecec84560fd0e61257cff1e135c337b674ff7e9988a diff --git a/games-server/factorio-server/factorio-server-2.0.8.ebuild b/games-server/factorio-server/factorio-server-2.0.8.ebuild new file mode 100644 index 0000000..04bd93a --- /dev/null +++ b/games-server/factorio-server/factorio-server-2.0.8.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Factorio is a game in which you build and maintain factories" +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 + acct-user/factorio +" + +RESTRICT="bindist mirror" + +S="${WORKDIR}/factorio" + +src_install() { + insinto "/opt/factorio-${SLOT}" + doins -r * + exeinto "/opt/factorio-${SLOT}"/bin/x64 + doexe bin/x64/factorio + + newinitd "${FILESDIR}"/factorio.initd "factorio-${SLOT}" + newconfd "${FILESDIR}"/factorio.confd "factorio-${SLOT}" + + sed -i "s/%SLOT%/${SLOT}/" "${D}/etc/conf.d/factorio-${SLOT}" || \ + die "SLOTing sed failed" +} + +pkg_postinst() { + einfo "As factorio user, copy data/server-settings.example.json to" + einfo "config/server-settings.json and data/server-whitelist.example.json" + einfo "to config/server-whitelist.json and adapt it according to your needs." + einfo "" + einfo "Then, run bin/x64/factorio --create ./saves/my-save.zip to create a" + einfo "new map, and start the service." +}