summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormetamuffin2024-07-28 15:55:36 +0200
committermetamuffin2024-07-28 15:55:36 +0200
commitab72316af14d7f9771509291a61cd50175bc8ead (patch)
tree797d70685a4c049e0e299dbeea17955a7ce0a4fd
downloadaur-ab72316af14d7f9771509291a61cd50175bc8ead.tar.gz
v1.3.0
Signed-off-by: metamuffin <metamuffin@disroot.org>
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD45
-rw-r--r--hurrycurry.service33
-rw-r--r--hurrycurry.yaml0
-rw-r--r--sysusers.conf1
5 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fc9bc22cb0fb
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = hurrycurry-server
+ pkgdesc = A game about cooking (server)
+ pkgver = 1.3.0
+ pkgrel = 1
+ url = https://codeberg.org/hurrycurry/hurrycurry
+ arch = i686
+ arch = x86_64
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
+ license = AGPL3
+ makedepends = rustup
+ makedepends = deno
+ makedepends = graphviz
+ makedepends = godot
+ source = hurrcurry-1.3.0.tar.gz::https://codeberg.org/hurrycurry/hurrycurry/archive/v1.3.0.tar.gz
+ source = hurrycurry.service
+ source = hurrycurry.yaml
+ source = sysusers.conf
+ sha256sums = 4852c4e313fa921cc8216219956c877f1d1983e9b3a10f72608d2c45ab46743e
+ sha256sums = d520ab278a04fd434429833e806b67f876529fcbbf7e8f5aa80c3e102b621750
+ sha256sums = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
+ sha256sums = bbb29eff6b62d4530b04c0a964a88229212fea165f97a1c4674c53fae9fb4fe4
+
+pkgname = hurrycurry-server
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3ffdb62c67ca
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: metamuffin <metamuffin@disroot.org>
+
+pkgname=hurrycurry-server
+pkgver=1.3.0
+pkgrel=1
+pkgdesc="A game about cooking (server)"
+arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
+url="https://codeberg.org/hurrycurry/hurrycurry"
+license=('AGPL3')
+makedepends=('rustup' 'deno' 'graphviz' 'godot')
+source=("hurrcurry-$pkgver.tar.gz::https://codeberg.org/hurrycurry/hurrycurry/archive/v$pkgver.tar.gz"
+ "hurrycurry.service"
+ "hurrycurry.yaml"
+ "sysusers.conf")
+sha256sums=('4852c4e313fa921cc8216219956c877f1d1983e9b3a10f72608d2c45ab46743e'
+ 'd520ab278a04fd434429833e806b67f876529fcbbf7e8f5aa80c3e102b621750'
+ 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
+ 'bbb29eff6b62d4530b04c0a964a88229212fea165f97a1c4674c53fae9fb4fe4')
+
+prepare() {
+ curl 'https://s.metamuffin.org/static/hurrycurry/book.pdf' -o book.pdf
+ cd "hurrycurry"
+ rustup default nightly
+ cargo +nightly fetch --locked --target "$CHOST"
+}
+build() {
+ cd "hurrycurry"
+ cargo +nightly build --frozen --release --target "$CHOST" --bin hurrycurry-server
+ cargo +nightly build --frozen --release --target "$CHOST" --bin hurrycurry-replaytool
+ make -C data all graphs
+ esbuild test-client/main.ts --bundle --outdir=test-client
+}
+package() {
+ install -Dm755 hurrycurry/target/$CHOST/release/hurrycurry-server "$pkgdir/usr/bin/hurrycurry-server"
+ install -Dm755 hurrycurry/target/$CHOST/release/hurrycurry-replaytool "$pkgdir/usr/bin/hurrycurry-replaytool"
+ install -Dm644 hurrycurry.service "$pkgdir/usr/lib/systemd/system/hurrycurry.service"
+ install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/hurrycurry.conf"
+ install -Dm644 hurrycurry/COPYING "$pkgdir/usr/share/licenses/hurrycurry-server/COPYING"
+ install -Dm664 -t "$pkgdir/usr/share/hurrycurry/test-client" hurrycurry/test-client/*
+ install -Dm644 hurrycurry/data/index.yaml "$pkgdir/usr/share/hurrycurry/data/index.yaml"
+ install -Dm664 -t "$pkgdir/usr/share/hurrycurry/data/recipes" hurrycurry/data/recipes/*.yaml
+ install -Dm664 -t "$pkgdir/usr/share/hurrycurry/data/maps" hurrycurry/data/maps/*.yaml
+ install -Dm664 -t "$pkgdir/usr/share/doc/hurrycurry/recipes" hurrycurry/data/recipes/*.svg
+ install -Dm664 book.pdf "$pkgdir/usr/share/doc/hurrycurry/book.pdf"
+}
diff --git a/hurrycurry.service b/hurrycurry.service
new file mode 100644
index 000000000000..4dbca7b49ca6
--- /dev/null
+++ b/hurrycurry.service
@@ -0,0 +1,33 @@
+[Unit]
+Description=hurrycurry game server
+After=network.target
+Wants=network-online.target
+
+[Service]
+WorkingDirectory=/usr/share/hurrycurry
+ExecStart=/usr/bin/hurrycurry-server
+User=hurrycurry
+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/hurrycurry.yaml b/hurrycurry.yaml
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/hurrycurry.yaml
diff --git a/sysusers.conf b/sysusers.conf
new file mode 100644
index 000000000000..026ba33e144f
--- /dev/null
+++ b/sysusers.conf
@@ -0,0 +1 @@
+u hurrycurry - "hurrycurry game server" - -