~dricottone/huttese-apk

4d9c407a9ae7ca29dbb47d87a402d68a45dabc68 — Drew DeVault 4 years ago 188b09c
man.sr.ht: overhaul init files
3 files changed, 7 insertions(+), 17 deletions(-)

M sr.ht/man.sr.ht/APKBUILD
M sr.ht/man.sr.ht/man.sr.ht.confd
M sr.ht/man.sr.ht/man.sr.ht.initd
M sr.ht/man.sr.ht/APKBUILD => sr.ht/man.sr.ht/APKBUILD +4 -7
@@ 1,6 1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=man.sr.ht
pkgver=0.9.1
pkgver=0.14.13
pkgrel=0
pkgdesc="sr.ht wiki service"
url="https://git.sr.ht/~sircmpwn/man.sr.ht"


@@ 21,18 21,15 @@ source="
	man.sr.ht.initd
	man.sr.ht.confd
"
builddir="$srcdir/$pkgname-$pkgver"
export PKGVER=$pkgver
options="$options !check"
install="$pkgname.post-install $pkgname.post-upgrade"

build() {
	cd "$builddir"
	python3 setup.py build
}

package() {
	cd "$builddir"
	python3 setup.py install --root="$pkgdir" --optimize=1
	install -Dm755 "$srcdir"/man.sr.ht.initd \
		"$pkgdir"/etc/init.d/man.sr.ht


@@ 40,6 37,6 @@ package() {
		"$pkgdir"/etc/conf.d/man.sr.ht
}

sha512sums="73ebf55b42ab5ce0e4dff3e73f1d858b2b2829f52e78c36b19418c12cd235c83b2c33594571c9aa53d9e6b0201f37c3e07832cffc5b700640bf3f75c4b9909ac  man.sr.ht-0.9.1.tar.gz
fe5ad8aee48f0394caf3f77bf79b0356b1b29b18d00a981fef97a3913f1956f8e31cf18b3b0e8c98c04307e053e2bdaed5b48946f97199b2ced0e7815c8e47d9  man.sr.ht.initd
6f12f67a857b2839ea590ba27e165bb5b436ce3dc4ee8ae5a67edc83ba4b9175bcc192c7c36e55c68449e4b07cc92444f0a6ce586cad55934f6e4bceee0b7c17  man.sr.ht.confd"
sha512sums="6f077676ddac9019ae72fa487c95415618fd080cade8503448454feb5b7f6e722baf67acfbeb90f80d6945d70e96e1ebdce5551a3bad4929b08d5904f7cfc975  man.sr.ht-0.14.13.tar.gz
ca32992f0778f6edf227de4520dd13fe0c3c4e4dd5be1043a5e5fb66f49392813a5bd0502e33b7c3f352cdcb12edc84e20faa2e376d33fe937a6b756e6e90033  man.sr.ht.initd
e8e3b1f8e3e6a132692774d141e79b9334714130371523bf43edadba0a580ce6003e7a7f5b23fb769d78c5951f6ac1f4097232c2764ed5988366ad80d1a85df7  man.sr.ht.confd"

M sr.ht/man.sr.ht/man.sr.ht.confd => sr.ht/man.sr.ht/man.sr.ht.confd +0 -6
@@ 6,9 6,3 @@

# Extra arguments to pass to Gunicorn
# MAN_ARGS=

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

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

M sr.ht/man.sr.ht/man.sr.ht.initd => sr.ht/man.sr.ht/man.sr.ht.initd +3 -4
@@ 5,8 5,6 @@ supervisor=supervise-daemon
MAN_USER=${MAN_USER:-man}
MAN_BIND=${MAN_BIND:-127.0.0.1:5004}
MAN_ARGS=${MAN_ARGS:-}
LOCAL_PG=${LOCAL_PG:-yes}
LOCAL_REDIS=${LOCAL_REDIS:-yes}
LOGS=/var/log/man.sr.ht.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
command="/usr/bin/gunicorn"


@@ 16,8 14,9 @@ pidfile="/run/${RC_SVCNAME}.pid"

depend() {
	need net
	[ "$LOCAL_REDIS" = "yes" ] && need redis
	[ "$LOCAL_PG" = "yes" ] && need postgresql
	use redis
	use postgresql
	use pgbouncer
}

start_pre() {