[PATCH sr.ht-pkgbuilds] paste.sr.ht: Add GraphQL API
Export this patch
---
paste.sr.ht/PKGBUILD | 14 ++++++++++----
paste.sr.ht/paste.sr.ht-api.service | 13 +++++++++++++
2 files changed, 23 insertions(+), 4 deletions(-)
create mode 100644 paste.sr.ht/paste.sr.ht-api.service
Thanks!
To git.sr.ht:~sircmpwn/sr.ht-pkgbuilds
e01fbda..d25c182 master -> master
diff --git a/paste.sr.ht/PKGBUILD b/paste.sr.ht/PKGBUILD
index f73e430..cbb3a06 100644
--- a/paste.sr.ht/PKGBUILD
+++ b/paste.sr.ht/PKGBUILD
@@ -1,8 +1,8 @@
pkgname=paste.sr.ht
-pkgver=0.11.3
+pkgver=0.13.6
pkgrel=2
pkgdesc="sr.ht pastebin services"
-arch=("any")
+arch=("x86_64")
license=("AGPL3")
url="https://git.sr.ht/~sircmpwn/paste.sr.ht"
install=paste.sr.ht.install
@@ -11,22 +11,26 @@ depends=(
"python-yaml"
"gunicorn"
)
-makedepends=("python-setuptools" "nodejs" "sassc")
+makedepends=("python-setuptools" "nodejs" "sassc" "go")
source=(
"$pkgname-$pkgver.tar.gz::http://git.sr.ht/~sircmpwn/$pkgname/archive/$pkgver.tar.gz"
"paste.sr.ht.service"
"paste.sr.ht-webhooks.service"
+ "paste.sr.ht-api.service"
"sysusers.conf"
)
-sha256sums=('2e82893792807996457d14462b3c47de49c2dc8f9f811fd0bd3e2e3cd8b9e457'
+sha256sums=('a01f4abebbcb45b334add6e9e190c06881aabd9d3751238bb2a60195025bddbd'
'6f99b3bedea1cad4f28658950ecf802c05e38433432f2d1e73ee88864a36d8ec'
'a4638073cc6486f4a693aa7cb18c21fa66e70ad0387eb423166d644cdfb32d26'
+ '5901e68427fc15a94122dad22f2db363ea571562d757ce48e901458fe6d2a505'
'a08895ba853dbca7fc5af3da2f6bfd4284c15f787a5968793a4a53f31f9de817')
export PKGVER=$pkgver
build() {
cd $pkgbase-$pkgver
python3 setup.py build
+ cd api
+ go build -o pastesrht-api
}
package() {
@@ -34,6 +38,8 @@ package() {
install -Dm0644 ../paste.sr.ht.service -t "$pkgdir"/usr/lib/systemd/system/
install -Dm0644 ../paste.sr.ht-webhooks.service \
-t "$pkgdir"/usr/lib/systemd/system/
+ install -Dm644 ../paste.sr.ht-api.service -t "$pkgdir"/usr/lib/systemd/system/
install -Dm0644 ../sysusers.conf "$pkgdir/usr/lib/sysusers.d/paste.sr.ht.conf"
+ install -Dm755 api/pastesrht-api "$pkgdir"/usr/bin/pastesrht-api
python3 setup.py install --root="${pkgdir}" --optimize=1
}
diff --git a/paste.sr.ht/paste.sr.ht-api.service b/paste.sr.ht/paste.sr.ht-api.service
new file mode 100644
index 0000000..67fa382
--- /dev/null
+++ b/paste.sr.ht/paste.sr.ht-api.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=paste.sr.ht API service
+Requires=redis.service postgresql.service
+After=redis.service postgresql.service network.target
+
+[Service]
+Type=simple
+User=pastesrht
+Restart=always
+ExecStart=/usr/bin/pastesrht-api -b :5111
+
+[Install]
+WantedBy=multi-user.target
--
Eli Schwartz
Bug Wrangler and Trusted User
--
2.33.0