]> Pileus Git - ~andy/sunrise/blob - app-office/radicale/radicale-0.7.1.ebuild
app-misc/rbutil: Bump, fix qt deps, EAPI bump
[~andy/sunrise] / app-office / radicale / radicale-0.7.1.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=2
6 PYTHON_DEPEND="*:2.6"
7 SUPPORT_PYTHON_ABIS=1
8
9 inherit distutils user
10
11 MY_PN="Radicale"
12 MY_P="${MY_PN}-${PV}"
13
14 DESCRIPTION="A simple CalDAV calendar server"
15 HOMEPAGE="http://www.radicale.org/"
16 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
17
18 LICENSE="GPL-3"
19 SLOT="0"
20 KEYWORDS="~amd64 ~x86"
21 IUSE="fastcgi ldap ssl"
22
23 # the '>=' goes ok, as radicale supports _all_ other python version
24 # this includes all 3.* versions
25 RDEPEND="ssl? ( >=dev-lang/python-2.6.6[ssl] )
26                 ldap? ( dev-python/python-ldap )
27                 fastcgi? ( dev-python/flup )"
28
29 # radicale's authentication against PAM is not possible here:
30 # Gentoo has not included the package
31 # also it seems old, which is bad with respect to
32 # http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1502
33
34 S=${WORKDIR}/${MY_P}
35
36 RDIR=/var/lib/radicale
37 LDIR=/var/log/radicale
38
39 pkg_setup() {
40         enewgroup radicale
41         enewuser radicale -1 -1 ${RDIR} radicale
42 }
43
44 src_prepare() {
45         # fix pathes
46         sed -i -e "s:^\(filesystem_folder = \).*$:\1${RDIR}:g" \
47                                 config || die
48         sed -i -e "s;^\(args = ('/var/log/radicale\);\1/radicale.log;" \
49                                 logging || die
50         distutils_src_prepare
51 }
52
53 src_install() {
54         # delete the useless .rst, so that it is not installed
55         rm README.rst
56
57         distutils_src_install
58
59         # init file
60         newinitd "${FILESDIR}"/radicale.init.d radicale || die
61
62         # directories
63         diropts -m0750
64         dodir ${RDIR}; fowners radicale:radicale ${RDIR}
65         dodir ${LDIR}; fowners radicale:radicale ${LDIR}
66
67         # config file
68         insinto /etc/${PN}
69         doins config logging || die
70
71         # fcgi and wsgi files
72         insinto /usr/share/${PN}
73         doins radicale.wsgi
74         use fastcgi && doins radicale.fcgi
75 }
76
77 pkg_postinst() {
78         einfo "Radicale now supports WSGI."
79         einfo "A sample wsgi-script has been put into ${ROOT}usr/share/${PN}."
80         use fastcgi && einfo "You will also find there an example fcgi-script."
81
82         distutils_pkg_postinst
83 }