From f91962a5a46e683e2276c5b56fc768cb32e70b9a Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Tue, 3 Aug 2010 23:55:36 +0200 Subject: Added init script for radicale --- app-office/radicale/Manifest | 4 +++- .../radicale/files/radicale-0.3-foreground.patch | 14 ++++++++++++ app-office/radicale/files/radicale.init.d | 26 ++++++++++++++++++++++ app-office/radicale/radicale-0.3-r3.ebuild | 14 +++++++++++- 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 app-office/radicale/files/radicale-0.3-foreground.patch create mode 100644 app-office/radicale/files/radicale.init.d (limited to 'app-office') diff --git a/app-office/radicale/Manifest b/app-office/radicale/Manifest index bcb3ab9..ec478d8 100644 --- a/app-office/radicale/Manifest +++ b/app-office/radicale/Manifest @@ -1,2 +1,4 @@ +AUX radicale-0.3-foreground.patch 500 RMD160 edab3048523dffe36bdc24fa947e6bc045248194 SHA1 dfa851fc79973aac3bd62a648314ad6a9a569c47 SHA256 8ece5d5397a6f04619d7184def8bd4425f2ce5b7981a6a71e91a4053479b8631 +AUX radicale.init.d 550 RMD160 f1f6aa919952b744900c781b8d6cd9283bc44534 SHA1 3c2043b9f2680b14969bd7f3727e3df85c7f9c48 SHA256 1b28de6c1bc2c6119eb654622713fdd2c16d89105940c6b55d2bc081fbb2fd2c DIST Radicale-0.3.tar.gz 22195 RMD160 34e8d908548e216d1cc000cd9764a1b8371d1aee SHA1 53fe68e365a3055bd5c7477941e1e071272e19b8 SHA256 81cba97776409506baa86a8d5b1241ff25c8680e37fcb9ab62128953156e5223 -EBUILD radicale-0.3-r3.ebuild 571 RMD160 694575d3f401e7c317f5b6e407a49461acebbd8f SHA1 9da441043115237c615006371325331e9e2177d0 SHA256 40f58bd13f6b178d0c92e6e9431697532b093ce14c9593622a38e229a588b7d0 +EBUILD radicale-0.3-r3.ebuild 761 RMD160 d1c40979d5e2e24a90ced04ea9b4cd92616aeb57 SHA1 09566656b30951c885f34188c00e13efe0478d5a SHA256 44ec4f6c945315a9a23332cfdcd9b2f7ce5b2cc23b6b03acd0291dc136f55c11 diff --git a/app-office/radicale/files/radicale-0.3-foreground.patch b/app-office/radicale/files/radicale-0.3-foreground.patch new file mode 100644 index 0000000..4f1c911 --- /dev/null +++ b/app-office/radicale/files/radicale-0.3-foreground.patch @@ -0,0 +1,14 @@ +diff --git a/radicale.py b/radicale.py +index a0018df..7fc388a 100755 +--- a/radicale.py ++++ b/radicale.py +@@ -52,6 +52,9 @@ parser.add_option( + default=radicale.config.getboolean("server", "daemon"), + help="launch as daemon") + parser.add_option( ++ "-f", "--foreground", action="store_false", dest="daemon", ++ help="launch in foreground (opposite of --daemon)") ++parser.add_option( + "-H", "--host", + default=radicale.config.get("server", "host"), + help="set server hostname") diff --git a/app-office/radicale/files/radicale.init.d b/app-office/radicale/files/radicale.init.d new file mode 100644 index 0000000..53beabb --- /dev/null +++ b/app-office/radicale/files/radicale.init.d @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +PIDFILE=/var/run/radicale.pid + +depend() { + use net + need localmount +} + +start() { + ebegin "Starting radicale" + start-stop-daemon --start --quiet --background \ + --pidfile ${PIDFILE} --make-pidfile \ + --exec /usr/bin/radicale -- --foreground + eend $? +} + +stop() { + ebegin "Stopping radicale" + start-stop-daemon --stop --quiet \ + --pidfile ${PIDFILE} + eend $? +} diff --git a/app-office/radicale/radicale-0.3-r3.ebuild b/app-office/radicale/radicale-0.3-r3.ebuild index ad46e6e..3e2a99e 100644 --- a/app-office/radicale/radicale-0.3-r3.ebuild +++ b/app-office/radicale/radicale-0.3-r3.ebuild @@ -6,7 +6,7 @@ EAPI=2 PYTHON_DEPEND="*:2.5" SUPPORT_PYTHON_ABIS=1 -inherit distutils +inherit eutils distutils MY_P="${PN/r/R}-${PV}" @@ -21,6 +21,18 @@ IUSE="" S=${WORKDIR}/${MY_P} +src_prepare() { + distutils_src_prepare + + epatch ${FILESDIR}/radicale-0.3-foreground.patch +} + +src_install() { + distutils_src_install + + newinitd ${FILESDIR}/radicale.init.d radicale +} + pkg_postinst() { elog "If you want to use SSL with ${PN}, please check that you have" elog "installed >=dev-lang/python-2.6[ssl]." -- cgit v1.2.3-54-g00ecf