~dricottone/huttese-apk

10a363b046430b3c0b6cfb1c8cbd295048564eaf — Drew DeVault 4 years ago 7b71c95
git.sr.ht: add API riggings
M sr.ht/git.sr.ht/APKBUILD => sr.ht/git.sr.ht/APKBUILD +19 -6
@@ 1,6 1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=git.sr.ht
pkgver=0.28.3
pkgver=0.51.0
pkgrel=0
pkgdesc="sr.ht git service"
url="https://git.sr.ht/~sircmpwn/git.sr.ht"


@@ 18,6 18,8 @@ source="
	$pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/$pkgname/archive/$pkgver.tar.gz
	git.sr.ht.initd
	git.sr.ht.confd
	git.sr.ht-api.initd
	git.sr.ht-api.confd
	git.sr.ht-webhooks.initd
	git.sr.ht-webhooks.confd
"


@@ 37,6 39,8 @@ build() {
	go build
	cd ../gitsrht-update-hook
	go build
	cd ../api
	go build -o gitsrht-api
}

package() {


@@ 47,10 51,15 @@ package() {
		"$pkgdir"/etc/init.d/git.sr.ht
	install -Dm644 "$srcdir"/git.sr.ht.confd \
		"$pkgdir"/etc/conf.d/git.sr.ht
	install -Dm755 "$srcdir"/git.sr.ht-api.initd \
		"$pkgdir"/etc/init.d/git.sr.ht-api
	install -Dm644 "$srcdir"/git.sr.ht-api.confd \
		"$pkgdir"/etc/conf.d/git.sr.ht-api
	install -Dm755 "$srcdir"/git.sr.ht-webhooks.initd \
		"$pkgdir"/etc/init.d/git.sr.ht-webhooks
	install -Dm644 "$srcdir"/git.sr.ht-webhooks.confd \
		"$pkgdir"/etc/conf.d/git.sr.ht-webhooks

	cd gitsrht-dispatch
	install -Dm755 gitsrht-dispatch "$pkgdir"/usr/bin/gitsrht-dispatch
	cd ../gitsrht-shell


@@ 59,10 68,14 @@ package() {
	install -Dm755 gitsrht-keys "$pkgdir"/usr/bin/gitsrht-keys
	cd ../gitsrht-update-hook
	install -Dm755 gitsrht-update-hook "$pkgdir"/usr/bin/gitsrht-update-hook
	cd ../api
	install -Dm755 gitsrht-api "$pkgdir"/usr/bin/gitsrht-api
}

sha512sums="771a34eeac9290dde4edc4398a33a43b18cb15fd0d577e741ae54540ecf480104888f8fc15304e5e57554556ed035a45b19f4043b7c37d30245b7e6e99d398e9  git.sr.ht-0.28.3.tar.gz
64ecc7fccf6706b9d732e6f3e1016e4f6f8f076de9c1e920c41d81c7e2ecf74c0a9de1be0d2d789da1b438a06cbf09075ea35d795c1bf9140d4414e0e273bf7a  git.sr.ht.initd
be83df46e7375266fed0e153cd800843568027f0de984c84eb67603b891ae793b1fdd4a04e8e5fbb45e74f4624e58f3cdd70d34edd646394119af5d1e17dcae1  git.sr.ht.confd
e500817c8ff10b42e40853c81c373d86dba7bcec299c62a7dc1c8259a9ca437960fb7b774d9bb92dc824356a1d1d8257e300883af9f660295ef868527358c73d  git.sr.ht-webhooks.initd
8c3365c8f175c901fc0958cb02ca4f1cede282314c904276663800b8be79ff2b2f3bfbd934adfa56f8948dced73de76427fe7703c909a6e5e055d5a164dc17b9  git.sr.ht-webhooks.confd"
sha512sums="8ed47a1cd0824bd66b7342eafb5bcade7adff8ab03a175f2beef380f6b1ac3268412a7ecf9eb9bc8d99655f4b0298644917b46eece5d7a89c0b958b528a723fe  git.sr.ht-0.51.0.tar.gz
0afd86c1ca4615f52d24dfded4c3efeb2c1216b4b4f59ba46ecfa5da4c7f33865848065534dd6b56fbf63f98b3ea5e5e893fc8e83d5e2b86e1b9f118f2837948  git.sr.ht.initd
4a66308d07c4d71306c15c73cb04efaee66188699304dbea62b295bb64b30b0d66147d6fec736bc7c0718bf43ccbff560db74499e664852fcbe9b157fbbd874f  git.sr.ht.confd
20265fb3516cc8c5226444752ffcb22acad797e7db036247593bce6d5349cb03cf6692f3567f35d36fbd52f6b50fabd1c6a444a6e188e057430a004de8f00637  git.sr.ht-api.initd
9a115a47ea8db88575794c042809641dd4ab4a44706e290ea34c40e415474afbebff5adb0af7da5c5cf1fb5e9a4774587eae2207588562a4f7b0d2e651422190  git.sr.ht-api.confd
2c0849d4582448e961ae4a021c20b9169dd508871a6587881f202f72cde59d066ce8c4cc5c4f1ab911d79a595b4cada4c41d85213c46f4f6304e85e2f0cb149d  git.sr.ht-webhooks.initd
e76b4b0ae51b040766b41da34082b6ea0f610a1039a3ce8b8d8ea496b90f52baf0a856a77b2aec7cd8dc0d2e57a6decca1c855fc2a779adc1baf7e3fe48bbaf0  git.sr.ht-webhooks.confd"

A sr.ht/git.sr.ht/git.sr.ht-api.confd => sr.ht/git.sr.ht/git.sr.ht-api.confd +14 -0
@@ 0,0 1,14 @@
# Run the daemon as this user:
# GIT_USER=git

# Bind the API service to this address:
# GIT_BIND=:5101

# Extra arguments to pass to Gunicorn
# GIT_ARGS=

# If no, use an external postgresql server
# LOCAL_PG=yes

# If no, use an external redis server
# LOCAL_REDIS=yes

A sr.ht/git.sr.ht/git.sr.ht-api.initd => sr.ht/git.sr.ht/git.sr.ht-api.initd +25 -0
@@ 0,0 1,25 @@
#!/sbin/openrc-run
name="git.sr.ht-api"
description="git.sr.ht API service"
supervisor=supervise-daemon
GIT_USER=${GIT_USER:-git}
GIT_BIND=${GIT_BIND:-:5101}
GIT_ARGS=${GIT_ARGS:-}
LOCAL_PG=${LOCAL_PG:-yes}
LOCAL_REDIS=${LOCAL_REDIS:-yes}
LOGS=/var/log/git.sr.ht-api.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
command="/usr/bin/gitsrht-api"
command_args="-b $GIT_BIND"
command_user="$GIT_USER:$GIT_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 "$GIT_USER:$GIT_USER"
}