Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/radicale/
Date: Thu, 10 Jun 2021 22:05:54
Message-Id: 1623362741.480191965ed7a9f90cc9cb4c0389c3c82b432d6d.sam@gentoo
1 commit: 480191965ed7a9f90cc9cb4c0389c3c82b432d6d
2 Author: Marco Scardovi <marco <AT> scardovi <DOT> com>
3 AuthorDate: Wed Jun 9 09:15:52 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 10 22:05:41 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48019196
7
8 www-apps/radicale: moved waitress to BDEPEND
9
10 Closes: https://bugs.gentoo.org/794988
11
12 Package-Manager: Portage-3.0.19, Repoman-3.0.3
13 Signed-off-by: Marco Scardovi <marco <AT> scardovi.com>
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 www-apps/radicale/radicale-3.0.6-r3.ebuild | 88 ++++++++++++++++++++++++++++++
17 1 file changed, 88 insertions(+)
18
19 diff --git a/www-apps/radicale/radicale-3.0.6-r3.ebuild b/www-apps/radicale/radicale-3.0.6-r3.ebuild
20 new file mode 100644
21 index 00000000000..634dd1140c4
22 --- /dev/null
23 +++ b/www-apps/radicale/radicale-3.0.6-r3.ebuild
24 @@ -0,0 +1,88 @@
25 +# Copyright 1999-2021 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +DISTUTILS_USE_SETUPTOOLS=rdepend
31 +PYTHON_COMPAT=( python3_{8,9} )
32 +
33 +inherit distutils-r1 systemd
34 +
35 +DESCRIPTION="A simple CalDAV calendar server"
36 +HOMEPAGE="https://radicale.org/"
37 +SRC_URI="https://github.com/Kozea/Radicale/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
38 +
39 +LICENSE="GPL-3+"
40 +SLOT="0"
41 +KEYWORDS="~amd64 ~arm ~x86"
42 +
43 +MY_P="Radicale-${PV}"
44 +
45 +RDEPEND="
46 + acct-user/radicale
47 + acct-group/radicale
48 + dev-python/defusedxml
49 + dev-python/passlib[bcrypt,${PYTHON_USEDEP}]
50 + dev-python/python-dateutil[${PYTHON_USEDEP}]
51 + dev-python/vobject[${PYTHON_USEDEP}]
52 + sys-apps/util-linux
53 +"
54 +
55 +BDEPEND="
56 + ${RDEPEND}
57 + test? (
58 + dev-python/waitress[${PYTHON_USEDEP}]
59 + )
60 +"
61 +
62 +S="${WORKDIR}/${MY_P}"
63 +
64 +RDIR=/var/lib/"${PN}"
65 +
66 +DOCS=( DOCUMENTATION.md NEWS.md )
67 +
68 +src_prepare() {
69 + sed -i '/^addopts =/d' setup.cfg || die
70 + distutils-r1_src_prepare
71 +}
72 +
73 +python_install_all() {
74 + rm README* || die
75 + # init file
76 + newinitd "${FILESDIR}"/radicale-r3.init.d radicale
77 + systemd_dounit "${FILESDIR}/${PN}.service"
78 +
79 + # directories
80 + keepdir "${RDIR}"
81 + fperms 0750 "${RDIR}"
82 + fowners "${PN}:${PN}" "${RDIR}"
83 +
84 + # config file
85 + insinto /etc/"${PN}"
86 + doins config
87 +
88 + # fcgi and wsgi files
89 + exeinto /usr/share/"${PN}"
90 + doexe radicale.wsgi
91 +
92 + distutils-r1_python_install_all
93 +}
94 +
95 +distutils_enable_tests pytest
96 +
97 +pkg_postinst() {
98 + local _erdir="${EROOT}${RDIR}"
99 +
100 + einfo "A sample WSGI script has been put into ${EROOT}/usr/share/${PN}."
101 + einfo "You will also find there an example FastCGI script."
102 + if [[ $(stat --format="%U:%G:%a" "${_erdir}") != "${PN}:${PN}:750" ]]
103 + then
104 + ewarn ""
105 + ewarn "Unsafe file permissions detected on ${_erdir}."
106 + ewarn "This probably comes from an earlier version of this ebuild."
107 + ewarn "To fix run:"
108 + ewarn "# \`chown -R ${PN}:${PN} ${_erdir}\`"
109 + ewarn "# \`chmod 0750 ${_erdir}\`"
110 + ewarn "# \`chmod -R o= ${_erdir}\`"
111 + fi
112 +}