aboutsummaryrefslogtreecommitdiffstats
path: root/community/radicale/APKBUILD
blob: fb3e44cc2fdc4e991853e6ac384605653437ee9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=radicale
pkgver=3.1.7
pkgrel=0
pkgdesc="Free and open-source CalDAV and CardDAV server"
url="https://radicale.org/3.0.html"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3 py3-passlib py3-vobject py3-defusedxml py3-dateutil py3-setuptools"
checkdepends="py3-pytest py3-pytest-flake8 py3-pytest-isort py3-pytest-cov py3-waitress"
pkgusers="radicale"
pkggroups="radicale"
install="$pkgname.pre-install"
source="$pkgname-$pkgver.tar.gz::https://github.com/Kozea/radicale/archive/v$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd"
subpackages="$pkgname-openrc"
builddir="$srcdir/Radicale-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# install the package to test_install directory for testing
	python3 setup.py install --root="$PWD"/test_install

	PYTHONPATH="$PWD"/test_install/usr/lib/python3.10/site-packages \
		pytest -c /dev/null
}

package() {
	python3 setup.py install --skip-build --prefix=/usr --root="$pkgdir"

	install -d -o radicale -g radicale "$pkgdir"/var/lib/radicale \
		"$pkgdir"/var/log/radicale

	install -d "$pkgdir"/etc/radicale
	install -m640 -g radicale config "$pkgdir"/etc/radicale/
	install -m640 -g radicale rights "$pkgdir"/etc/radicale/

	install -Dm755 "$srcdir"/radicale.initd "$pkgdir"/etc/init.d/radicale
	install -Dm644 "$srcdir"/radicale.confd "$pkgdir"/etc/conf.d/radicale
}

sha512sums="
04ae2072a90f303dd18de3a2cf6474263ca9650ee87ee72be0d7177ad2f2f61f4860784674bac8dbff2c2679ac45acd03aa38c02b00349f01669c6cf4a474605  radicale-3.1.7.tar.gz
f1eb4477ca7d7d8040837b712289f18d6b62c7f862a8e9bea32968a49b8bf4394360b5440c815aa23df48ba0aaac61bcb8c9d6e7575c3b23da2ac05a45eac194  radicale.initd
09bb6228ba07039b97b317d4547a33b7ebf9c8f47ff72b870fc2f5e46de620e0614d993c5c96d73f0ad6196d469bb0f7206478781abf314af1d598e3132d678e  radicale.confd
"