summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app-office/radicale/files/radicale.init.d3
-rw-r--r--app-office/radicale/radicale-0.6.2.ebuild17
2 files changed, 19 insertions, 1 deletions
diff --git a/app-office/radicale/files/radicale.init.d b/app-office/radicale/files/radicale.init.d
index 53beabb..ebbe58d 100644
--- a/app-office/radicale/files/radicale.init.d
+++ b/app-office/radicale/files/radicale.init.d
@@ -11,8 +11,11 @@ depend() {
}
start() {
+ touch /var/log/radicale
+ chown radicale:radicale /var/log/radicale
ebegin "Starting radicale"
start-stop-daemon --start --quiet --background \
+ --user radicale \
--pidfile ${PIDFILE} --make-pidfile \
--exec /usr/bin/radicale -- --foreground
eend $?
diff --git a/app-office/radicale/radicale-0.6.2.ebuild b/app-office/radicale/radicale-0.6.2.ebuild
index 14ee0cb..04326ea 100644
--- a/app-office/radicale/radicale-0.6.2.ebuild
+++ b/app-office/radicale/radicale-0.6.2.ebuild
@@ -6,7 +6,7 @@ EAPI=2
PYTHON_DEPEND="*:2.6"
SUPPORT_PYTHON_ABIS=1
-inherit distutils
+inherit distutils eutils
MY_PN="Radicale"
MY_P="${MY_PN}-${PV}"
@@ -28,6 +28,18 @@ RDEPEND="ssl? ( >=dev-lang/python-2.6.6[ssl] )
S=${WORKDIR}/${MY_P}
+RDIR=/var/lib/radicale
+
+pkg_setup() {
+ enewgroup radicale
+ enewuser radicale -1 -1 ${RDIR} radicale
+}
+
+src_prepare() {
+ sed -i -e "s:^folder = .*$:folder = ${RDIR}:g" \
+ config || die
+}
+
src_install() {
# delete the useless .rst, so that it is not installed
rm README.rst
@@ -37,6 +49,9 @@ src_install() {
# init file
newinitd "${FILESDIR}"/radicale.init.d radicale || die
+ keepdir ${RDIR}
+ fowners radicale:radicale ${RDIR}
+
# config file
insinto /etc/${PN}
doins config logging || die