apkbuilds @ f2581286292531e3c371e56208af46b97df37062

 1# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
 2pkgname=jnfilter
 3pkgver=1.0.1
 4pkgrel=0
 5pkgdesc="Filtro for Joven Nerd's podcast feed"
 6url="https://git.gabrielgio.me/jnfilter/"
 7arch="x86_64"
 8license="AGPL"
 9options="!check" # package does not provide test
10makedepends="go"
11builddir="$srcdir/$pkgname-$pkgver"
12subpackages="
13    $pkgname-openrc
14    $pkgname-nginx:_nginx:noarch
15    $pkgname-caddy:_caddy:noarch
16"
17source="
18        $pkgname-$pkgver.tar.gz::https://git.gabrielgio.me/$pkgname/snapshot/$pkgname-$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="
57e736726783c9ac8db89a071da146e0eb5cfcc0396e5a694627504751b6738d95959914913010b9d3a68e189fbe6c4913f7fdc18a603c02c8d4922f797f8c6722  jnfilter-1.0.1.tar.gz
582f12224f8759fb13cd3b709cf397f15ad2a6fb024edeac7646e0ce4b7a5ba6862a15c1beb728c1d0f8837910a9c403f5f42c6b7b9d81544845d154907c80ff0d  jnfilter.initd
597edf3d3932a8af82aa5140523c517da2d697e10c197b784bd9d370baddccb66c25a67c4e2b1d64f7521e818258348e3153168256572ab5bc1b0f0bc73ffe6944  jnfilter.nginx.conf
606abd5060297c0bf38d3a12bbe34b01ee2e5df1b0600ac9458850f64d4647fe3c5eb9bdb4855645875e48fe74f64229abbdcc1b139ca14f89db6e795d3a09ebf6  jnfilter.caddyfile
6142965f5969d5385ab92c952ff26dfb436ba60763e6d12f48e399e166b652d0a84f725366e9a75c4a89e003e71d8ce71f4e4ce0eb27a26737bdb658dd4e7ea52b  jnfilter.confd
62"