1# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
2pkgname=jnfilter
3pkgver=0.1.1
4pkgrel=0
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"
22source="
23 $pkgname-$pkgver.tar.gz::https://git.sr.ht/~gabrielgio/$pkgname/archive/v$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="
53b7bba93dc85ffe9e86e1b0c7e3d1773d30aec9dd6797fc41b995a1a6b5687aa33e8f7ef26b9d26be6d5ffdbbe21d3750e97b15ebaf82dba4e63b9d82120f0cb2 jnfilter-0.1.1.tar.gz
544e9afb1c25218e78aa9ce033c76689613c55eeab2c3b460476ee64375c50b83f99e98ce504c9a9485ae55e186d02eb5d38715100343a8b59cab0f14aa7fa2346 jnfilter.initd
557edf3d3932a8af82aa5140523c517da2d697e10c197b784bd9d370baddccb66c25a67c4e2b1d64f7521e818258348e3153168256572ab5bc1b0f0bc73ffe6944 jnfilter.nginx.conf
5600142d4a156bba4b714c2488674a53f82a95cbfd073aede159011de5aca415fe51481eee2bd225e376fd9cdf66ba95faa76beb038c896b6148454f940a58fffd jnfilter.confd
57"