Mercurial > hg > portage
changeset 450:907e7215a5aa
add an ebuild for the latest radicale 1.x
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Tue, 12 Dec 2017 08:45:06 +0100 |
parents | f45172e2548b |
children | beac8a186972 90f4c3220d2e |
files | www-apps/radicale/files/radicale-1.1.6-config.patch www-apps/radicale/radicale-1.1.6.ebuild |
diffstat | 2 files changed, 104 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www-apps/radicale/files/radicale-1.1.6-config.patch Tue Dec 12 08:45:06 2017 +0100 @@ -0,0 +1,34 @@ +diff --git a/config b/config +index 453a45e..10c1595 100644 +--- a/config ++++ b/config +@@ -146,7 +146,7 @@ http_password_parameter = + #custom_handler = + + # File for rights management from_file +-#file = ~/.config/radicale/rights ++file = /etc/radicale/rights + + + [storage] +@@ -163,7 +163,7 @@ file = ~/.config/radicale/rights + #custom_handler = + + # Folder for storing local collections, created if not present +-#filesystem_folder = ~/.config/radicale/collections ++filesystem_folder = /var/lib/radicale/ + + # Database URL for SQLAlchemy + # dialect+driver://user:password@host/dbname[?key=value..] +diff --git a/logging b/logging +--- a/logging ++++ b/logging +@@ -45,7 +45,7 @@ formatter = simple + [handler_file] + # File handler + class = FileHandler +-args = ('/var/log/radicale',) ++args = ('/var/log/radicale/radicale.log',) + formatter = full + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www-apps/radicale/radicale-1.1.6.ebuild Tue Dec 12 08:45:06 2017 +0100 @@ -0,0 +1,70 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4,3_5} ) + +inherit eutils distutils-r1 user + +MY_PN="Radicale" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="A simple CalDAV calendar server" +HOMEPAGE="http://www.radicale.org/" +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +S=${WORKDIR}/${MY_P} + +RDIR=/var/lib/radicale +LDIR=/var/log/radicale + +PATCHES=( "${FILESDIR}"/${P}-config.patch ) + +pkg_setup() { + enewgroup radicale + enewuser radicale -1 -1 ${RDIR} radicale +} + +python_install_all() { + rm README* || die + + # init file + newinitd "${FILESDIR}"/radicale.init.d radicale + + # directories + diropts -m0750 + dodir ${RDIR} + fowners radicale:radicale ${RDIR} + diropts -m0755 + dodir ${LDIR} + fowners radicale:radicale ${LDIR} + + # config file + insinto /etc/${PN} + doins config logging + + # fcgi and wsgi files + exeinto /usr/share/${PN} + doexe radicale.wsgi + doexe radicale.fcgi + + distutils-r1_python_install_all +} + +pkg_postinst() { + einfo "A sample WSGI and FastCGI script are in ${ROOT}usr/share/${PN}." + einfo "Radicale supports different authentication backends that depend on external libraries." + einfo "Please install" + optfeature "LDAP auth" dev-python/python-ldap + optfeature "PAM auth" dev-python/python-pam + optfeature "HTTP auth" dev-python/requests + optfeature "FastCGI mode" dev-python/flup + optfeature "Database storage backend" dev-python/sqlalchemy + einfo "Please note that some of these libraries are Python 2 only." +}