M sr.ht/meta.sr.ht/APKBUILD => sr.ht/meta.sr.ht/APKBUILD +19 -6
@@ 1,10 1,10 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=meta.sr.ht
-pkgver=0.41.10
-pkgrel=1
+pkgver=0.43.0
+pkgrel=0
pkgdesc="sr.ht account service"
url="https://git.sr.ht/~sircmpwn/meta.sr.ht"
-arch="noarch"
+arch="all"
license="AGPLv3"
depends="
py3-bcrypt
@@ 18,12 18,14 @@ depends="
py3-zxcvbn
redis
"
-makedepends="py-setuptools nodejs sassc"
+makedepends="py-setuptools nodejs sassc go"
subpackages="$pkgname-openrc $pkgname-billing:_billing"
source="
$pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/$pkgname/archive/$pkgver.tar.gz
meta.sr.ht.initd
meta.sr.ht.confd
+ meta.sr.ht-api.initd
+ meta.sr.ht-api.confd
meta.sr.ht-webhooks.initd
meta.sr.ht-webhooks.confd
"
@@ 35,6 37,8 @@ install="$pkgname.post-install $pkgname.post-upgrade"
build() {
cd "$builddir"
python3 setup.py build
+ cd api
+ go build -o metasrht-api
}
package() {
@@ 44,10 48,17 @@ package() {
"$pkgdir"/etc/init.d/meta.sr.ht
install -Dm644 "$srcdir"/meta.sr.ht.confd \
"$pkgdir"/etc/conf.d/meta.sr.ht
+ install -Dm755 "$srcdir"/meta.sr.ht-api.initd \
+ "$pkgdir"/etc/init.d/meta.sr.ht-api
+ install -Dm644 "$srcdir"/meta.sr.ht-api.confd \
+ "$pkgdir"/etc/conf.d/meta.sr.ht-api
install -Dm755 "$srcdir"/meta.sr.ht-webhooks.initd \
"$pkgdir"/etc/init.d/meta.sr.ht-webhooks
install -Dm644 "$srcdir"/meta.sr.ht-webhooks.confd \
"$pkgdir"/etc/conf.d/meta.sr.ht-webhooks
+
+ cd api
+ install -Dm755 metasrht-api "$pkgdir"/usr/bin/metasrht-api
}
_billing() {
@@ 57,8 68,10 @@ _billing() {
touch "$subpkgdir"/usr/lib/python3.8/site-packages/metasrht/.billing
}
-sha512sums="45acab54174254b7f9d049462fb1f2e0c88a6f7127dbded67cd4f1c46e0e371728a1c0daaf0c598b3999f5f8e1ff1b4c26c9a762b5745f3f0b14f3d92022e8f2 meta.sr.ht-0.41.10.tar.gz
-835da241def0e914b0c089113d1fd80023f727969c5cb46fc59608223ab698cd1f624bf43dd100a1b89f9a4959a1f1ae0072c1f268f8988a3e67378a4badaab0 meta.sr.ht.initd
+sha512sums="859264e217a604369f0e8efd93069e506c29defbefb2f54d73dd6f3b8a1bed6d52d76371e7f281e82af070e9fbe23f36c24136ef0d979102d2d9587c5707f732 meta.sr.ht-0.43.0.tar.gz
+e216548b27a824d65f7db1fcd6a7381de896b35c98ad75b8dcfc77701941b8472a62f562498941ed6ba5f6c18e5e988d19dc80293db42ed5f0d20e453ecbe554 meta.sr.ht.initd
6ee005b75d1a277a3795a0b91eb88c490f27f4053cad5d74051140e812ee5514c77a334f37cd70a3ef7be02feae4a0688e9c06401cd530d3d56b3441c3d57a54 meta.sr.ht.confd
+87a9be9668f6c2675fd692078215898c482cbeae0b173e48923a7941d9a7dac0a58b5febf12637a6c69d924206e65cee7fa5f2f6017723b3cdc24f0b13469292 meta.sr.ht-api.initd
+6b29cd7bbbadc4e99e47e42bef843eaa17e5cc8e86999158c810a56f694bfd6c58340959f259108f1f26c4664cf2db8a9fbc1c5dad2f33f653483eae6d709056 meta.sr.ht-api.confd
6f307bfd287d3508b8fb0b7c5dc41b2ce935a98052d9b7f9c8a95148f810a0af11fae7a07918bc115c78a8b33ae88ba9b0a0209f52c7e5228f95cb94ccc992ea meta.sr.ht-webhooks.initd
b055504df3b8ede19aa50d36d97c255f6310dbc6e4fd62f6776beb8d62d0592b761819ecb3120754dbb8ad0b48c04b41bae95a2264de0d96de9e1bee70bc2693 meta.sr.ht-webhooks.confd"
A sr.ht/meta.sr.ht/meta.sr.ht-api.confd => sr.ht/meta.sr.ht/meta.sr.ht-api.confd +14 -0
@@ 0,0 1,14 @@
+# Run the daemon as this user:
+# META_USER=meta
+
+# Bind the API service to this address:
+# META_BIND=:5100
+
+# Extra arguments to pass to Gunicorn
+# META_ARGS=
+
+# If no, use an external postgresql server
+# LOCAL_PG=yes
+
+# If no, use an external redis server
+# LOCAL_REDIS=yes
A sr.ht/meta.sr.ht/meta.sr.ht-api.initd => sr.ht/meta.sr.ht/meta.sr.ht-api.initd +25 -0
@@ 0,0 1,25 @@
+#!/sbin/openrc-run
+name="meta.sr.ht-api"
+description="meta.sr.ht API service"
+supervisor=supervise-daemon
+META_USER=${META_USER:-meta}
+META_BIND=${META_BIND:-:5100}
+META_ARGS=${META_ARGS:-}
+LOCAL_PG=${LOCAL_PG:-yes}
+LOCAL_REDIS=${LOCAL_REDIS:-yes}
+LOGS=/var/log/meta.sr.ht-api.log
+supervise_daemon_args="-1 $LOGS -2 $LOGS"
+command="/usr/bin/metasrht-api"
+command_args="-b $META_BIND"
+command_user="$META_USER:$META_USER"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need net
+ [ "$LOCAL_REDIS" = "yes" ] && need redis
+ [ "$LOCAL_PG" = "yes" ] && need postgresql
+}
+
+start_pre() {
+ checkpath -f "$LOGS" -m 644 -o "$META_USER:$META_USER"
+}