diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2011-06-30 16:02:44 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2011-06-30 16:02:44 +0000 |
commit | 068b6f747c54ec749662629a97e49015bb237c5e (patch) | |
tree | 79d7c82966400e95f3e8204d72a3858e39fff3cc /net-p2p/bitflu | |
parent | Remove old versions. (diff) | |
download | gentoo-2-068b6f747c54ec749662629a97e49015bb237c5e.tar.gz gentoo-2-068b6f747c54ec749662629a97e49015bb237c5e.tar.bz2 gentoo-2-068b6f747c54ec749662629a97e49015bb237c5e.zip |
Initial commit
(Portage version: 2.1.9.42/cvs/Linux x86_64)
Diffstat (limited to 'net-p2p/bitflu')
-rw-r--r-- | net-p2p/bitflu/ChangeLog | 12 | ||||
-rw-r--r-- | net-p2p/bitflu/bitflu-1.37.ebuild | 82 | ||||
-rw-r--r-- | net-p2p/bitflu/files/bitflu-add-pidfile.patch | 23 | ||||
-rw-r--r-- | net-p2p/bitflu/files/bitflu.config | 45 | ||||
-rw-r--r-- | net-p2p/bitflu/files/bitflu.initd | 47 | ||||
-rw-r--r-- | net-p2p/bitflu/metadata.xml | 14 |
6 files changed, 223 insertions, 0 deletions
diff --git a/net-p2p/bitflu/ChangeLog b/net-p2p/bitflu/ChangeLog new file mode 100644 index 000000000000..b2fa8f11a245 --- /dev/null +++ b/net-p2p/bitflu/ChangeLog @@ -0,0 +1,12 @@ + + + 30 Jun 2011; Anthony G. Basile <blueness@gentoo.org> bitflu-1.37.ebuild, + +files/bitflu-add-pidfile.patch, files/bitflu.config, files/bitflu.initd: + Added patch to produce a pid file + +*bitflu-1.37 (30 Jun 2011) + + 30 Jun 2011; Anthony G. Basile <blueness@gentoo.org> +bitflu-1.37.ebuild, + +files/bitflu.config, +files/bitflu.initd, +metadata.xml: + Initial commit + diff --git a/net-p2p/bitflu/bitflu-1.37.ebuild b/net-p2p/bitflu/bitflu-1.37.ebuild new file mode 100644 index 000000000000..670fc8ac1c13 --- /dev/null +++ b/net-p2p/bitflu/bitflu-1.37.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitflu/bitflu-1.37.ebuild,v 1.1 2011/06/30 16:02:44 blueness Exp $ + +EAPI=3 + +inherit eutils + +DESCRIPTION="Bitflu is a BitTorrent client, written in Perl and is designed to run as a daemon" +HOMEPAGE="http://bitflu.workaround.ch" +SRC_URI="http://bitflu.workaround.ch/bitflu/${P}.tgz" + +LICENSE="Artistic-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="dev-perl/Danga-Socket" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup bitflu + enewuser bitflu -1 -1 /var/lib/bitflu bitflu +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-add-pidfile.patch" +} + +src_compile() { +: +} + +PLUGINS="/usr/lib/bitflu" +HOMEDIR="/var/lib/bitflu" +CONFDIR="/etc/bitflu" +LOGDIR="/var/log/bitflu" + +src_install() { + # executable daemon + exeinto /usr/sbin + doexe bitflu.pl + + # plugins + dodir "${PLUGINS}" + insinto "${PLUGINS}" + doins -r plugins + + # working dir + dodir "${HOMEDIR}" + fowners bitflu:bitflu "${HOMEDIR}" + fperms 775 "${HOMEDIR}" + + # config file + dodir "${CONFDIR}" + fowners bitflu:bitflu "${CONFDIR}" + fperms 775 "${CONFDIR}" + insinto "${CONFDIR}" + doins "${FILESDIR}"/bitflu.config + fowners bitflu:bitflu "${CONFDIR}"/bitflu.config + fperms 664 "${CONFDIR}"/bitflu.config + + # log file + dodir "${LOGDIR}" + fowners bitflu:bitflu "${LOGDIR}" + fperms 775 "${LOGDIR}" + + # docs + dodoc bitflu.config.example ChangeLog.txt CONTRIBUTING README_IPv6.txt \ + README.txt Documentation/bitflu-internals.txt + + newinitd "${FILESDIR}"/bitflu.initd bitflu +} + +pkg_postinst() { + ewarn "Note: At startup, or at the user's request, ${PN} (re)reads its" + ewarn "configuration file and overwrites it with its own sanitized" + ewarn "version. A backup is created in the configuration directory," + ewarn "/etc/${PN}, but that file will subseqently be overwritten if" + ewarn "a further backup is made. You may want to keep your own backup." + ewarn "A prestine example with comments may be found in /usr/share/doc/${P}." +} diff --git a/net-p2p/bitflu/files/bitflu-add-pidfile.patch b/net-p2p/bitflu/files/bitflu-add-pidfile.patch new file mode 100644 index 000000000000..23783b253f73 --- /dev/null +++ b/net-p2p/bitflu/files/bitflu-add-pidfile.patch @@ -0,0 +1,23 @@ +--- bitflu.pl.orig 2011-06-30 10:47:13.000000000 -0400 ++++ bitflu.pl 2011-06-30 10:50:21.000000000 -0400 +@@ -442,6 +442,10 @@ + } + elsif($child != 0) { + $self->debug("Bitflu is running with pid $child"); ++ open(PIDFILE, ">", $self->Configuration->GetValue('pidfile')) ++ or die("Unable to create $self->Configuration->GetValue('pidfile'): $!\n"); ++ print PIDFILE $child ; ++ close(PIDFILE); + exit(0); + } + +@@ -2816,7 +2820,8 @@ + $self->{conf}->{history} = 1; + $self->{conf}->{ipv6} = 1; + $self->{conf}->{storage} = 'StorageVFS'; +- foreach my $opt qw(ipv6 renice plugindir pluginexclude workdir logfile storage chdir) { ++ $self->{conf}->{pidfile} = '/var/run/bitflu/bitflu.pid'; ++ foreach my $opt qw(pidfile ipv6 renice plugindir pluginexclude workdir logfile storage chdir) { + $self->RuntimeLockValue($opt); + } + } diff --git a/net-p2p/bitflu/files/bitflu.config b/net-p2p/bitflu/files/bitflu.config new file mode 100644 index 000000000000..760a9eb350c7 --- /dev/null +++ b/net-p2p/bitflu/files/bitflu.config @@ -0,0 +1,45 @@ +# Written by Bitflu::Configuration@2835 on Thu Jun 30 07:53:38 2011 +autocancel = 1.5 +autocommit = 1 +autoload_dir = /var/lib/bitflu/autoload +autoload_scan = 300 +chdir = +checkversion = 1309395241 +completed_downloads = /var/lib/bitflu/seeding +downspeed = 0 +history = 1 +http_autoloadtorrent = 1 +http_maxthreads = 10 +incomplete_downloads = /var/lib/bitflu/unfinished +ipv6 = 1 +kademlia_idseed = 0 +logfile = /var/log/bitflu/bitflu.log +loglevel = 5 +min_free_mb = 0 +pidfile = /var/run/bitflu/bitflu.pid +plugindir = /usr/lib/bitflu/plugins +pluginexclude = +renice = 8 +storage = StorageVFS +telnet_bind = 127.0.0.1 +telnet_maxhist = 20 +telnet_port = 4001 +telnet_view = type,name=25,hash,peers,pieces,bytes,percent,ratio,up,down,eta,note +torrent_bind = 0 +torrent_gcpriority = 5 +torrent_importdir = /var/lib/bitflu/import +torrent_maxpeers = 80 +torrent_maxreq = 6 +torrent_port = 6688 +torrent_totalpeers = 400 +torrent_tracker_autoudp = 1 +torrent_tracker_udpport = 6689 +torrent_trackerblacklist = +torrent_upslots = 10 +unshared_downloads = /var/lib/bitflu/removed +upspeed = 35 +vfs_use_fallocate = 0 +webgui_bind = 127.0.0.1 +webgui_port = 4081 +workdir = /var/lib/bitflu +# EOF # diff --git a/net-p2p/bitflu/files/bitflu.initd b/net-p2p/bitflu/files/bitflu.initd new file mode 100644 index 000000000000..3d69095de14c --- /dev/null +++ b/net-p2p/bitflu/files/bitflu.initd @@ -0,0 +1,47 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitflu/files/bitflu.initd,v 1.1 2011/06/30 16:02:44 blueness Exp $ + +DAEMON=/usr/sbin/bitflu.pl +PIDDIR=/var/run/bitflu +PIDFILE=${PIDDIR}/bitflu.pid +CONFFILE=/etc/bitflu/bitflu.config + +depend() { + need net +} + +checkconfig() { + if [ ! -f ${CONFFILE} ]; then + eerror "No config file ${CONFFILE}" + return 1 + fi + + if [ ! -d ${PIDDIR} ] && ! mkdir -p ${PIDDIR}; then + eerror "Failed to create ${PIDDIR}" + return 1 + fi + + chown bitflu:bitflu ${PIDDIR} +} + +start() { + checkconfig || return 1 + ebegin "Starting bitflu" + start-stop-daemon --start --pidfile "${PIDFILE}" --user bitflu:bitflu \ + --exec "${DAEMON}" -- --config="${CONFFILE}" --daemon -q >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stoping bitflu" + start-stop-daemon --stop --pidfile "${PIDFILE}" --exec "${DAEMON}" + eend $? +} + +restart() { + svc_stop + sleep 2 + svc_start +} diff --git a/net-p2p/bitflu/metadata.xml b/net-p2p/bitflu/metadata.xml new file mode 100644 index 000000000000..a9dc13a81b42 --- /dev/null +++ b/net-p2p/bitflu/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> + </maintainer> + <longdescription lang="en"> + Bitflu is a free BitTorrent client. The client was written in Perl and + is designed to run as a daemon (7x24h , like mlnet) on Linux, *BSD and + maybe even OSX. + </longdescription> +</pkgmetadata> |