diff options
author | metamuffin <metamuffin@disroot.org> | 2024-10-12 16:39:21 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-10-12 16:39:21 +0200 |
commit | a9fd82ae18eb67f6288d46d40bc893598922d181 (patch) | |
tree | 0f8f2d2cef42fcac145d5beb097e76197bc6f232 /gpn-tron-git | |
download | pkgbuilds-a9fd82ae18eb67f6288d46d40bc893598922d181.tar pkgbuilds-a9fd82ae18eb67f6288d46d40bc893598922d181.tar.bz2 pkgbuilds-a9fd82ae18eb67f6288d46d40bc893598922d181.tar.zst |
add existing pkgbuilds
Diffstat (limited to 'gpn-tron-git')
-rw-r--r-- | gpn-tron-git/PKGBUILD | 39 | ||||
-rw-r--r-- | gpn-tron-git/gpn-tron.service | 32 | ||||
-rw-r--r-- | gpn-tron-git/gpn-tron.toml | 14 | ||||
-rw-r--r-- | gpn-tron-git/sysusers.conf | 1 |
4 files changed, 86 insertions, 0 deletions
diff --git a/gpn-tron-git/PKGBUILD b/gpn-tron-git/PKGBUILD new file mode 100644 index 0000000..b0def43 --- /dev/null +++ b/gpn-tron-git/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: metamuffin <metamuffin@disroot.org> + +pkgname=gpn-tron-git +pkgver=r21.12f974f +pkgrel=1 +pkgdesc="GPN-Tron Rust rewrite" +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +url="https://codeberg.org/metamuffin/gpn-tron-rust" +license=('AGPL-3.0-only') +makedepends=('rustup' 'esbuild') +backup=('etc/gpn-tron.toml') +source=("gpn-tron::git+https://codeberg.org/metamuffin/gpn-tron-rust" + "gpn-tron.service" + "gpn-tron.toml" + "sysusers.conf") +sha256sums=("SKIP" + "SKIP" + "SKIP" + "SKIP") + +pkgver() { + cd "gpn-tron" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} +prepare() { + cd "gpn-tron" + cargo +nightly fetch --locked --target "$CHOST" +} +build() { + cd "gpn-tron" + cargo +nightly build --frozen --release --target "$CHOST" +} +package() { + install -Dm755 gpn-tron/target/$CHOST/release/gpn-tron "$pkgdir/usr/bin/gpn-tron" + install -Dm644 gpn-tron/COPYING "$pkgdir/usr/share/licenses/gpn-tron/COPYING" + install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/gpn-tron.conf" + install -Dm644 gpn-tron.service "$pkgdir/usr/lib/systemd/system/gpn-tron.service" + install -Dm644 gpn-tron.toml "$pkgdir/etc/gpn-tron.toml" +} diff --git a/gpn-tron-git/gpn-tron.service b/gpn-tron-git/gpn-tron.service new file mode 100644 index 0000000..93e353d --- /dev/null +++ b/gpn-tron-git/gpn-tron.service @@ -0,0 +1,32 @@ +[Unit] +Description=GPN-Tron Rust rewrite +After=network.target +Wants=network-online.target + +[Service] +ExecStart=/usr/bin/gpn-tron /etc/gpn-tron.toml +User=gpn-tron +LockPersonality=yes +MemoryDenyWriteExecute=yes +NoNewPrivileges=yes +PrivateDevices=true +PrivateTmp=true +ProtectClock=yes +ProtectControlGroups=yes +ProtectHome=true +ProtectHostname=yes +ProtectKernelLogs=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +ProtectSystem=full +RestrictAddressFamilies=~AF_PACKET AF_NETLINK +RestrictNamespaces=yes +RestrictSUIDSGID=yes +RestrictRealtime=yes +Restart=always +SystemCallArchitectures=native +SystemCallFilter=@system-service +Type=simple + +[Install] +WantedBy=multi-user.target diff --git a/gpn-tron-git/gpn-tron.toml b/gpn-tron-git/gpn-tron.toml new file mode 100644 index 0000000..6f00cbe --- /dev/null +++ b/gpn-tron-git/gpn-tron.toml @@ -0,0 +1,14 @@ +[spectate] +bind = "0.0.0.0:3000" + +[game] +bind = "0.0.0.0:4000" +tickrate = 1 +tickrate_speedup = 0.1 +tickrate_max = 3 + +[bot] +amount = 2 + +[database] +path = "/tmp/trondb" diff --git a/gpn-tron-git/sysusers.conf b/gpn-tron-git/sysusers.conf new file mode 100644 index 0000000..927518f --- /dev/null +++ b/gpn-tron-git/sysusers.conf @@ -0,0 +1 @@ +u gpn-tron - "gpn-tron game server daemon" - - |