~sircmpwn/sr.ht-packages

sr.ht-pkgbuilds: pages.sr.ht: New package v1 PROPOSED

Thorben Günther: 1
 pages.sr.ht: New package

 3 files changed, 43 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/sr.ht-packages/patches/20347/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH sr.ht-pkgbuilds] pages.sr.ht: New package Export this patch

---
 pages.sr.ht/PKGBUILD            | 29 +++++++++++++++++++++++++++++
 pages.sr.ht/pages.sr.ht.service | 13 +++++++++++++
 pages.sr.ht/sysusers.conf       |  1 +
 3 files changed, 43 insertions(+)
 create mode 100644 pages.sr.ht/PKGBUILD
 create mode 100644 pages.sr.ht/pages.sr.ht.service
 create mode 100644 pages.sr.ht/sysusers.conf
diff --git a/pages.sr.ht/PKGBUILD b/pages.sr.ht/PKGBUILD
new file mode 100644
index 0000000..06d55c6
--- /dev/null
+++ b/pages.sr.ht/PKGBUILD
@@ -0,0 +1,29 @@
pkgname=pages.sr.ht
pkgver=0.2.0
pkgrel=1
pkgdesc="sr.ht web hosting service"
arch=("x86_64")
license=("AGPL3")
url="https://git.sr.ht/~sircmpwn/pages.sr.ht"
makedepends=("go")
source=(
	"$pkgname-$pkgver.tar.gz::http://git.sr.ht/~sircmpwn/$pkgname/archive/$pkgver.tar.gz"
	"pages.sr.ht.service"
	"sysusers.conf"
)
sha256sums=('b69e2c42fc24fc2442b9f1875ab790ea05b26b42a449267ece12ec097228b12a'
            '848c02f79987e87ba3a1ebfbee8432d281c490f34bbac596894e5d88171dbb59'
            '026c309bd0ae2c21978405bdcf4b86a88776ceac83a18d329f441ab4c0102c15')
export PKGVER=$pkgver

build() {
	cd $pkgbase-$pkgver
	go build -o pages.sr.ht
}

package() {
	cd $pkgbase-$pkgver
	install -Dm0755 pages.sr.ht "$pkgdir"/usr/bin/pages.sr.ht
	install -Dm0644 ../pages.sr.ht.service -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../sysusers.conf "$pkgdir/usr/lib/sysusers.d/pages.sr.ht.conf"
}
diff --git a/pages.sr.ht/pages.sr.ht.service b/pages.sr.ht/pages.sr.ht.service
new file mode 100644
index 0000000..2fbdcb1
--- /dev/null
+++ b/pages.sr.ht/pages.sr.ht.service
@@ -0,0 +1,13 @@
[Unit]
Description=pages.sr.ht API service
Requires=redis.service postgresql.service
After=redis.service postgresql.service network.target

[Service]
Type=simple
User=pagessrht
Restart=always
ExecStart=/usr/bin/pages.sr.ht -b :5112

[Install]
WantedBy=multi-user.target
diff --git a/pages.sr.ht/sysusers.conf b/pages.sr.ht/sysusers.conf
new file mode 100644
index 0000000..2eef582
--- /dev/null
+++ b/pages.sr.ht/sysusers.conf
@@ -0,0 +1 @@
u   pagessrht -   "pages.sr.ht user"
-- 
2.30.1