apkbuilds @ 7b3a8ad08e86c00788a28b1045b02530c2ea2044

 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/archive/$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="
477f4b7f75377faef64936b10c92420c8df9fa0de8b65d083b5124b547bfda7c5760f08dcbfdb5816f50ad9feaf5d336a4ae9a159233988eca217c09145a82448f  reddit-nextcloud-importer-0.1.2.tar.gz
48b7960ee63d10c792fb3302f6f84fa23975dfb1d24a85249ff612c289126297f605bc4203b28eff7f94aefb6729593d4fc22bdb78d398d7e4445f22f2b78175a0  reddit-nextcloud-importer.initd
498e400cd0ac302b8cade98db5aea8afd109e7d5d434281238997c1e3f0b779322ecade95a26fde5860a3846b8d9687cca95df1c1b5ee0b489d6782bf6c2680666  reddit-nextcloud-importer.confd
50"