~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH sr.ht-pkgbuilds] meta: add new graphql API service

Details
Message ID
<20200612104555.136959-1-admin@xenrox.net>
DKIM signature
pass
Download raw message
Patch: +20 -0
---
 meta.sr.ht/PKGBUILD               |  7 +++++++
 meta.sr.ht/meta.sr.ht-api.service | 13 +++++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 meta.sr.ht/meta.sr.ht-api.service

diff --git a/meta.sr.ht/PKGBUILD b/meta.sr.ht/PKGBUILD
index a022065..2d557b8 100644
--- a/meta.sr.ht/PKGBUILD
+++ b/meta.sr.ht/PKGBUILD
@@ -28,11 +28,13 @@ makedepends=("python-setuptools" "nodejs" "sassc")
source=(
	"$pkgname-$pkgver.tar.gz::http://git.sr.ht/~sircmpwn/$pkgname/archive/$pkgver.tar.gz"
	"meta.sr.ht.service"
	"meta.sr.ht-api.service"
	"meta.sr.ht-webhooks.service"
	"sysusers.conf"
)
sha256sums=('a2ae57474400f4c86f72a8b646fb8c7dfef9252e2db61c8177d28366df3342e1'
            '79b30d4b2275005a78cf29a185fab07301455557d631d6263ee28a2592a75067'
            'ac04fff6a22f1b194cf84f3a296cf2225f38c393e437f24bc3af3e3b677017a1'
            '1a6c61365d16c37cd4f38a59aa80f9f91d3f713d0d99dbd93e1c7dcd0b29f91d'
            'b98af4986b4a470cf80d8651563946706717fb556cf31433581f22173ada93db')
export PKGVER=$pkgver
@@ -40,13 +42,18 @@ export PKGVER=$pkgver
build() {
	cd $pkgbase-$pkgver
	python3 setup.py build
	cd api
	go build -o metasrht-api
}

package() {
	cd $pkgbase-$pkgver
	install -Dm0644 ../meta.sr.ht.service -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../meta.sr.ht-api.service -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../meta.sr.ht-webhooks.service \
		-t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../sysusers.conf "$pkgdir/usr/lib/sysusers.d/meta.sr.ht.conf"
	python3 setup.py install --root="${pkgdir}" --optimize=1
	cd api
	install -Dm755 metasrht-api "$pkgdir"/usr/bin/metasrht-api
}
diff --git a/meta.sr.ht/meta.sr.ht-api.service b/meta.sr.ht/meta.sr.ht-api.service
new file mode 100644
index 0000000..0fcfb52
--- /dev/null
+++ b/meta.sr.ht/meta.sr.ht-api.service
@@ -0,0 +1,13 @@
[Unit]
Description=meta.sr.ht API service
Requires=redis.service postgresql.service
After=redis.service postgresql.service network.target

[Service]
Type=simple
User=metasrht
Restart=always
ExecStart=/usr/bin/metasrht-api -b :5100

[Install]
WantedBy=multi-user.target
--
2.27.0
Review patch Export thread (mbox)