summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-p2p/btpd
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-p2p/btpd')
-rw-r--r--net-p2p/btpd/Manifest1
-rw-r--r--net-p2p/btpd/btpd-0.15.ebuild30
-rw-r--r--net-p2p/btpd/files/confd_btpd5
-rw-r--r--net-p2p/btpd/files/initd_btpd79
-rw-r--r--net-p2p/btpd/metadata.xml10
5 files changed, 125 insertions, 0 deletions
diff --git a/net-p2p/btpd/Manifest b/net-p2p/btpd/Manifest
new file mode 100644
index 000000000000..ae5aca141e5f
--- /dev/null
+++ b/net-p2p/btpd/Manifest
@@ -0,0 +1 @@
+DIST btpd-0.15.tar.gz 144706 SHA256 c2229244c3cb370ac95560e2e9ff7f5d094612ee2b2a1e36237ec7f27707db9d
diff --git a/net-p2p/btpd/btpd-0.15.ebuild b/net-p2p/btpd/btpd-0.15.ebuild
new file mode 100644
index 000000000000..13c60546bdf9
--- /dev/null
+++ b/net-p2p/btpd/btpd-0.15.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="BitTorrent client consisting of a daemon and client"
+HOMEPAGE="http://www.murmeldjur.se/btpd/"
+SRC_URI="http://www.murmeldjur.se/btpd/${P}.tar.gz http://people.su.se/~rnyberg/btpd/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="net-misc/curl
+ dev-libs/openssl"
+DEPEND="${RDEPEND}"
+
+# for the init.d script; this should probably be fixed not to require
+# this so that it can work on G/FBSD too.
+RDEPEND="${RDEPEND}
+ virtual/shadow"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ newinitd "${FILESDIR}/initd_btpd" btpd || die
+ newconfd "${FILESDIR}/confd_btpd" btpd || die
+
+ dodoc CHANGES COPYRIGHT README || die
+}
diff --git a/net-p2p/btpd/files/confd_btpd b/net-p2p/btpd/files/confd_btpd
new file mode 100644
index 000000000000..a7318f64d092
--- /dev/null
+++ b/net-p2p/btpd/files/confd_btpd
@@ -0,0 +1,5 @@
+# owner of btpd process (must be existing)
+#BTPDUSER="p2p"
+
+# Extra arguments for btpd
+#BTPDEXTRARGS="-p 43729"
diff --git a/net-p2p/btpd/files/initd_btpd b/net-p2p/btpd/files/initd_btpd
new file mode 100644
index 000000000000..02505e95252c
--- /dev/null
+++ b/net-p2p/btpd/files/initd_btpd
@@ -0,0 +1,79 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+BTPDUSERHOME=`getent passwd ${BTPDUSER} | cut -d : -f 6`
+BTPDHOME=${BTPDUSERHOME}/.btpd
+BTPDSTARTUPLOG=${BTPDHOME}/startup.log
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z ${BTPDUSER} ]; then
+
+ eerror "Must edit /etc/conf.d/btpd first."
+ return 1
+
+ elif [ -z "`getent passwd ${BTPDUSER}`" ]; then
+
+ eerror "Check /etc/conf.d/btpd's \${BTPDUSER}. '${BTPDUSER}' doesn't exist."
+ return 1
+ fi
+}
+
+start() {
+
+ ebegin "Starting BitTorrent Protocol Daemon"
+ checkconfig || return 1
+
+ if pgrep -u ${BTPDUSER} btpd >/dev/null; then
+ eerror "An instance of btpd is already running"
+ return 1
+ else
+ su ${BTPDUSER} -c "btpd ${BTPDEXTRARGS}"
+
+ sleep 2
+
+ if ! pgrep -u ${BTPDUSER} btpd > /dev/null; then
+ eerror "BitTorrent Protocol Daemon couldn't be started ! Check logfile: ${BTPDSTARTUPLOG}"
+ return 1
+ fi
+ fi
+
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+
+ local retries=0
+
+ ebegin "Stopping BitTorrent Protocol Daemon"
+ while [ -n "`pgrep -u ${BTPDUSER} btpd`" ] && [ ${retries} -lt 4 ]; do
+ if test ${retries} -eq 0; then
+ su ${BTPDUSER} -c "btcli kill"
+ else
+ kill -9 "`pgrep -u ${BTPDUSER} btpd`"
+ fi
+
+ sleep 1
+ retries=$(( $retries + 1 ))
+ done
+
+ if [ ${retries} -lt 4 ]; then
+ return 0
+ else
+ eerror "Unable to stop btpd"
+ return 1
+ fi
+
+ eend $?
+}
+
+restart() {
+ svc_stop
+ sleep 3
+ svc_start
+}
diff --git a/net-p2p/btpd/metadata.xml b/net-p2p/btpd/metadata.xml
new file mode 100644
index 000000000000..5050ab751732
--- /dev/null
+++ b/net-p2p/btpd/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>ricardo.cordeiro@iscte.pt</email>
+ <name> Ricardo Cordeiro</name>
+ </maintainer>
+</pkgmetadata>