apkbuilds @ 595e07ac484ea0beb0066e7e2ad74f4137083748

 1# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
 2pkgname=reddit-nextcloud-importer
 3pkgver=0.1.2
 4pkgrel=1
 5pkgdesc="A process to import images and videos from saved post on reddit to a instance of Nextcloud."
 6url="https://git.sr.ht/~gabrielgio/reddit-nextcloud-importer"
 7arch="noarch"
 8license="Apache-2.0"
 9depends="
10    python3
11    py3-requests
12    gallery-dl
13    py3-jsonpickle
14    py3-nextcloud-api-wrapper
15    py3-praw
16"
17makedepends="python3-dev py3-setuptools_scm"
18checkdepends="py3-pytest py3-pytest-mock"
19builddir="$srcdir/$pkgname-$pkgver"
20install="$pkgname.pre-install"
21subpackages="$pkgname-openrc"
22source="$pkgname-$pkgver.tar.gz::https://artifacts.gabrielgio.me/$pkgname/$pkgname-$pkgver.tar.gz
23        $pkgname.initd
24        $pkgname.confd"
25provides="py3-reddit-nextcloud-importer=$pkgver-r$pkgrel"
26
27
28build() {
29	python3 setup.py build
30}
31
32check() {
33   python3 -m pytest
34}
35
36package() {
37    	# install scripts
38	install -m755 -D "$srcdir"/$pkgname.initd \
39		"$pkgdir"/etc/init.d/$pkgname
40	install -m644 -D "$srcdir"/$pkgname.confd \
41		"$pkgdir"/etc/conf.d/$pkgname
42
43	python3 setup.py install --prefix=/usr --root="$pkgdir"
44}
45
46sha512sums="
47aa4274d5b904c15bf262e59fbc50de58d414f660b3e3214cd44ebab0aa2f80ed890ed5bb9190df555118d8dbec81e41553816fcffc3fe1770f347c394501910d  reddit-nextcloud-importer-0.1.2.tar.gz
48718c5997338db00418c3070007c38c8fad1743e8e17e5ef3e7d25d2d40ae9474bd51edd450b854e588595cc62502a18aaa7945a2b8227a5480bb2f805a1bda1a  reddit-nextcloud-importer.initd
4983695d870b1a5d6d914c268001084ba5a4a65842b5ee8243736a45810822bc493af1990a6a5ca71dfd623f932388824edb5dced8f4fefadc95c55d1513e0db93  reddit-nextcloud-importer.confd
50"