1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 DISTUTILS_USE_PEP517=setuptools
7 PYTHON_COMPAT=( python3_{10..13} )
9 inherit distutils-r1 optfeature systemd
12 DESCRIPTION="A simple CalDAV calendar server"
13 HOMEPAGE="https://radicale.org/"
15 https://github.com/Kozea/Radicale/archive/refs/tags/v${PV}.tar.gz
22 KEYWORDS="~amd64 ~arm ~x86"
25 >=acct-user/radicale-0-r2
27 dev-python/bcrypt[${PYTHON_USEDEP}]
28 dev-python/defusedxml[${PYTHON_USEDEP}]
29 dev-python/passlib[${PYTHON_USEDEP}]
30 dev-python/vobject[${PYTHON_USEDEP}]
36 dev-python/pytest[${PYTHON_USEDEP}]
37 dev-python/waitress[${PYTHON_USEDEP}]
41 distutils_enable_tests pytest
45 DOCS=( DOCUMENTATION.md CHANGELOG.md )
48 epytest -o addopts= radicale/tests/
51 python_install_all() {
54 newinitd "${FILESDIR}"/radicale-r4.init.d radicale
55 systemd_dounit "${FILESDIR}/${PN}.service"
60 fowners "${PN}:${PN}" "${RDIR}"
67 exeinto /usr/share/"${PN}"
70 distutils-r1_python_install_all
74 local _erdir="${EROOT}${RDIR}"
76 einfo "A sample WSGI script has been put into ${EROOT}/usr/share/${PN}."
77 einfo "You will also find there an example FastCGI script."
78 if [[ $(stat --format="%U:%G:%a" "${_erdir}") != "${PN}:${PN}:750" ]]
81 ewarn "Unsafe file permissions detected on ${_erdir}."
82 ewarn "This probably comes from an earlier version of this ebuild."
84 ewarn "# \`chown -R ${PN}:${PN} ${_erdir}\`"
85 ewarn "# \`chmod 0750 ${_erdir}\`"
86 ewarn "# \`chmod -R o= ${_erdir}\`"
89 optfeature "Publish changes to rabbitmq" dev-python/pika
90 optfeature "LDAP/LDAPS authentication" dev-python/ldap3 dev-python/python-ldap