diff options
author | Mickaël Thomas | 2016-11-10 01:43:09 +0100 |
---|---|---|
committer | Mickaël Thomas | 2016-11-10 02:09:17 +0100 |
commit | e74557bd59b44891f1a32b63b86db660a0a6e88f (patch) | |
tree | 20dc7fedc6032e46613e29c3d03046d1a30ac851 | |
parent | 34c0f5efa96a76e8b5ecaeb7eb9b77c3dc15b9c9 (diff) | |
download | aur-e74557bd59b44891f1a32b63b86db660a0a6e88f.tar.gz |
Update to 0.14.19
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | factorio-headless.conf | 24 | ||||
-rw-r--r-- | factorio-headless.install | 13 | ||||
-rw-r--r-- | factorio-headless.service | 3 |
5 files changed, 50 insertions, 27 deletions
@@ -1,6 +1,8 @@ +# Generated by mksrcinfo v8 +# Thu Nov 10 01:08:04 UTC 2016 pkgbase = factorio-headless - pkgdesc = A 2D game about building and maintaining factories - Server version - pkgver = 0.13.20 + pkgdesc = A 2D game about building and maintaining factories - Server version (stable branch) + pkgver = 0.14.19 pkgrel = 1 url = http://www.factorio.com/ install = factorio-headless.install @@ -11,16 +13,17 @@ pkgbase = factorio-headless conflicts = factorio-experimental conflicts = factorio-headless-experimental backup = etc/conf.d/factorio + backup = etc/factorio/server-settings.json source = LICENSE source = factorio-headless.service source = factorio-headless.conf source = factorio-headless.sysusers - source = factorio_headless_x64_0.13.20.tar.gz::http://www.factorio.com/get-download/0.13.20/headless/linux64 + source = factorio_headless_x64_0.14.19.tar.gz::http://www.factorio.com/get-download/0.14.19/headless/linux64 sha256sums = 67ec2f88afff5d7e0ca5fd3301b5d98655269c161a394368fa0ec49fbc0c0e21 - sha256sums = b6b3d8421abf5ccd1e26618c354eaf1b56bbf39b19beef4358a02740d9871947 - sha256sums = 476423af51eda76154e6da5a0a73695744e1251730a89d3f657068e5175418fe + sha256sums = d06a47498ac5e540e8f4e653213b8bd5b21ae9424df718b9b065268f571900c6 + sha256sums = 5c7b9dcb07167d680de3dd6a0435b21ee4ee448fb7f6ce429f028ee5b543e9ab sha256sums = 87dae15d1bcfb4683faea9c66498bd916bd27f8aa0dc724c4e21076dcf17da64 - sha256sums = cbf5481e4b7e0efcc07c7b6a1fc3ff1404ad5597f3c9d37914a52ffb58d7c159 + sha256sums = 202517299eb2c1e098cc109832fa25d7d7f56fae163f1f94a05dc75551267c09 pkgname = factorio-headless @@ -1,26 +1,30 @@ -# Maintainer: Sebastien Duthil <duthils@free.fr> +# Maintainer: mickael9 <mickael9@gmail.com> +# Contributor: Sebastien Duthil <duthils@free.fr> # Inspiration for service and config files: https://github.com/Bisa/factorio-init pkgname=factorio-headless -pkgver=0.13.20 +pkgver=0.14.19 pkgrel=1 -pkgdesc="A 2D game about building and maintaining factories - Server version" +pkgdesc="A 2D game about building and maintaining factories - Server version (stable branch)" arch=('x86_64') url="http://www.factorio.com/" license=('custom: commercial') conflicts=('factorio' 'factorio-demo' 'factorio-experimental' 'factorio-headless-experimental') install=factorio-headless.install -backup=(etc/conf.d/factorio) +backup=(etc/conf.d/factorio + etc/factorio/server-settings.json +) + source=(LICENSE factorio-headless.service factorio-headless.conf factorio-headless.sysusers factorio_headless_x64_${pkgver}.tar.gz::http://www.factorio.com/get-download/${pkgver}/headless/linux64) sha256sums=('67ec2f88afff5d7e0ca5fd3301b5d98655269c161a394368fa0ec49fbc0c0e21' - 'b6b3d8421abf5ccd1e26618c354eaf1b56bbf39b19beef4358a02740d9871947' - '476423af51eda76154e6da5a0a73695744e1251730a89d3f657068e5175418fe' + 'd06a47498ac5e540e8f4e653213b8bd5b21ae9424df718b9b065268f571900c6' + '5c7b9dcb07167d680de3dd6a0435b21ee4ee448fb7f6ce429f028ee5b543e9ab' '87dae15d1bcfb4683faea9c66498bd916bd27f8aa0dc724c4e21076dcf17da64' - 'cbf5481e4b7e0efcc07c7b6a1fc3ff1404ad5597f3c9d37914a52ffb58d7c159') + '202517299eb2c1e098cc109832fa25d7d7f56fae163f1f94a05dc75551267c09') # no modifications needed, the executable looks for: @@ -36,4 +40,8 @@ package() { install -Dm644 "${srcdir}/factorio-headless.sysusers" "$pkgdir/usr/lib/sysusers.d/factorio.conf" install -Dm644 "${srcdir}/factorio-headless.conf" "${pkgdir}/etc/conf.d/factorio" install -Dm644 "${srcdir}/factorio-headless.service" "${pkgdir}/usr/lib/systemd/system/factorio.service" + install -Dm644 "${srcdir}/factorio/data/server-settings.example.json" "${pkgdir}/etc/factorio/server-settings.json" + + # public isn't really a good default especially with the default name/description + sed -i 's/^ "public": true/ "public": false/' "${pkgdir}/etc/factorio/server-settings.json" } diff --git a/factorio-headless.conf b/factorio-headless.conf index 1ece65794d1d..445cb0e0bf27 100644 --- a/factorio-headless.conf +++ b/factorio-headless.conf @@ -1,14 +1,14 @@ -# The latency expected between peers (milliseconds) -# Try to set this to the highest latency + 30 -# If peers A and B have a latency of 100 between each other, set this to 130 -LATENCY=250 - -# The number of minutes between each autosave -AUTOSAVE_INTERVAL=10 -# The number of autosaves to use for rotation -AUTOSAVE_SLOTS=3 - -# Additional factorio arguments -FACTORIO_EXTRA_ARGS="--allow-commands admins-only" +# AUTOSAVE_INTERVAL and AUTOSAVE_SLOTS must now be declared in /etc/factorio/server-settings.json +# LATENCY was removed from the game +# Path to the save file SAVE_FILE=/var/lib/factorio/.factorio/saves/factorio-service-save.zip + +# Additional factorio arguments, such as: +# -v [ --verbose ] enable verbose logging +# --mod-directory PATH Mod directory to use +# --port N network port to use +# --bind ADDRESS[:PORT] IP address (and optionally port) to bind to +# --rcon-port N Port to use for RCON +# --rcon-password PASSWORD Password for RCON +FACTORIO_EXTRA_ARGS="" diff --git a/factorio-headless.install b/factorio-headless.install index bd82f5012451..7cdadb871c17 100644 --- a/factorio-headless.install +++ b/factorio-headless.install @@ -2,11 +2,22 @@ post_install() { systemd-sysusers factorio.conf [[ -d /var/lib/factorio ]] || install -dm 770 -o factorio -g games /var/lib/factorio + source /etc/conf.d/factorio + # create empty game - [[ -f /var/lib/factorio/.factorio/saves/factorio-service-save.zip ]] || su - factorio -s /bin/sh -c 'factorio --create /var/lib/factorio/.factorio/saves/factorio-service-save.zip 2>&1 >/dev/null' + if [[ ! -f "$SAVE_FILE" ]]; then + echo "Generating initial save file: $SAVE_FILE" + su - factorio -s /bin/sh -c "factorio --create '$SAVE_FILE' 2>&1 >/dev/null" + fi } post_upgrade() { (( $(vercmp $2 '0.12.26-4') < 0 )) && chown -R root:root /usr/share/factorio || true (( $(vercmp $2 '0.12.26-4') < 0 )) && post_install "$1" || true + (( $(vercmp $2 '0.14.12-1') < 0 )) && { + echo "AUTOSAVE_INTERVAL and AUTOSAVE_SLOTS must now be declared in /etc/factorio/server-settings.json" + echo "Please update /etc/factorio/server-settings.json and /etc/conf.d/factorio now." + echo + echo "The systemd service file has been updated, don't forget to run 'systemctl daemon-reload' before restarting factorio." + } || true } diff --git a/factorio-headless.service b/factorio-headless.service index 4bf4d05ef65c..e81dc79c6869 100644 --- a/factorio-headless.service +++ b/factorio-headless.service @@ -6,8 +6,9 @@ After=network.target [Service] User=factorio EnvironmentFile=/etc/conf.d/factorio +WorkingDirectory=/var/lib/factorio TimeoutStartSec=5 -ExecStart=/usr/bin/factorio --start-server $SAVE_FILE --autosave-interval $AUTOSAVE_INTERVAL --autosave-slots $AUTOSAVE_SLOTS --latency-ms $LATENCY $FACTORIO_EXTRA_ARGS +ExecStart=/usr/bin/factorio --server-settings /etc/factorio/server-settings.json --start-server ${SAVE_FILE} $FACTORIO_EXTRA_ARGS TimeoutStopSec=10 KillSignal=SIGINT RestartSec=10 |