summaryrefslogtreecommitdiff
path: root/fastbangs-git
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-10-12 16:39:21 +0200
committermetamuffin <metamuffin@disroot.org>2024-10-12 16:39:21 +0200
commita9fd82ae18eb67f6288d46d40bc893598922d181 (patch)
tree0f8f2d2cef42fcac145d5beb097e76197bc6f232 /fastbangs-git
downloadpkgbuilds-a9fd82ae18eb67f6288d46d40bc893598922d181.tar
pkgbuilds-a9fd82ae18eb67f6288d46d40bc893598922d181.tar.bz2
pkgbuilds-a9fd82ae18eb67f6288d46d40bc893598922d181.tar.zst
add existing pkgbuilds
Diffstat (limited to 'fastbangs-git')
-rw-r--r--fastbangs-git/.gitignore5
-rw-r--r--fastbangs-git/PKGBUILD39
-rw-r--r--fastbangs-git/fastbangs.install5
-rw-r--r--fastbangs-git/fastbangs.service33
-rw-r--r--fastbangs-git/sysusers.conf1
5 files changed, 83 insertions, 0 deletions
diff --git a/fastbangs-git/.gitignore b/fastbangs-git/.gitignore
new file mode 100644
index 0000000..fe201fa
--- /dev/null
+++ b/fastbangs-git/.gitignore
@@ -0,0 +1,5 @@
+*.tar.zst
+*.tar
+/pkg
+/src
+/fastbangs
diff --git a/fastbangs-git/PKGBUILD b/fastbangs-git/PKGBUILD
new file mode 100644
index 0000000..a4387f5
--- /dev/null
+++ b/fastbangs-git/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: metamuffin <metamuffin@disroot.org>
+
+pkgname=fastbangs-git
+pkgver=r91.0ece6f0
+pkgrel=4
+pkgdesc="A search engine redirect service"
+arch=('x86_64')
+url="https://codeberg.org/lialenck/fastbangs"
+license=('AGPL-3.0-only')
+makedepends=('esbuild' 'sassc' 'stack-static' 'make')
+backup=('etc/fastbangs.yaml')
+install='fastbangs.install'
+source=("git+https://codeberg.org/lialenck/fastbangs"
+ "fastbangs.service"
+ "sysusers.conf")
+sha256sums=("SKIP"
+ "SKIP"
+ "SKIP")
+
+pkgver() {
+ cd "fastbangs"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+prepare() {
+ cd "fastbangs"
+ make frontend/fuzzysort.js
+ stack setup
+}
+build() {
+ cd "fastbangs"
+ make
+}
+package() {
+ install -Dm755 fastbangs/deploy/fastbangs "$pkgdir/usr/bin/fastbangs"
+ install -Dm644 fastbangs/LICENSE.agpl "$pkgdir/usr/share/licenses/fastbangs/COPYING"
+ install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/fastbangs.conf"
+ install -Dm644 fastbangs.service "$pkgdir/usr/lib/systemd/system/fastbangs.service"
+ install -Dm644 fastbangs/fastbangs.yaml "$pkgdir/etc/fastbangs.yaml"
+}
diff --git a/fastbangs-git/fastbangs.install b/fastbangs-git/fastbangs.install
new file mode 100644
index 0000000..a60b4dc
--- /dev/null
+++ b/fastbangs-git/fastbangs.install
@@ -0,0 +1,5 @@
+post_install() {
+ mkdir -p /var/lib/fastbangs
+ chown -v fastbangs:fastbangs /var/lib/fastbangs
+ ln -svf "/etc/fastbangs.yaml" "/var/lib/fastbangs/fastbangs.yaml"
+}
diff --git a/fastbangs-git/fastbangs.service b/fastbangs-git/fastbangs.service
new file mode 100644
index 0000000..7ba3bb2
--- /dev/null
+++ b/fastbangs-git/fastbangs.service
@@ -0,0 +1,33 @@
+[Unit]
+Description=fastbangs search engine redirect service
+After=network.target
+Wants=network-online.target
+
+[Service]
+WorkingDirectory=/var/lib/fastbangs
+ExecStart=/usr/bin/fastbangs
+User=fastbangs
+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/fastbangs-git/sysusers.conf b/fastbangs-git/sysusers.conf
new file mode 100644
index 0000000..a66b26f
--- /dev/null
+++ b/fastbangs-git/sysusers.conf
@@ -0,0 +1 @@
+u fastbangs - "fastbangs search engine redirect service" - -