1# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
2pkgname=jnfilter
3pkgver=0.1.0
4pkgrel=6
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-$pkgver"
18subpackages="
19 $pkgname-openrc
20 $pkgname-nginx:_nginx:noarch
21"
22source="
23 $pkgname-$pkgver.tar.gz::https://artifacts.gabrielgio.me/archive/$pkgname/$pkgname-$pkgver.tar.gz
24 $pkgname.initd
25 $pkgname.nginx.conf
26 $pkgname.confd
27"
28provides="py3-jnfilter=$pkgver-r$pkgrel"
29
30
31build() {
32 python3 setup.py build
33}
34
35_nginx() {
36 depends="nginx jnfilter"
37 pkgdesc="nginx configuration for $pkgname"
38 install -Dm644 "$srcdir"/"$package"/"$pkgname".nginx.conf \
39 "$subpkgdir"/etc/nginx/http.d/"$pkgname".nginx.conf
40}
41
42package() {
43 # install scripts
44 install -m755 -D "$srcdir"/$pkgname.initd \
45 "$pkgdir"/etc/init.d/$pkgname
46 install -m644 -D "$srcdir"/$pkgname.confd \
47 "$pkgdir"/etc/conf.d/$pkgname
48
49 python3 setup.py install --prefix=/usr --root="$pkgdir"
50}
51
52sha512sums="
537af506e023cd1db5b18c4026e8d299852ea8baee6dacb29786ba334da0bc7e25de86352c11c08b8aa4207ab3dc07cfaa9eac4484aa446e816ee47406d3e03e03 jnfilter-0.1.0.tar.gz
544e9afb1c25218e78aa9ce033c76689613c55eeab2c3b460476ee64375c50b83f99e98ce504c9a9485ae55e186d02eb5d38715100343a8b59cab0f14aa7fa2346 jnfilter.initd
557edf3d3932a8af82aa5140523c517da2d697e10c197b784bd9d370baddccb66c25a67c4e2b1d64f7521e818258348e3153168256572ab5bc1b0f0bc73ffe6944 jnfilter.nginx.conf
5600142d4a156bba4b714c2488674a53f82a95cbfd073aede159011de5aca415fe51481eee2bd225e376fd9cdf66ba95faa76beb038c896b6148454f940a58fffd jnfilter.confd
57"