aboutsummaryrefslogtreecommitdiff
path: root/apks/cerrado/APKBUILD
blob: e9e748776c4c2bf3e65b76a6be0d4c8d41a63aa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Maintainer: Gabriel A. Giovanini <mail@gabrielgio.me>
pkgname=cerrado
pkgver=v0.0.2
pkgrel=3
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
    $pkgname-caddy:_caddy:noarch
"
source="
    $pkgname-$pkgver.tar.gz::https://git.gabrielgio.me/$pkgname/snapshot/$pkgname-$pkgver.tar.gz
	$pkgname.scfg
	$pkgname.confd
	$pkgname.initd
    $pkgname.caddyfile
"
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
}


_caddy() {
	depends="caddy jnfilter"
	pkgdesc="caddy configuration for $pkgname"

    mkdir -p "$subpkgdir"/etc/caddy/sites/

	install -Dm644 "$srcdir"/"$package"/"$pkgname".caddyfile \
		"$subpkgdir"/etc/caddy/sites/"$pkgname".caddyfile
}

sha512sums="
6d227f0f548e21d58d23f333ad549f3afec0d66a8700caefd35de1e15e1748e2b537925566bbeadb22f66608c847ff2845b40dd22be5d9ec5bc5104984a72dd2  cerrado-v0.0.2.tar.gz
7d4e0a6e75b99c25d2d124dfdfadca69e8e63545ced8b36bda4f2f633cf5dc411aee533213ad8b1b8c8e2d70419da976109881886b50f5fbff0c9df0a60aef32  cerrado.scfg
68a44e420c72d0eace0ccd50e7d883c9e155f0ede4a399bf7e257a92a17a983b2bfaded7aa390bb3043301d32092cbb3609070578da762422bf78fae2e9c1adf  cerrado.confd
d4ab74e8e9382e4fdf9ce54afc439ba733044dacdf3ac681afe09f01e148ff958eabe6a42efe4362abf5d540514e6e2b5aae135ccf19e8f0889c29ebd5725a71  cerrado.initd
aeb63e9f57251bd45af6f41a0f3358a4f26b85122588a0cf715c5e84e6e708724fc80f02789160934c4fb665615d8149396c1b0f3b99e7921c4f0e4d4b6bf322  cerrado.caddyfile
"