aboutsummaryrefslogtreecommitdiff
path: root/apks/cerrado/APKBUILD
blob: 80fba06b3c8b881e7b866ad0c67b1a28b8e6f6c2 (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.12
pkgrel=0
pkgdesc="Self host single user forge"
url="https://beta.gabrielgio.me/cerrado/"
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://beta.gabrielgio.me/$pkgname/archive/$pkgver.tar.gz
    $pkgname.scfg
    $pkgname.confd
    $pkgname.initd
    $pkgname.caddyfile
"
builddir="$srcdir/$pkgname-$pkgver"

build() {
    make SLUG=$pkgver
}

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="
8a33cfff14386689fa2cf0d71b5dbcca65cdc9ad7babab1b9d591af4b5a460b43989c1e3f7e445e614e924d04445c6f36faf5cb3686046fffa1fb9dedf3a283b  cerrado-v0.0.12.tar.gz
49f984748e4b6c169de91f746562671c56519c4ce691fee600cbbe5bad2f9eba8873dedc7a454039537dcc9efc2666344d76676a4417bed6efefdb9e8774c035  cerrado.scfg
68a44e420c72d0eace0ccd50e7d883c9e155f0ede4a399bf7e257a92a17a983b2bfaded7aa390bb3043301d32092cbb3609070578da762422bf78fae2e9c1adf  cerrado.confd
d4ab74e8e9382e4fdf9ce54afc439ba733044dacdf3ac681afe09f01e148ff958eabe6a42efe4362abf5d540514e6e2b5aae135ccf19e8f0889c29ebd5725a71  cerrado.initd
d17acd77113577b4ef51177dca03096a2f3a1614d587c413aa54087b1c97a996d715211e2e673d8dbdeee56e2d67c0aa48858664d4780d959db1e28eb2502f24  cerrado.caddyfile
"