From a9fd82ae18eb67f6288d46d40bc893598922d181 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 12 Oct 2024 16:39:21 +0200 Subject: add existing pkgbuilds --- metamuffin-website-git/PKGBUILD | 37 +++++++++++++++++++++++ metamuffin-website-git/metamuffin-website.service | 33 ++++++++++++++++++++ metamuffin-website-git/sysusers.conf | 1 + 3 files changed, 71 insertions(+) create mode 100644 metamuffin-website-git/PKGBUILD create mode 100644 metamuffin-website-git/metamuffin-website.service create mode 100644 metamuffin-website-git/sysusers.conf (limited to 'metamuffin-website-git') 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 + +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" - - -- cgit v1.2.3-70-g09d2