apkbuilds @ b9d7aa0d477d23b5e9eee316152b580236aaa8fb

 1# Maintainer: Gabriel A. Giovanini <mail@gabrielgio.me>
 2pkgname=cerrado
 3pkgver=v0.0.3
 4pkgrel=0
 5pkgdesc="Self host single user forge"
 6url="https://git.gabrielgio.me/apkbuilds"
 7arch="x86_64"
 8license="AGPL"
 9makedepends="
10	go 
11	sassc
12	qtc
13"
14install="$pkgname.pre-install"
15subpackages="
16    $pkgname-openrc
17    $pkgname-caddy:_caddy:noarch
18"
19source="
20    $pkgname-$pkgver.tar.gz::https://git.gabrielgio.me/$pkgname/snapshot/$pkgname-$pkgver.tar.gz
21	$pkgname.scfg
22	$pkgname.confd
23	$pkgname.initd
24    $pkgname.caddyfile
25"
26builddir="$srcdir/$pkgname-$pkgver"
27
28build() {
29    make
30}
31
32prepare() {
33	default_prepare
34
35	git clone --depth=1 -b v5.3.3 \
36		https://github.com/twbs/bootstrap.git \
37		scss/bootstrap
38}
39
40check() {
41	make test
42}
43
44package() {
45	install -Dm755 bin/cerrado "$pkgdir"/usr/bin/cerrado
46
47	install -Dm644 "$srcdir"/"$pkgname".scfg "$pkgdir"/etc/"$pkgname".scfg
48	install -Dm755 "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/cerrado
49	install -Dm644 "$srcdir"/"$pkgname".confd "$pkgdir"/etc/conf.d/cerrado
50}
51
52
53_caddy() {
54	depends="caddy jnfilter"
55	pkgdesc="caddy configuration for $pkgname"
56
57    mkdir -p "$subpkgdir"/etc/caddy/sites/
58
59	install -Dm644 "$srcdir"/"$package"/"$pkgname".caddyfile \
60		"$subpkgdir"/etc/caddy/sites/"$pkgname".caddyfile
61}
62
63sha512sums="
647dd7756304e58d269264f0e8df61d2d94a0eb273f82f4f1205c0609f2fa6d7bbac610d42a9b168bf439619bd102c41b6bff572524fd78fa55fea8c886bf24d4a  cerrado-v0.0.3.tar.gz
657d4e0a6e75b99c25d2d124dfdfadca69e8e63545ced8b36bda4f2f633cf5dc411aee533213ad8b1b8c8e2d70419da976109881886b50f5fbff0c9df0a60aef32  cerrado.scfg
6668a44e420c72d0eace0ccd50e7d883c9e155f0ede4a399bf7e257a92a17a983b2bfaded7aa390bb3043301d32092cbb3609070578da762422bf78fae2e9c1adf  cerrado.confd
67d4ab74e8e9382e4fdf9ce54afc439ba733044dacdf3ac681afe09f01e148ff958eabe6a42efe4362abf5d540514e6e2b5aae135ccf19e8f0889c29ebd5725a71  cerrado.initd
68aeb63e9f57251bd45af6f41a0f3358a4f26b85122588a0cf715c5e84e6e708724fc80f02789160934c4fb665615d8149396c1b0f3b99e7921c4f0e4d4b6bf322  cerrado.caddyfile
69"