aboutsummaryrefslogtreecommitdiff
path: root/apks/jnfilter/APKBUILD
blob: 8f877c8f5af3f1eee48c1b22deef368f7807524e (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
# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
pkgname=jnfilter
pkgver=0.1.5
pkgrel=1
pkgdesc="Filtro for Joven Nerd's podcast feed"
url="https://git.gabrielgio.me/jnfilter/"
arch="x86_64"
license="AGPL"
options="!check" # package does not provide test
makedepends="go"
builddir="$srcdir/$pkgname-v$pkgver"
subpackages="
    $pkgname-openrc
    $pkgname-nginx:_nginx:noarch
    $pkgname-caddy:_caddy:noarch
"
source="
        $pkgname-$pkgver.tar.gz::https://git.gabrielgio.me/$pkgname/snapshot/$pkgname-$pkgver.tar.gz
        $pkgname.initd
        $pkgname.nginx.conf
        $pkgname.caddyfile
        $pkgname.confd
"

build() {
    make
}

_nginx() {
	depends="nginx jnfilter"
	pkgdesc="nginx configuration for $pkgname"
	install -Dm644 "$srcdir"/"$package"/"$pkgname".nginx.conf \
		"$subpkgdir"/etc/nginx/http.d/"$pkgname".nginx.conf
}

_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
}

package() {
    	# install scripts
	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname

	install -Dm755 bin/jnfilter "$pkgdir"/usr/bin/jnfilter
}

sha512sums="
d3a19dc30aa0306b469f5a2d4baef8b9f8214c9107886b4779fbd82487c6760737b2d9490dc2b8f34cdba6f112a33acb64fdcfcbde8bd162b0335b1acec5557e  jnfilter-0.1.5.tar.gz
2f12224f8759fb13cd3b709cf397f15ad2a6fb024edeac7646e0ce4b7a5ba6862a15c1beb728c1d0f8837910a9c403f5f42c6b7b9d81544845d154907c80ff0d  jnfilter.initd
7edf3d3932a8af82aa5140523c517da2d697e10c197b784bd9d370baddccb66c25a67c4e2b1d64f7521e818258348e3153168256572ab5bc1b0f0bc73ffe6944  jnfilter.nginx.conf
6abd5060297c0bf38d3a12bbe34b01ee2e5df1b0600ac9458850f64d4647fe3c5eb9bdb4855645875e48fe74f64229abbdcc1b139ca14f89db6e795d3a09ebf6  jnfilter.caddyfile
42965f5969d5385ab92c952ff26dfb436ba60763e6d12f48e399e166b652d0a84f725366e9a75c4a89e003e71d8ce71f4e4ce0eb27a26737bdb658dd4e7ea52b  jnfilter.confd
"