apkbuilds @ 9fd9849a86aa4de51ca49e62de8d6cfb6c8a6cc7

 1# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
 2pkgname=jnfilter
 3pkgver=0.1.1
 4pkgrel=1
 5pkgdesc="Filtro for Joven Nerd's podcast feed"
 6url="https://git.sr.ht/~gabrielgio/jnfilter"
 7arch="noarch"
 8license="Apache-2.0"
 9options="!check" # package does not provide test
10depends="
11    python3
12    py3-httpx
13    py3-flask
14    py3-gunicorn
15"
16makedepends="python3-dev "
17builddir="$srcdir/$pkgname-v$pkgver"
18subpackages="
19    $pkgname-openrc
20    $pkgname-nginx:_nginx:noarch
21    $pkgname-caddy:_caddy:noarch
22"
23source="
24        $pkgname-$pkgver.tar.gz::https://git.sr.ht/~gabrielgio/$pkgname/archive/v$pkgver.tar.gz
25        $pkgname.initd
26        $pkgname.nginx.conf
27        $pkgname.caddyfile
28        $pkgname.confd
29"
30provides="py3-jnfilter=$pkgver-r$pkgrel"
31
32
33build() {
34	python3 setup.py build
35}
36
37_nginx() {
38	depends="nginx jnfilter"
39	pkgdesc="nginx configuration for $pkgname"
40	install -Dm644 "$srcdir"/"$package"/"$pkgname".nginx.conf \
41		"$subpkgdir"/etc/nginx/http.d/"$pkgname".nginx.conf
42}
43
44_caddy() {
45	depends="caddy jnfilter"
46	pkgdesc="caddy configuration for $pkgname"
47
48    mkdir -p "$subpkgdir"/etc/caddy/sites/
49
50	install -Dm644 "$srcdir"/"$package"/"$pkgname".caddyfile \
51		"$subpkgdir"/etc/caddy/sites/"$pkgname".caddyfile
52}
53
54package() {
55    	# install scripts
56	install -m755 -D "$srcdir"/$pkgname.initd \
57		"$pkgdir"/etc/init.d/$pkgname
58	install -m644 -D "$srcdir"/$pkgname.confd \
59		"$pkgdir"/etc/conf.d/$pkgname
60
61	python3 setup.py install --prefix=/usr --root="$pkgdir"
62}
63
64sha512sums="
65b7bba93dc85ffe9e86e1b0c7e3d1773d30aec9dd6797fc41b995a1a6b5687aa33e8f7ef26b9d26be6d5ffdbbe21d3750e97b15ebaf82dba4e63b9d82120f0cb2  jnfilter-0.1.1.tar.gz
664e9afb1c25218e78aa9ce033c76689613c55eeab2c3b460476ee64375c50b83f99e98ce504c9a9485ae55e186d02eb5d38715100343a8b59cab0f14aa7fa2346  jnfilter.initd
677edf3d3932a8af82aa5140523c517da2d697e10c197b784bd9d370baddccb66c25a67c4e2b1d64f7521e818258348e3153168256572ab5bc1b0f0bc73ffe6944  jnfilter.nginx.conf
686abd5060297c0bf38d3a12bbe34b01ee2e5df1b0600ac9458850f64d4647fe3c5eb9bdb4855645875e48fe74f64229abbdcc1b139ca14f89db6e795d3a09ebf6  jnfilter.caddyfile
6900142d4a156bba4b714c2488674a53f82a95cbfd073aede159011de5aca415fe51481eee2bd225e376fd9cdf66ba95faa76beb038c896b6148454f940a58fffd  jnfilter.confd
70"