summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErmine <mustela@erminea.space>2024-12-27 20:08:58 +0000
committerZach van Rijn <me@zv.io>2024-12-27 20:08:58 +0000
commitc272af79dc14f9361610a5b10ef03e57431c33d3 (patch)
tree835949854e83df929c71a8f54a01dfd5c89898a8
parent15639daf981e21992c232203168037f017361fcc (diff)
downloadpackages-c272af79dc14f9361610a5b10ef03e57431c33d3.tar.gz
packages-c272af79dc14f9361610a5b10ef03e57431c33d3.tar.bz2
packages-c272af79dc14f9361610a5b10ef03e57431c33d3.tar.xz
packages-c272af79dc14f9361610a5b10ef03e57431c33d3.zip
user/tyrquake: new package
-rw-r--r--user/tyrquake/APKBUILD46
-rw-r--r--user/tyrquake/tyrquake.initd14
-rw-r--r--user/tyrquake/tyrquake.pre-install6
3 files changed, 66 insertions, 0 deletions
diff --git a/user/tyrquake/APKBUILD b/user/tyrquake/APKBUILD
new file mode 100644
index 000000000..84a5087f8
--- /dev/null
+++ b/user/tyrquake/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Ermine <mustela@erminea.space>
+# Maintainer: Ermine <mustela@erminea.space>
+pkgname=tyrquake
+pkgver=0.71
+pkgrel=0
+pkgdesc="SDL port of Quake"
+url="https://disenchant.net/tyrquake"
+arch="all"
+options="!check" # No test suite.
+license="GPL-2.0-only"
+makedepends="sdl2-dev imagemagick libglvnd-dev"
+install="$pkgname.pre-install"
+subpackages="$pkgname-openrc $pkgname-server"
+source="https://disenchant.net/files/engine/tyrquake-$pkgver.tar.gz
+ tyrquake.initd
+ "
+
+build() {
+ make USE_SDL=Y USE_X86_ASM=N
+}
+
+package() {
+ # no install target
+ install -m755 -D "$builddir"/bin/tyr-quake "$pkgdir"/usr/bin/tyr-quake
+ install -m755 -D "$builddir"/bin/tyr-glquake "$pkgdir"/usr/bin/tyr-glquake
+ install -m755 -D "$builddir"/bin/tyr-qwcl "$pkgdir"/usr/bin/tyr-qwcl
+ install -m755 -D "$builddir"/bin/tyr-glqwcl "$pkgdir"/usr/bin/tyr-glqwcl
+ install -m755 -D "$builddir"/bin/tyr-qwsv "$pkgdir"/usr/bin/tyr-qwsv
+
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
+}
+
+server() {
+ pkgdesc="$pkgdesc (QuakeWorld server)"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/tyr-qwsv "$subpkgdir"/usr/bin/
+}
+
+openrc() {
+ default_openrc
+ install_if="openrc $pkgname-server=$pkgver-r$pkgrel"
+}
+
+sha512sums="ecceeecb43866c10c0669b4362ce2eda7a790c502764b3d644566e7637ffbde0548676c9dcea07963db0d91d83c248e3497603c0a3a2e1a12a1418a82c07179a tyrquake-0.71.tar.gz
+eff93a1df0f6492c4063332c73382f8893c8a94f26e387ecd102e32a3f6a2f154a1abedecb26ccae7c25c1356ef77cc129508e1215b8320a94c4a55cea1d4aff tyrquake.initd"
diff --git a/user/tyrquake/tyrquake.initd b/user/tyrquake/tyrquake.initd
new file mode 100644
index 000000000..25231e8d2
--- /dev/null
+++ b/user/tyrquake/tyrquake.initd
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+
+name="tyrquake"
+description="TyrQuake QuakeWorld server"
+
+supervisor=supervise-daemon
+
+command="/usr/bin/tyr-qwsv"
+command_user="tyrquake:tyrquake"
+
+depend() {
+ need net
+ after firewall
+}
diff --git a/user/tyrquake/tyrquake.pre-install b/user/tyrquake/tyrquake.pre-install
new file mode 100644
index 000000000..73f8ebcd3
--- /dev/null
+++ b/user/tyrquake/tyrquake.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+groupadd -r -- tyrquake 2>/dev/null
+useradd -r -M -N -s /sbin/nologin -g tyrquake -c tyrquake -- tyrquake 2>/dev/null
+
+exit 0