# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils IUSE="gtk" DESCRIPTION="MLDonkey Mulus is a client which can access several p2p networks (eDonkey, Bittorrent, ...). It comes with its own GTK GUI, a HTTP interface and a telnet interface." HOMEPAGE="http://www.nongnu.org/mldonkey/" MY_PN="mulus" MY_FN="SVN-${PV}.tar.gz" SRC_URI="http://mldonkey.dyndns.info/Mulus/${PV}/${MY_FN}" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" RDEPEND="gtk? ( =dev-ml/lablgtk-1* ) >=dev-lang/ocaml-3.08.3 dev-lang/perl net-misc/wget" DEPEND="${RDEPEND} >=sys-devel/autoconf-2.58 gtk? ( !net-p2p/mldonkey )" # prevent overwriting of some of mld's files MLUSER="p2p" src_unpack() { unpack ${MY_FN} cd ${S} export WANT_AUTOCONF=2.5 cd config; autoconf; cd .. } 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/${MY_PN} \ --sharedstatedir=/var/${MY_PN} \ --localstatedir=/var/${MY_PN} \ --enable-batch \ --enable-checks \ --enable-pthread || die emake || die } src_install() { dobin mulus if use gtk; then dobin mlchat mlgui mlguistarter mlim mulus+gui doicon ${FILESDIR}/mulus.png make_desktop_entry mlgui "MLDonkey Mulus" mulus.png "Network" fi dobin ${FILESDIR}/home_mulus dodoc ChangeLog Copying.txt Developers.txt Install.txt cd ${S}/distrib dodoc ChangeLog Authors.txt Bugs.txt Copying.txt Developers.txt Install.txt Readme.txt Todo.txt ed2k_links.txt 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 cd ${S}/docs dodoc *.txt *.tex *.pdf 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}/mulus.confd mulus exeinto /etc/init.d; newexe ${FILESDIR}/mulus.initd mulus } pkg_preinst() { enewuser ${MLUSER} -1 /bin/bash /home/p2p users } pkg_postinst() { echo einfo "Running \`home_mulus' will start the server inside ~/.mulus/" einfo "If you want to start MLDonkey Mulus in a particular working directory," einfo "use the \`mulus' command." einfo "If you want to start MLDonkey Mulus as a system service, use" einfo "the /etc/init.d/mulus script. To control bandwidth, use" einfo "the 'slow' and 'fast' arguments. Be sure to have a look at" einfo "/etc/conf.d/mulus also." echo }