diff options
-rw-r--r-- | apks/cerrado/APKBUILD | 53 | ||||
-rw-r--r-- | apks/cerrado/cerrado.confd | 2 | ||||
-rw-r--r-- | apks/cerrado/cerrado.initd | 21 | ||||
-rw-r--r-- | apks/cerrado/cerrado.pre-install | 6 | ||||
-rw-r--r-- | apks/cerrado/cerrado.scfg | 3 |
5 files changed, 85 insertions, 0 deletions
diff --git a/apks/cerrado/APKBUILD b/apks/cerrado/APKBUILD new file mode 100644 index 0000000..89b62af --- /dev/null +++ b/apks/cerrado/APKBUILD @@ -0,0 +1,53 @@ +# Maintainer: Gabriel A. Giovanini <mail@gabrielgio.me> +pkgname=cerrado +pkgver=v0.0.2 +pkgrel=0 +pkgdesc="Self host single user forge" +url="https://git.gabrielgio.me/apkbuilds" +arch="x86_64" +license="AGPL" +makedepends=" + go + sassc + qtc +" +install="$pkgname.pre-install" +subpackages="$pkgname-openrc" +source=" + $pkgname-$pkgver.tar.gz::https://git.gabrielgio.me/$pkgname/snapshot/$pkgname-$pkgver.tar.gz + $pkgname.scfg + $pkgname.confd + $pkgname.initd +" +builddir="$srcdir/$pkgname-$pkgver" + +build() { + make +} + +prepare() { + default_prepare + + git clone --depth=1 -b v5.3.3 \ + https://github.com/twbs/bootstrap.git \ + scss/bootstrap +} + +check() { + make test +} + +package() { + install -Dm755 bin/cerrado "$pkgdir"/usr/bin/cerrado + + install -Dm644 "$srcdir"/"$pkgname".scfg "$pkgdir"/etc/"$pkgname".scfg + install -Dm755 "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/cerrado + install -Dm644 "$srcdir"/"$pkgname".confd "$pkgdir"/etc/conf.d/cerrado +} + +sha512sums=" +6d227f0f548e21d58d23f333ad549f3afec0d66a8700caefd35de1e15e1748e2b537925566bbeadb22f66608c847ff2845b40dd22be5d9ec5bc5104984a72dd2 cerrado-v0.0.2.tar.gz +836ffc390b513b8da83c3ab992a485cd58a665149bffe7243cb34a1d137318f39df6b1b3c7c5e27211e111dc46af93bf357a92b84b53ce093d2db67695c3128f cerrado.scfg +68a44e420c72d0eace0ccd50e7d883c9e155f0ede4a399bf7e257a92a17a983b2bfaded7aa390bb3043301d32092cbb3609070578da762422bf78fae2e9c1adf cerrado.confd +fb04232b187bad5522e93ee371dd0c86b99c468d81a78c5e397279501d91cc96f4a44cbd6156312a09f185a1780974b97a17fce257d445a0abbfcd9cac9f11f0 cerrado.initd +" diff --git a/apks/cerrado/cerrado.confd b/apks/cerrado/cerrado.confd new file mode 100644 index 0000000..a48b63a --- /dev/null +++ b/apks/cerrado/cerrado.confd @@ -0,0 +1,2 @@ +config=/etc/cerrado.scfg +supervisor=supervise-daemon diff --git a/apks/cerrado/cerrado.initd b/apks/cerrado/cerrado.initd new file mode 100644 index 0000000..55086e1 --- /dev/null +++ b/apks/cerrado/cerrado.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run + +command="/usr/bin/cerrado" +command_args="-config $config" +: ${command_user:="cerrado:cerrado"} +command_background=yes +directory="/var/lib/cerrado" +pidfile="/run/cerrado.pid" + +output_log="/var/log/cerrado/access.log" +error_log="/var/log/cerrado/error.log" + +depend() { + need net + after firewall +} + +start_pre() { + checkpath -d -m 755 -o "$command_user" /var/run/cerrado + checkpath -d -m 755 -o "$command_user" /var/log/cerrado +} diff --git a/apks/cerrado/cerrado.pre-install b/apks/cerrado/cerrado.pre-install new file mode 100644 index 0000000..4c17d6a --- /dev/null +++ b/apks/cerrado/cerrado.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S cerrado +adduser -S -D -H -h /var/lib/cerrado -s /sbin/nologin -G cerrado -g cerrado cerrado + +exit 0 diff --git a/apks/cerrado/cerrado.scfg b/apks/cerrado/cerrado.scfg new file mode 100644 index 0000000..633b384 --- /dev/null +++ b/apks/cerrado/cerrado.scfg @@ -0,0 +1,3 @@ +# for tcp biding +# listen-addr tcp://localhost:8080 +listen-addr unix://var/run/cerrado.sock |