~dricottone/huttese-apk

ca184b1082a51b0179e8a2705af08c96e0c258a0 — Drew DeVault 6 years ago 99adcdb
Update builds.sr.ht package
2 files changed, 8 insertions(+), 15 deletions(-)

M sr.ht/builds.sr.ht/APKBUILD
R sr.ht/builds.sr.ht/{builds.sr.ht-runner.initd => builds.sr.ht-worker.initd}
M sr.ht/builds.sr.ht/APKBUILD => sr.ht/builds.sr.ht/APKBUILD +4 -6
@@ 1,6 1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=builds.sr.ht
pkgver=0.4.6
pkgver=0.29.6
pkgrel=0
pkgdesc="sr.ht build service"
url="https://git.sr.ht/~sircmpwn/builds.sr.ht"


@@ 12,14 12,12 @@ depends="
	py3-celery
	py3-redis
	py3-yaml
	py3-markdown
	py3-bleach
"
makedepends="py-setuptools nodejs sassc"
makedepends="py-setuptools nodejs sassc go"
subpackages="$pkgname-images"
source="
	http://git.sr.ht/~sircmpwn/$pkgname/snapshot/$pkgname-$pkgver.tar.xz
	builds.sr.ht-runner.initd
	builds.sr.ht-worker.initd
"
install="$pkgname.pre-install"
builddir="$srcdir/$pkgname-$pkgver"


@@ 41,7 39,7 @@ images() {
	cd "$builddir"
	mkdir -p "$subpkgdir"/var/lib/
	cp -R images "$subpkgdir"/var/lib/
	install -Dm755 "$srcdir"/builds.sr.ht-runner.initd "$subpkgdir"/etc/init.d/builds.sr.ht-runner
	install -Dm755 "$srcdir"/builds.sr.ht-worker.initd "$subpkgdir"/etc/init.d/builds.sr.ht-worker
}

sha512sums="9eab18643eec0f282a564c2d49b96f184719707d35df5cc4fdced0c8157a9004a95dc0e878f989a1f9eaadd3171316d566b957f53206ddc837965d3c8242994d  builds.sr.ht-0.4.6.tar.xz

R sr.ht/builds.sr.ht/builds.sr.ht-runner.initd => sr.ht/builds.sr.ht/builds.sr.ht-worker.initd +4 -9
@@ 1,25 1,20 @@
#!/sbin/openrc-run
name="srht-runner"
description="builds.sr.ht build runner service"
name="srht-worker"
description="builds.sr.ht build worker"

depend() {
	need net
}

nproc() {
	grep "core id" /proc/cpuinfo | wc -l
}

start() {
	ebegin "Starting $name"
	start-stop-daemon --background --make-pidfile --pidfile /run/$name.pid -u builds \
		--exec /usr/bin/celery -- \
		-A buildsrht.runner worker --loglevel=info -c $(nproc)
		--exec /usr/bin/builds.sr.ht-worker
	eend $?
}

stop() {
	ebegin "Stopping $name"
	start-stop-daemon --stop --exec /usr/bin/celery --pidfile /run/$name.pid
	start-stop-daemon --stop --exec /usr/bin/builds.sr.ht-worker --pidfile /run/$name.pid
	eend $?
}