diff options
author | Caleb Tennis <caleb@gentoo.org> | 2003-08-07 02:25:57 +0000 |
---|---|---|
committer | Caleb Tennis <caleb@gentoo.org> | 2003-08-07 02:25:57 +0000 |
commit | d7cf69431c3739c80a3487e52aa2338a2c2ac56f (patch) | |
tree | c4b96bfa6734cafd3c62324f889b76773eb5e5ec /net-p2p/mldonkey | |
parent | fix license/repoman (diff) | |
download | historical-d7cf69431c3739c80a3487e52aa2338a2c2ac56f.tar.gz historical-d7cf69431c3739c80a3487e52aa2338a2c2ac56f.tar.bz2 historical-d7cf69431c3739c80a3487e52aa2338a2c2ac56f.zip |
Added functionality, thanks to Julian Hoch (closes bug #25695)
Diffstat (limited to 'net-p2p/mldonkey')
-rw-r--r-- | net-p2p/mldonkey/ChangeLog | 8 | ||||
-rw-r--r-- | net-p2p/mldonkey/Manifest | 25 | ||||
-rw-r--r-- | net-p2p/mldonkey/files/digest-mldonkey-2.5.3-r1 | 1 | ||||
-rw-r--r-- | net-p2p/mldonkey/files/mldonkey.confd | 19 | ||||
-rw-r--r-- | net-p2p/mldonkey/files/mldonkey.initd | 60 | ||||
-rw-r--r-- | net-p2p/mldonkey/metadata.xml | 11 | ||||
-rw-r--r-- | net-p2p/mldonkey/mldonkey-2.5.3-r1.ebuild | 97 |
7 files changed, 210 insertions, 11 deletions
diff --git a/net-p2p/mldonkey/ChangeLog b/net-p2p/mldonkey/ChangeLog index caf92f1d01a4..082d1b072135 100644 --- a/net-p2p/mldonkey/ChangeLog +++ b/net-p2p/mldonkey/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-p2p/mldonkey # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/mldonkey/ChangeLog,v 1.15 2003/06/17 13:12:43 caleb Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/mldonkey/ChangeLog,v 1.16 2003/08/07 02:25:49 caleb Exp $ + +*mldonkey-2.5.3-r1 (06 Aug 2003) + + 06 Aug 2003; Caleb Tennis <caleb@gentoo.org> mldonkey-2.5.3-r1.ebuild: + Added extra functionality, like a new p2p user and some added features. + Thanks to Julian Hoch, this closes bug #25695. *mldonkey-2.5.3 (17 Jun 2003) diff --git a/net-p2p/mldonkey/Manifest b/net-p2p/mldonkey/Manifest index dbf901452cd6..9d8dfde7e0c9 100644 --- a/net-p2p/mldonkey/Manifest +++ b/net-p2p/mldonkey/Manifest @@ -1,13 +1,18 @@ -MD5 3127e746056c13574b2509e71bc074b5 files/97mldonkey 42 -MD5 d7470a0d99aae3be1ce3859c14e51b2b files/digest-mldonkey-2.5 75 -MD5 d7470a0d99aae3be1ce3859c14e51b2b files/digest-mldonkey-2.5-r1 75 -MD5 d9f838448fda4db6ac2d244804c8d664 files/mldonkey 307 -MD5 a3754baf66ab9ac99f566b5f762b0c91 files/digest-mldonkey-2.02-r1 142 -MD5 cc820f9d66d277f2cd46ef750e918807 files/digest-mldonkey-2.5.3 75 -MD5 42fb9dc4604cbd74f00ef7e9528533fe files/digest-mldonkey-2.04_rc1 77 MD5 c4d372a7573c6d362e92953779c20d1a mldonkey-2.5-r1.ebuild 1864 -MD5 4f571ee38b4e50520c699d7a55124cc6 mldonkey-2.5.ebuild 1898 MD5 cb323c6d5864e01b2e42613214648605 mldonkey-2.02-r1.ebuild 2213 -MD5 15614910d4f041d68a5d3935014f749d mldonkey-2.5.3.ebuild 1797 -MD5 5cb2a169e2235d258f544a815abc814c ChangeLog 2682 MD5 30816597e1a86056add83a1894e2c683 mldonkey-2.04_rc1.ebuild 1870 +MD5 b16fee76435ec837ec818433ab013f35 mldonkey-2.5.3-r1.ebuild 2513 +MD5 15614910d4f041d68a5d3935014f749d mldonkey-2.5.3.ebuild 1797 +MD5 b1aa92d343453adf54ee3a1e36f272a9 ChangeLog 2913 +MD5 2aece486034a2d8ff26aa5ec7489bfc2 metadata.xml 398 +MD5 4f571ee38b4e50520c699d7a55124cc6 mldonkey-2.5.ebuild 1898 +MD5 42fb9dc4604cbd74f00ef7e9528533fe files/digest-mldonkey-2.04_rc1 77 +MD5 cc820f9d66d277f2cd46ef750e918807 files/digest-mldonkey-2.5.3-r1 75 +MD5 68c0671e2abe2afcf6578c3583e97718 files/mldonkey.confd 403 +MD5 f265f843d899f50473e892cefe335f44 files/mldonkey.initd 1408 +MD5 d7470a0d99aae3be1ce3859c14e51b2b files/digest-mldonkey-2.5-r1 75 +MD5 cc820f9d66d277f2cd46ef750e918807 files/digest-mldonkey-2.5.3 75 +MD5 d7470a0d99aae3be1ce3859c14e51b2b files/digest-mldonkey-2.5 75 +MD5 3127e746056c13574b2509e71bc074b5 files/97mldonkey 42 +MD5 d9f838448fda4db6ac2d244804c8d664 files/mldonkey 307 +MD5 a3754baf66ab9ac99f566b5f762b0c91 files/digest-mldonkey-2.02-r1 142 diff --git a/net-p2p/mldonkey/files/digest-mldonkey-2.5.3-r1 b/net-p2p/mldonkey/files/digest-mldonkey-2.5.3-r1 new file mode 100644 index 000000000000..a3f450f18754 --- /dev/null +++ b/net-p2p/mldonkey/files/digest-mldonkey-2.5.3-r1 @@ -0,0 +1 @@ +MD5 d11504a6dd1e8b5f955951d1f73236ed mldonkey-2.5-3.sources.tar.gz 2373194 diff --git a/net-p2p/mldonkey/files/mldonkey.confd b/net-p2p/mldonkey/files/mldonkey.confd new file mode 100644 index 000000000000..60c35b082fa8 --- /dev/null +++ b/net-p2p/mldonkey/files/mldonkey.confd @@ -0,0 +1,19 @@ +# config file for mldonkey control script + +# owner of mlnet process (don't change, must be existing) +MLUSER="p2p" + +# home dir of owner (don't change, must be existing) +MLHOME="/home/p2p" + +# subdir if any (will be created, if not existing) +MLDIR=".mldonkey" + +# bandwidth control, values in kb/s +MLLOWDOWN="6" +MLLOWUP="2" +MLHIGHDOWN="30" +MLHIGHUP="10" + +# port for webinterface, usually 4080 +MLPORT="4080" diff --git a/net-p2p/mldonkey/files/mldonkey.initd b/net-p2p/mldonkey/files/mldonkey.initd new file mode 100644 index 000000000000..b7e45b71f118 --- /dev/null +++ b/net-p2p/mldonkey/files/mldonkey.initd @@ -0,0 +1,60 @@ +#!/sbin/runscript + +opts="start stop restart slow fast" + +depend() { + need net +} + +start() { + ebegin "Starting mldonkey" + if [ ! -d ${MLHOME}/${MLDIR} ] + then + einfo "Directory ${MLHOME}/${MLDIR} not existing, trying to create..." + su ${MLUSER} -c "mkdir ${MLHOME}/${MLDIR}" + if [ ! -d ${MLHOME}/${MLDIR} ] + then + eerror "Directory ${MLHOME}/${MLDIR} could not be created!" + return 1 + fi + einfo "...ok!" + fi + cd ${MLHOME}/${MLDIR}/ + start-stop-daemon --quiet --start \ + --exec /usr/bin/mlnet -x /usr/bin/mlnet -c ${MLUSER} &>/dev/null & + eend $? +} + +stop() { + ebegin "Stopping mldonkey - please wait" + wget http://$DONKSRV:4080/submit?q=close_fds -q -O - > /dev/null + wget http://$DONKSRV:4080/submit?q=save -q -O -> /dev/null + sleep 10 + start-stop-daemon --stop -x /usr/bin/mlnet + eend $? +} + +restart() { + svc_stop + svc_start +} + +slow() { + ebegin "Reducing bandwidth to ${MLLOWDOWN}k/${MLLOWUP}k" + + wget http://localhost:${MLPORT}/submit?q=set+max_hard_download_rate+${MLLOWDOWN} -q -O - > /dev/null + + wget http://localhost:${MLPORT}/submit?q=set+max_hard_upload_rate+${MLLOWUP} -q -O - > /dev/null + + eend $? +} + +fast() { + ebegin "Increasing bandwidth to ${MLHIGHDOWN}k/${MLHIGHUP}k" + + wget http://localhost:${MLPORT}/submit?q=set+max_hard_download_rate+${MLHIGHDOWN} -q -O - > /dev/null + + wget http://localhost:${MLPORT}/submit?q=set+max_hard_upload_rate+${MLHIGHUP} -q -O - > /dev/null + + eend $? +} diff --git a/net-p2p/mldonkey/metadata.xml b/net-p2p/mldonkey/metadata.xml new file mode 100644 index 000000000000..f6569e34a26d --- /dev/null +++ b/net-p2p/mldonkey/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>ml</herd> +<maintainer> + <email>JulianHoch@web.de</email> + <name>Julian Hoch</name> + <description>caleb@gentoo.org passed the buck to Julian</description> +</maintainer> +<longdescription>An ocaml client to access the eDonkey network.</longdescription> +</pkgmetadata> diff --git a/net-p2p/mldonkey/mldonkey-2.5.3-r1.ebuild b/net-p2p/mldonkey/mldonkey-2.5.3-r1.ebuild new file mode 100644 index 000000000000..261164e004e7 --- /dev/null +++ b/net-p2p/mldonkey/mldonkey-2.5.3-r1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 + +IUSE="gtk" + +MY_PV=${PV%.*}-${PV#*.*.} +MY_P=${PN}-${MY_PV} +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="mldonkey is a new client to access the eDonkey network. It is written in Objective-Caml, and comes with its own GTK GUI, an HTTP interface and a telnet interface." +HOMEPAGE="http://www.nongnu.org/mldonkey/" +SRC_URI="http://savannah.nongnu.org/download/${PN}/release-${MY_PV}/official/${MY_P}.sources.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" + + +DEPEND="gtk? ( >=lablgtk-1.2.4 ) + >=dev-lang/ocaml-3.06 + dev-lang/perl" +RDEPEND="net-misc/wget" + +MLUSER="p2p" + +pkg_setup() { + # add user + if [ ! `getent passwd ${MLUSER} | cut -d: -f1` ] + then + useradd -s /bin/bash ${MLUSER} &>/dev/null + einfo Creating user ${MLUSER}... + fi + if [ ! -d `getent passwd ${MLUSER} | cut -d: -f6` ] + then + einfo Creating directory... + mkdir `getent passwd ${MLUSER} | cut -d: -f6` + chown ${MLUSER} `getent passwd ${MLUSER} | cut -d: -f6` + else + einfo User already configured. + fi + return 0 +} + +src_compile() { + use gtk || export GTK_CONFIG="no" + + # the dirs are not (yet) used, but it doesn't hurt to specify them anyway + econf \ + --sysconfdir=/etc/mldonkey \ + --sharedstatedir=/var/mldonkey \ + --localstatedir=/var/mldonkey \ + --enable-ocamlver=3.06 + + emake || die +} + +src_install() { + dobin mlnet + use gtk && dobin mlchat mlgui mlguistarter mlim mlnet+gui + dobin ${FILESDIR}/mldonkey + + cd ${S}/distrib + dodoc AUTHORS BUGS COPYING ChangeLog ed2k_links.txt INSTALL TODO + dohtml FAQ.html + + insinto /usr/share/doc/${PF}/scripts + doins kill_mldonkey mldonkey_command mldonkey_previewer + + insinto /usr/share/doc/${PF}/distrib + doins directconnect.ini servers.ini + + cd ${S}/docs + dodoc *.txt *.tex + dohtml *.html + + cd ${S}/docs/developers + dodoc *.txt *.tex + + cd ${S}/docs/images + insinto /usr/share/doc/${PF}/html/images + doins * + + insinto /etc/conf.d; newins ${FILESDIR}/mldonkey.confd mldonkey + exeinto /etc/init.d; newexe ${FILESDIR}/mldonkey.initd mldonkey +} + +pkg_postinst() { + echo + einfo "Running \`mldonkey' will start the server inside ~/.mldonkey/" + einfo "If you want to start mldonkey in a particular working directory," + einfo "use the \`mlnet' command." + einfo "If you want to start mldonkey as a system service, use" + einfo "the /etc/init.d/mldonkey script. To control bandwidth, use" + einfo "the 'slow' and 'fast' arguments. Be sure to have a look at" + einfo "/etc/conf.d/mldonkey either." + echo +} |