1# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
2pkgname=jnfilter
3pkgver=0.1.5
4pkgrel=0
5pkgdesc="Filtro for Joven Nerd's podcast feed"
6url="https://git.sr.ht/~gabrielgio/jnfilter"
7arch="x86_64"
8license="AGPL"
9options="!check" # package does not provide test
10makedepends="go"
11builddir="$srcdir/$pkgname-v$pkgver"
12subpackages="
13 $pkgname-openrc
14 $pkgname-nginx:_nginx:noarch
15 $pkgname-caddy:_caddy:noarch
16"
17source="
18 $pkgname-$pkgver.tar.gz::https://git.sr.ht/~gabrielgio/$pkgname/archive/v$pkgver.tar.gz
19 $pkgname.initd
20 $pkgname.nginx.conf
21 $pkgname.caddyfile
22 $pkgname.confd
23"
24
25build() {
26 make
27}
28
29_nginx() {
30 depends="nginx jnfilter"
31 pkgdesc="nginx configuration for $pkgname"
32 install -Dm644 "$srcdir"/"$package"/"$pkgname".nginx.conf \
33 "$subpkgdir"/etc/nginx/http.d/"$pkgname".nginx.conf
34}
35
36_caddy() {
37 depends="caddy jnfilter"
38 pkgdesc="caddy configuration for $pkgname"
39
40 mkdir -p "$subpkgdir"/etc/caddy/sites/
41
42 install -Dm644 "$srcdir"/"$package"/"$pkgname".caddyfile \
43 "$subpkgdir"/etc/caddy/sites/"$pkgname".caddyfile
44}
45
46package() {
47 # install scripts
48 install -m755 -D "$srcdir"/$pkgname.initd \
49 "$pkgdir"/etc/init.d/$pkgname
50 install -m644 -D "$srcdir"/$pkgname.confd \
51 "$pkgdir"/etc/conf.d/$pkgname
52
53 install -Dm755 bin/jnfilter "$pkgdir"/usr/bin/jnfilter
54}
55
56sha512sums="
57730dd32fa788c0e4fce146f5368870872f555a69d514b70f7642728860f8485124b58746e663e8536ff986ebb6bde3c3d101c2cb00efbc5fbef859e1c3641837 jnfilter-0.1.5.tar.gz
582f12224f8759fb13cd3b709cf397f15ad2a6fb024edeac7646e0ce4b7a5ba6862a15c1beb728c1d0f8837910a9c403f5f42c6b7b9d81544845d154907c80ff0d jnfilter.initd
597edf3d3932a8af82aa5140523c517da2d697e10c197b784bd9d370baddccb66c25a67c4e2b1d64f7521e818258348e3153168256572ab5bc1b0f0bc73ffe6944 jnfilter.nginx.conf
606abd5060297c0bf38d3a12bbe34b01ee2e5df1b0600ac9458850f64d4647fe3c5eb9bdb4855645875e48fe74f64229abbdcc1b139ca14f89db6e795d3a09ebf6 jnfilter.caddyfile
6142965f5969d5385ab92c952ff26dfb436ba60763e6d12f48e399e166b652d0a84f725366e9a75c4a89e003e71d8ce71f4e4ce0eb27a26737bdb658dd4e7ea52b jnfilter.confd
62"