diff options
author | Jeremy Olexa <darkside@gentoo.org> | 2008-12-26 07:01:43 +0000 |
---|---|---|
committer | Jeremy Olexa <darkside@gentoo.org> | 2008-12-26 07:01:43 +0000 |
commit | 9f1d817a1a539631d874c88ef1023133923d9cd6 (patch) | |
tree | 37ad50bb9884c85fe10df4871606c2cff1b315a1 /net-p2p/rtorrent | |
parent | amd64 stable, bug #252525 (diff) | |
download | gentoo-2-9f1d817a1a539631d874c88ef1023133923d9cd6.tar.gz gentoo-2-9f1d817a1a539631d874c88ef1023133923d9cd6.tar.bz2 gentoo-2-9f1d817a1a539631d874c88ef1023133923d9cd6.zip |
Add a new USE=daemon flag to provide init scripts. bug #250578
(Portage version: 2.2_rc18/cvs/Linux 2.6.27.10 x86_64)
Diffstat (limited to 'net-p2p/rtorrent')
-rw-r--r-- | net-p2p/rtorrent/ChangeLog | 9 | ||||
-rw-r--r-- | net-p2p/rtorrent/files/rtorrentd.conf | 1 | ||||
-rw-r--r-- | net-p2p/rtorrent/files/rtorrentd.init | 23 | ||||
-rw-r--r-- | net-p2p/rtorrent/metadata.xml | 9 | ||||
-rw-r--r-- | net-p2p/rtorrent/rtorrent-0.8.4-r1.ebuild (renamed from net-p2p/rtorrent/rtorrent-0.8.4.ebuild) | 15 |
5 files changed, 52 insertions, 5 deletions
diff --git a/net-p2p/rtorrent/ChangeLog b/net-p2p/rtorrent/ChangeLog index 166795efbd88..14e66e062238 100644 --- a/net-p2p/rtorrent/ChangeLog +++ b/net-p2p/rtorrent/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-p2p/rtorrent # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/ChangeLog,v 1.127 2008/11/19 19:01:49 loki_val Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/ChangeLog,v 1.128 2008/12/26 07:01:42 darkside Exp $ + +*rtorrent-0.8.4-r1 (26 Dec 2008) + + 26 Dec 2008; Jeremy Olexa <darkside@gentoo.org> +files/rtorrentd.conf, + +files/rtorrentd.init, metadata.xml, -rtorrent-0.8.4.ebuild, + +rtorrent-0.8.4-r1.ebuild: + Add a new USE=daemon flag to provide init scripts. bug #250578 *rtorrent-0.8.4 (19 Nov 2008) diff --git a/net-p2p/rtorrent/files/rtorrentd.conf b/net-p2p/rtorrent/files/rtorrentd.conf new file mode 100644 index 000000000000..5ff2328b2544 --- /dev/null +++ b/net-p2p/rtorrent/files/rtorrentd.conf @@ -0,0 +1 @@ +USER="$USER" diff --git a/net-p2p/rtorrent/files/rtorrentd.init b/net-p2p/rtorrent/files/rtorrentd.init new file mode 100644 index 000000000000..316cd2b4faec --- /dev/null +++ b/net-p2p/rtorrent/files/rtorrentd.init @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/files/rtorrentd.init,v 1.1 2008/12/26 07:01:43 darkside Exp $ + +depend() { + use net.* +} + +start() { + ebegin "Starting rtorrent" + start-stop-daemon --start --chuid $USER \ + --env TERM="xterm" \ + --env HOME="/home/$USER" \ + --exec /usr/bin/screen -- -dmS rtorrentd /usr/bin/rtorrent + eend $? +} + +stop() { + ebegin "Stopping rtorrent" + start-stop-daemon --stop --signal 2 --name rtorrent + eend $? +} diff --git a/net-p2p/rtorrent/metadata.xml b/net-p2p/rtorrent/metadata.xml index 43c12b95722f..2146b1f9fc63 100644 --- a/net-p2p/rtorrent/metadata.xml +++ b/net-p2p/rtorrent/metadata.xml @@ -12,8 +12,17 @@ <name>Timothy Redaelli</name> <description>Secondary Maintainer</description> </maintainer> +<maintainer> + <email>darkside@gentoo.org</email> + <description>Only CC on bugs regarding the init script.</description> +</maintainer> <longdescription lang="en"> Console BitTorrent client using ncurses based on libtorrent written in C++. </longdescription> +<use> + <flag name='daemon'>Uses <pkg>app-misc/screen</pkg> to daemonize this + application" + </flag> +</use> </pkgmetadata> diff --git a/net-p2p/rtorrent/rtorrent-0.8.4.ebuild b/net-p2p/rtorrent/rtorrent-0.8.4-r1.ebuild index 5e8f4bbffcf5..6df6420c738e 100644 --- a/net-p2p/rtorrent/rtorrent-0.8.4.ebuild +++ b/net-p2p/rtorrent/rtorrent-0.8.4-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/rtorrent-0.8.4.ebuild,v 1.1 2008/11/19 19:01:49 loki_val Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/rtorrent-0.8.4-r1.ebuild,v 1.1 2008/12/26 07:01:42 darkside Exp $ inherit base eutils toolchain-funcs flag-o-matic @@ -11,14 +11,16 @@ SRC_URI="http://libtorrent.rakshasa.no/downloads/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" -IUSE="debug ipv6 xmlrpc" +IUSE="daemon debug ipv6 xmlrpc" -RDEPEND=">=net-libs/libtorrent-0.12.${PV##*.} +COMMON_DEPEND=">=net-libs/libtorrent-0.12.${PV##*.} >=dev-libs/libsigc++-2.2.2 >=net-misc/curl-7.19.1 sys-libs/ncurses xmlrpc? ( dev-libs/xmlrpc-c )" -DEPEND="${RDEPEND} +RDEPEND="${COMMON_DEPEND} + daemon? ( app-misc/screen )" +DEPEND="${COMMON_DEPEND} dev-util/pkgconfig" PATCHES=( "${FILESDIR}/${PN}-0.8.2-gcc34.patch" ) @@ -43,6 +45,11 @@ src_compile() { src_install() { emake DESTDIR="${D}" install || die "make install failed" dodoc AUTHORS README TODO doc/rtorrent.rc + + if use daemon; then + newinitd "${FILESDIR}/rtorrentd.init" rtorrentd || die "newinitd failed" + newconfd "${FILESDIR}/rtorrentd.conf" rtorrentd || die "newconfd failed" + fi } pkg_postinst() { |