A sr.ht/git-send-email.io/APKBUILD => sr.ht/git-send-email.io/APKBUILD +38 -0
@@ 0,0 1,38 @@
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=git-send-email.io
+pkgver=0.1.1
+pkgrel=0
+pkgdesc="Interactive tutorial for git send-email"
+url="https://git.sr.ht/~sircmpwn/git-send-email.io"
+arch="noarch"
+license="MIT"
+depends="
+ py3-flask
+ py3-pygit2
+ py3-pystache
+"
+makedepends="py3-setuptools nodejs sassc"
+subpackages="${pkgname}-openrc"
+source="
+ $pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/$pkgname/archive/$pkgver.tar.gz
+ git-send-email.io.init
+"
+builddir="$srcdir/$pkgname-$pkgver"
+export PKGVER=$pkgver
+options="$options !check"
+install="$pkgname.post-install"
+
+build() {
+ cd "$builddir"
+ python3 setup.py build
+}
+
+package() {
+ cd "$builddir"
+ python3 setup.py install --root="$pkgdir" --optimize=1
+ mkdir -p "$pkgdir"/etc/init.d
+ install -Dm755 "$srcdir"/git-send-email.io.init "$pkgdir"/etc/init.d/git-send-email.io
+}
+
+sha512sums="11a856fa05637afe08b0b41953a924977ecdf53d678e8dcf8d13f540c7d9d7dc17833b463a05386e2ad368a4387812dbfae2683bfa8c3e765e41d7e170160eca git-send-email.io-0.1.1.tar.gz
+b5c929644f6f4a36ff11bb34d5332e6091a7fd856dcd9aae770609c3fadd92cca0631e8c9edf27c55114da3547af99e5ca28d5c851fecd788b52b2925dd0ebf8 git-send-email.io.init"
A sr.ht/git-send-email.io/git-send-email.io.init => sr.ht/git-send-email.io/git-send-email.io.init +35 -0
@@ 0,0 1,35 @@
+#!/sbin/openrc-run
+name="git-send-email.io"
+description="git-send-email.io webhook service"
+
+# Override these with /etc/conf.d/git-send-emaio.io
+GITSENDEMAIL_USER=${GITSENDEMAIL_USER:-gitsendemail}
+GITSENDEMAIL_BIND=${GITSENDEMAIL_BIND:-127.0.0.1:5001}
+GITSENDEMAIL_ARGS=${GITSENDEMAIL_ARGS:-}
+LOGS=/var/log/git-send-emaio.io.log
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting $name"
+ touch "$LOGS"
+ chown ${GITSENDEMAIL_USER} "$LOGS"
+ start-stop-daemon \
+ -u ${GITSENDEMAIL_USER} \
+ -1 "$LOGS" \
+ -2 "$LOGS" \
+ --background \
+ --make-pidfile \
+ --pidfile /run/$name.pid \
+ --exec /usr/bin/gunicorn -- \
+ email_tutorial.app:app -b ${GITSENDEMAIL_BIND} ${GITSENDEMAIL_ARGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $name"
+ start-stop-daemon --stop --exec /usr/bin/gunicorn --pidfile /run/$name.pid
+ eend $?
+}
A sr.ht/git-send-email.io/git-send-email.io.post-install => sr.ht/git-send-email.io/git-send-email.io.post-install +3 -0
@@ 0,0 1,3 @@
+#!/bin/sh
+addgroup -S gitsendemail || true
+adduser -SDH -s /sbin/nologin -g gitsendemail gitsendemail || true