M hub.sr.ht/PKGBUILD => hub.sr.ht/PKGBUILD +9 -3
@@ 1,8 1,8 @@
pkgname=hub.sr.ht
-pkgver=0.15.2
+pkgver=0.16.0
pkgrel=1
pkgdesc="SourceHut project hub"
-arch=('any')
+arch=('x86_64')
url="https://git.sr.ht/~sircmpwn/$pkgname"
license=('AGPL3')
depends=('python-srht')
@@ 10,20 10,26 @@ makedepends=('nodejs' 'sassc' 'go')
install=hub.sr.ht.install
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz"
"$pkgname.service"
+ "$pkgname-api.service"
"sysusers.conf")
-sha256sums=('3838423ee9f61587250d05d4559f79de0d6c41b0af917f29e90402e86b1e3a29'
+sha256sums=('796bd975fe1ec063f18ffe2fd79b1e96869e3f81f6d337035f7b3c06d4541928'
'3de78b1220fcfd6bd293f8caa6c8f6e9e4a9b0757b6cd614b5c4869613ec0959'
+ '6fd5e043fcbb1fe1f48f35e79d595560c4171f9c7daca3924ef926319977e6e7'
'2ef86c4fddee7cb98af57ef725d393edbda2c2f2cb34c70000a59938510a54ee')
export PKGVER=$pkgver
build() {
cd $pkgname-$pkgver
python3 setup.py build
+ cd api
+ go build -o hubsrht-api
}
package() {
cd $pkgname-$pkgver
install -Dm0644 ../$pkgname.service -t "$pkgdir"/usr/lib/systemd/system/
+ install -Dm644 ../$pkgname-api.service -t "$pkgdir"/usr/lib/systemd/system/
install -Dm0644 ../sysusers.conf "$pkgdir"/usr/lib/sysusers.d/$pkgname.conf
+ install -Dm755 api/hubsrht-api "$pkgdir"/usr/bin/hubsrht-api
python3 setup.py install --root="$pkgdir" --optimize=1
}
A hub.sr.ht/hub.sr.ht-api.service => hub.sr.ht/hub.sr.ht-api.service +13 -0
@@ 0,0 1,13 @@
+[Unit]
+Description=hub.sr.ht API service
+Requires=redis.service postgresql.service
+After=redis.service postgresql.service network.target
+
+[Service]
+Type=simple
+User=hubsrht
+Restart=always
+ExecStart=/usr/bin/hubsrht-api -b :5114
+
+[Install]
+WantedBy=multi-user.target