summaryrefslogtreecommitdiff
path: root/metamuffin-website-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 /metamuffin-website-git
downloadpkgbuilds-a9fd82ae18eb67f6288d46d40bc893598922d181.tar
pkgbuilds-a9fd82ae18eb67f6288d46d40bc893598922d181.tar.bz2
pkgbuilds-a9fd82ae18eb67f6288d46d40bc893598922d181.tar.zst
add existing pkgbuilds
Diffstat (limited to 'metamuffin-website-git')
-rw-r--r--metamuffin-website-git/PKGBUILD37
-rw-r--r--metamuffin-website-git/metamuffin-website.service33
-rw-r--r--metamuffin-website-git/sysusers.conf1
3 files changed, 71 insertions, 0 deletions
diff --git a/metamuffin-website-git/PKGBUILD b/metamuffin-website-git/PKGBUILD
new file mode 100644
index 0000000..3a0eb5f
--- /dev/null
+++ b/metamuffin-website-git/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: metamuffin <metamuffin@disroot.org>
+
+pkgname=metamuffin-website-git
+pkgver=r73.8c4a1a0
+pkgrel=1
+pkgdesc="metamuffins personal webpage"
+arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
+url="https://codeberg.org/metamuffin/metamuffin-website"
+license=('AGPL3')
+makedepends=('rustup')
+source=("git+https://codeberg.org/metamuffin/metamuffin-website.git"
+ "metamuffin-website.service"
+ "sysusers.conf")
+sha256sums=("SKIP"
+ "SKIP"
+ "SKIP")
+
+pkgver() {
+ cd "metamuffin-website"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+prepare() {
+ cd "metamuffin-website"
+ rustup default nightly
+ cargo +nightly fetch --locked --target "$CHOST"
+}
+build() {
+ cd "metamuffin-website"
+ cargo +nightly build --frozen --release --target "$CHOST"
+}
+package() {
+ mkdir -p "$pkgdir/usr/share/metamuffin-website"
+ install -Dm755 metamuffin-website/target/$CHOST/release/metamuffin-website "$pkgdir/usr/bin/metamuffin-website"
+ install -Dm644 metamuffin-website.service "$pkgdir/usr/lib/systemd/system/metamuffin-website.service"
+ install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/metamuffin-website.conf"
+ install -Dm644 metamuffin-website/COPYING "$pkgdir/usr/share/licenses/metamuffin-website/COPYING"
+}
diff --git a/metamuffin-website-git/metamuffin-website.service b/metamuffin-website-git/metamuffin-website.service
new file mode 100644
index 0000000..4195d98
--- /dev/null
+++ b/metamuffin-website-git/metamuffin-website.service
@@ -0,0 +1,33 @@
+[Unit]
+Description=metamuffin personal website
+After=network.target
+Wants=network-online.target
+
+[Service]
+WorkingDirectory=/usr/share/metamuffin-website
+ExecStart=/usr/bin/metamuffin-website
+User=metamuffin_website
+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/metamuffin-website-git/sysusers.conf b/metamuffin-website-git/sysusers.conf
new file mode 100644
index 0000000..8c70085
--- /dev/null
+++ b/metamuffin-website-git/sysusers.conf
@@ -0,0 +1 @@
+u metamuffin_website - "metamuffins personal website" - -