mirror of
https://github.com/gentoo-mirror/gentoo-zh.git
synced 2025-04-18 23:38:57 -04:00
net-p2p/mldonkey: remove.
This commit is contained in:
parent
d5719af32e
commit
1c72242b15
File diff suppressed because it is too large
Load Diff
@ -1,2 +0,0 @@
|
||||
DIST mldonkey-3.1.2.tar.bz2 2844260 SHA256 72728ef8c482dda8be48b6ac977d20e72eb5f84b08236a67202edcd7569c5fc6
|
||||
DIST mldonkey-3.1.3.tar.bz2 2848964 SHA256 7c259f9f41cc12899045710ddce02e6d25962b2cb5c22f9cf58af0483f06d9e2
|
@ -1,44 +0,0 @@
|
||||
diff -ur mldonkey-2.9.5.orig/src/utils/lib/md4_i386.s mldonkey-2.9.5/src/utils/lib/md4_i386.s
|
||||
--- mldonkey-2.9.5.orig/src/utils/lib/md4_i386.s 2008-06-30 17:45:37.000000000 +0200
|
||||
+++ mldonkey-2.9.5/src/utils/lib/md4_i386.s 2008-06-30 17:48:10.000000000 +0200
|
||||
@@ -934,3 +934,7 @@
|
||||
|
||||
.data
|
||||
|
||||
+#if defined(__linux__) && defined(__ELF__)
|
||||
+.section .note.GNU-stack,"",%progbits
|
||||
+#endif
|
||||
+
|
||||
diff -ur mldonkey-2.9.5.orig/src/utils/lib/md4_i486.s mldonkey-2.9.5/src/utils/lib/md4_i486.s
|
||||
--- mldonkey-2.9.5.orig/src/utils/lib/md4_i486.s 2008-06-30 17:45:37.000000000 +0200
|
||||
+++ mldonkey-2.9.5/src/utils/lib/md4_i486.s 2008-06-30 17:48:21.000000000 +0200
|
||||
@@ -1091,3 +1091,7 @@
|
||||
|
||||
.data
|
||||
|
||||
+#if defined(__linux__) && defined(__ELF__)
|
||||
+.section .note.GNU-stack,"",%progbits
|
||||
+#endif
|
||||
+
|
||||
diff -ur mldonkey-2.9.5.orig/src/utils/lib/md4_i586.s mldonkey-2.9.5/src/utils/lib/md4_i586.s
|
||||
--- mldonkey-2.9.5.orig/src/utils/lib/md4_i586.s 2008-06-30 17:45:37.000000000 +0200
|
||||
+++ mldonkey-2.9.5/src/utils/lib/md4_i586.s 2008-06-30 17:48:27.000000000 +0200
|
||||
@@ -1047,3 +1047,7 @@
|
||||
|
||||
.data
|
||||
|
||||
+#if defined(__linux__) && defined(__ELF__)
|
||||
+.section .note.GNU-stack,"",%progbits
|
||||
+#endif
|
||||
+
|
||||
diff -ur mldonkey-2.9.5.orig/src/utils/lib/md4_i686.s mldonkey-2.9.5/src/utils/lib/md4_i686.s
|
||||
--- mldonkey-2.9.5.orig/src/utils/lib/md4_i686.s 2008-06-30 17:45:37.000000000 +0200
|
||||
+++ mldonkey-2.9.5/src/utils/lib/md4_i686.s 2008-06-30 17:48:34.000000000 +0200
|
||||
@@ -1009,3 +1009,7 @@
|
||||
|
||||
.data
|
||||
|
||||
+#if defined(__linux__) && defined(__ELF__)
|
||||
+.section .note.GNU-stack,"",%progbits
|
||||
+#endif
|
||||
+
|
@ -1,13 +0,0 @@
|
||||
diff --git a/src/utils/lib/CryptoPP.cc b/src/utils/lib/CryptoPP.cc
|
||||
index be0b04a..1b3b2bd 100644
|
||||
--- a/src/utils/lib/CryptoPP.cc
|
||||
+++ b/src/utils/lib/CryptoPP.cc
|
||||
@@ -1700,7 +1700,7 @@ static const char s_RunAtStartup = (AssignIntToInteger = FunctionAssignIntToInte
|
||||
template <class T>
|
||||
CPP_TYPENAME AllocatorBase<T>::pointer AlignedAllocator<T>::allocate(size_type n, const void *)
|
||||
{
|
||||
- CheckSize(n);
|
||||
+ this->CheckSize(n);
|
||||
if (n == 0)
|
||||
return NULL;
|
||||
if (n >= 4)
|
@ -1,13 +0,0 @@
|
||||
diff --git a/config/Makefile.in b/config/Makefile.in
|
||||
index e10cadf..9659e06 100644
|
||||
--- a/config/Makefile.in
|
||||
+++ b/config/Makefile.in
|
||||
@@ -554,7 +554,7 @@ CORE_SRCS += $(OPENFT_SRCS)
|
||||
endif
|
||||
|
||||
ifeq ("$(GD)", "yes")
|
||||
- GD_LIBS_flags=-cclib "-lgd $(GD_LIBS)" -ccopt "$(GD_LDFLAGS)"
|
||||
+ GD_LIBS_flags=-cclib "-lgd -lpng $(GD_LIBS)" -ccopt "$(GD_LDFLAGS)"
|
||||
ifneq ("$(GD_STATIC_LIBS)", "")
|
||||
GD_STATIC_LIBS_opt=-cclib "-lgd $(GD_STATIC_LIBS)" -ccopt "$(GD_LDFLAGS)"
|
||||
endif
|
@ -1,39 +0,0 @@
|
||||
# /etc/conf.d/mldonkey
|
||||
# Config file for mldonkey control script
|
||||
|
||||
# Change the following vars only if you know
|
||||
# what you're doing, there's no checking for
|
||||
# invalid data yet!
|
||||
|
||||
# owner of mlnet process (don't change, must be existing)
|
||||
USER="p2p"
|
||||
|
||||
# mldonkey's working dir (must be existing)
|
||||
MLDONKEY_DIR="/home/p2p/mldonkey"
|
||||
|
||||
# logfile (/dev/null for nowhere)
|
||||
LOG="/var/log/mldonkey.log"
|
||||
|
||||
# set to true, if you have enabled logging to syslog in MLDonkey with
|
||||
# set log_to_syslog true
|
||||
USE_LOGGER=false
|
||||
|
||||
# bandwidth control, values in kb/s
|
||||
LOW_DOWN="6"
|
||||
LOW_UP="2"
|
||||
HIGH_DOWN="30"
|
||||
HIGH_UP="10"
|
||||
|
||||
# nice level, 0<x<19, more nice -> less cpuspeed consumed
|
||||
NICE="19"
|
||||
|
||||
# mldonkey server ip, usually localhost
|
||||
SERVER="localhost"
|
||||
|
||||
# port for webinterface, usually 4080
|
||||
PORT="4080"
|
||||
|
||||
# to enable password restricted access,
|
||||
# uncomment and set BOTH following vars:
|
||||
#USERNAME="admin"
|
||||
#PASSWORD=""
|
@ -1,121 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
extra_started_commands="reload slow fast info"
|
||||
|
||||
MLDONKEY_BINARY=${MLDONKEY_BINARY:-/usr/bin/mlnet}
|
||||
MLDONKEY_TIMEOUT=${TIMEOUT:-10}
|
||||
|
||||
depend() {
|
||||
need localmount net
|
||||
${USE_LOGGER} && use logger
|
||||
}
|
||||
|
||||
start() {
|
||||
if [ -z "${MLDONKEY_DIR}" ]; then
|
||||
ewarn "mldonkey's start script has been changed. You should remove"
|
||||
ewarn "BASEDIR and SUBDIR from /etc/conf.d/mldonkey and set MLDONKEY_DIR"
|
||||
ewarn "to the correct value (you probably want"
|
||||
ewarn "MLDONKEY_DIR=${BASEDIR}/${SUBDIR})"
|
||||
MLDONKEY_DIR="${BASEDIR}/${SUBDIR}"
|
||||
einfo "Using ${MLDONKEY_DIR} as working directory"
|
||||
fi
|
||||
|
||||
if [ ! -d "${MLDONKEY_DIR}" ]; then
|
||||
ebegin "Directory ${MLDONKEY_DIR} not existing, trying to create..."
|
||||
mkdir -p "${MLDONKEY_DIR}" && chown ${USER}:users "${MLDONKEY_DIR}"
|
||||
eend $? || return 1
|
||||
fi
|
||||
|
||||
ebegin "Starting ${SVCNAME}"
|
||||
cd "${MLDONKEY_DIR}"
|
||||
export MLDONKEY_DIR
|
||||
start-stop-daemon --start --user "${USER}" --nice "${NICE}" \
|
||||
--exec "${MLDONKEY_BINARY}" --pidfile /var/run/"${SVCNAME}".pid \
|
||||
--background --make-pidfile
|
||||
eend $?
|
||||
}
|
||||
|
||||
setup_uri() {
|
||||
BASE="http://"
|
||||
if [ -n "${USERNAME}" -a -n "${PASSWORD}" ]; then
|
||||
BASE="${BASE}${USERNAME}:${PASSWORD}@"
|
||||
fi
|
||||
BASE="${BASE}${SERVER}:${PORT}"
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ${SVCNAME} -- please wait"
|
||||
|
||||
setup_uri
|
||||
wget --spider --timeout="${MLDONKEY_TIMEOUT}" "${BASE}"/submit?q=close_fds -q
|
||||
wget --spider --timeout="${MLDONKEY_TIMEOUT}" "${BASE}"/submit?q=save -q
|
||||
wget --spider --timeout="${MLDONKEY_TIMEOUT}" "${BASE}"/submit?q=kill -q
|
||||
|
||||
# give it a chance to die:
|
||||
local timeout=${MLDONKEY_TIMEOUT}
|
||||
while [ $timeout -gt 0 ]; do
|
||||
if ! start-stop-daemon --test --quiet --stop \
|
||||
--exec "${MLDONKEY_BINARY}" \
|
||||
--pidfile /var/run/"${SVCNAME}".pid ; then
|
||||
eend 0
|
||||
return 0
|
||||
fi
|
||||
sleep 1
|
||||
timeout=$((${timeout} - 1))
|
||||
done
|
||||
|
||||
eend 1 "Failed to cleanly stop ${SVCNAME}"
|
||||
ebegin "Forcing ${SVCNAME} to stop"
|
||||
start-stop-daemon --stop --exec "${MLDONKEY_BINARY}" \
|
||||
--pidfile /var/run/"${SVCNAME}".pid
|
||||
eend $?
|
||||
}
|
||||
|
||||
# This doesn't work for baselayout-2
|
||||
restart() {
|
||||
svc_stop
|
||||
sleep 5
|
||||
svc_start
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading ${SVCNAME}"
|
||||
start-stop-daemon --stop --signal HUP --oknodo \
|
||||
--exec "${MLDONKEY_BINARY}" --pidfile /var/run/"${SVCNAME}".pid
|
||||
eend $?
|
||||
}
|
||||
|
||||
slow() {
|
||||
ebegin "Reducing bandwidth to ${LOW_DOWN}k/${LOW_UP}k"
|
||||
setup_uri
|
||||
wget --spider --timeout="${MLDONKEY_TIMEOUT}" \
|
||||
"${BASE}/submit?q=set+max_hard_download_rate+${LOW_DOWN}" -q
|
||||
wget --spider --timeout=${MLDONKEY_TIMEOUT} \
|
||||
"${BASE}/submit?q=set+max_hard_upload_rate+${LOW_UP}" -q
|
||||
eend $?
|
||||
}
|
||||
|
||||
fast() {
|
||||
ebegin "Increasing bandwidth to ${HIGH_DOWN}k/${HIGH_UP}k"
|
||||
|
||||
setup_uri
|
||||
wget --spider --timeout="${MLDONKEY_TIMEOUT}" \
|
||||
"${BASE}/submit?q=set+max_hard_upload_rate+${HIGH_UP}" -q
|
||||
wget --spider --timeout="${MLDONKEY_TIMEOUT}" \
|
||||
"${BASE}/submit?q=set+max_hard_download_rate+${HIGH_DOWN}" -q
|
||||
eend $?
|
||||
}
|
||||
|
||||
|
||||
info() {
|
||||
setup_uri
|
||||
local result=$(wget --timeout="${MLDONKEY_TIMEOUT}" \
|
||||
-O - "${BASE}"/submit?q=vo 2>/dev/null | \
|
||||
grep -C1 max_hard_upload | \
|
||||
grep value=\" | cut -d\" -f2)
|
||||
if [ "${result}" = "${LOW_UP}" ]; then
|
||||
einfo "${SVCNAME} runs slow"
|
||||
else
|
||||
einfo "${SVCNAME} runs fast"
|
||||
fi
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>net-p2p</herd>
|
||||
<longdescription>An ocaml client to access the eDonkey network.</longdescription>
|
||||
<use>
|
||||
<flag name="bittorrent">enable bittorrent support</flag>
|
||||
<flag name="fasttrack">enable fasttrack support</flag>
|
||||
<flag name="gnutella">enable gnutella and gnutella2 support</flag>
|
||||
<flag name="guionly">enable client build only</flag>
|
||||
<flag name="magic">enable use of libmagic</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
@ -1,167 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="2"
|
||||
WANT_AUTOCONF=2.5
|
||||
|
||||
inherit user flag-o-matic eutils autotools toolchain-funcs
|
||||
|
||||
IUSE="bittorrent doc fasttrack gd gnutella gtk guionly magic +ocamlopt"
|
||||
|
||||
DESCRIPTION="MLDonkey is a multi-network P2P application written in Ocaml,
|
||||
coming with multi interface."
|
||||
HOMEPAGE="http://mldonkey.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 hppa ~ia64 ppc ~sparc x86 ~x86-fbsd"
|
||||
|
||||
RDEPEND="dev-lang/perl
|
||||
guionly? ( >=gnome-base/librsvg-2.4.0
|
||||
>=dev-ml/lablgtk-2.6 )
|
||||
gtk? ( >=gnome-base/librsvg-2.4.0
|
||||
>=dev-ml/lablgtk-2.6[svg] )
|
||||
gd? ( >=media-libs/gd-2.0.28[truetype] )
|
||||
magic? ( sys-apps/file )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-lang/ocaml-3.10.2[ocamlopt?]"
|
||||
|
||||
MLUSER="p2p"
|
||||
|
||||
pkg_setup() {
|
||||
if use gtk; then
|
||||
echo ""
|
||||
einfo "If the compile with gui fails, and you have updated Ocaml"
|
||||
einfo "recently, you may have forgotten that you need to run"
|
||||
einfo "/usr/portage/dev-lang/ocaml/files/ocaml-rebuild.sh"
|
||||
einfo "to learn which ebuilds you need to recompile"
|
||||
einfo "each time you update Ocaml to a different version"
|
||||
einfo "see the Ocaml ebuild for details"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# dev-lang/ocaml creates its own objects but calls gcc for linking, which will
|
||||
# results in relocations if gcc wants to create a PIE executable
|
||||
if gcc-specs-pie ; then
|
||||
append-ldflags -nopie
|
||||
ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
|
||||
ewarn "We have appended -nopie to ocaml build options"
|
||||
ewarn "because linking an executable with pie while the objects are not pic will not work"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${PN}-3.1.3-gcc.patch"
|
||||
epatch_user
|
||||
cd "${S}"/config
|
||||
eautoconf
|
||||
cd "${S}"
|
||||
use ocamlopt || sed -i -e "s/ocamlopt/idontwantocamlopt/g" "${S}/config/configure" || die "failed to disable ocamlopt"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# the dirs are not (yet) used, but it doesn't hurt to specify them anyway
|
||||
|
||||
# onlygui Disable all nets support, build only chosen GUI
|
||||
|
||||
if use gtk || use guionly; then
|
||||
myconf="--enable-gui=newgui2"
|
||||
else
|
||||
myconf="--disable-gui"
|
||||
fi
|
||||
|
||||
if use guionly; then
|
||||
myconf="${myconf} --disable-multinet --disable-donkey"
|
||||
fi
|
||||
|
||||
cd "${S}"
|
||||
econf \
|
||||
--sysconfdir=/etc/mldonkey \
|
||||
--sharedstatedir=/var/mldonkey \
|
||||
--localstatedir=/var/mldonkey \
|
||||
--enable-checks \
|
||||
--disable-batch \
|
||||
$(use_enable bittorrent) \
|
||||
$(use_enable fasttrack) \
|
||||
$(use_enable gnutella) \
|
||||
$(use_enable gnutella gnutella2) \
|
||||
$(use_enable gd) \
|
||||
$(use_enable magic) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export OCAMLRUNPARAM="l=256M"
|
||||
emake || die "emake failed"
|
||||
|
||||
if ! use guionly; then
|
||||
emake utils || die "emake utils failed"
|
||||
fi;
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local myext=""
|
||||
use ocamlopt || myext=".byte"
|
||||
use ocamlopt || export STRIP_MASK="*/bin/*"
|
||||
if ! use guionly; then
|
||||
for i in mlnet mld_hash get_range copysources subconv; do
|
||||
newbin $i$myext $i || die "failed to install $i"
|
||||
done
|
||||
use bittorrent && newbin make_torrent$myext make_torrent
|
||||
|
||||
newconfd "${FILESDIR}/mldonkey.confd-2.8" mldonkey
|
||||
fperms 600 /etc/conf.d/mldonkey
|
||||
newinitd "${FILESDIR}/mldonkey.initd" mldonkey
|
||||
fi
|
||||
|
||||
if use gtk; then
|
||||
for i in mlgui mlguistarter; do
|
||||
newbin $i$myext $i || die "failed to install $i"
|
||||
done
|
||||
make_desktop_entry mlgui "MLDonkey GUI" mldonkey "Network;P2P"
|
||||
newicon "${S}"/packages/rpm/mldonkey-icon-48.png ${PN}.png
|
||||
fi
|
||||
|
||||
if use doc ; then
|
||||
cd "${S}"/distrib
|
||||
dodoc ChangeLog *.txt
|
||||
|
||||
insinto /usr/share/doc/${PF}/scripts
|
||||
doins kill_mldonkey mldonkey_command mldonkey_previewer make_buginfo
|
||||
|
||||
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 *
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if ! use guionly; then
|
||||
enewuser ${MLUSER} -1 -1 /home/p2p users
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! use guionly; then
|
||||
echo
|
||||
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 also."
|
||||
echo
|
||||
else
|
||||
echo
|
||||
einfo "Simply run mlgui to start the chosen MLDonkey gui."
|
||||
einfo "It puts its config files into ~/.mldonkey"
|
||||
fi
|
||||
}
|
@ -1,168 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="4"
|
||||
WANT_AUTOCONF=2.5
|
||||
|
||||
inherit user flag-o-matic eutils autotools toolchain-funcs
|
||||
|
||||
IUSE="bittorrent doc fasttrack gd gnutella gtk guionly magic +ocamlopt"
|
||||
|
||||
DESCRIPTION="MLDonkey is a multi-network P2P application written in Ocaml,
|
||||
coming with multi interface."
|
||||
HOMEPAGE="http://mldonkey.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 hppa ~ia64 ppc ~sparc x86 ~x86-fbsd"
|
||||
|
||||
RDEPEND="dev-lang/perl
|
||||
guionly? ( >=gnome-base/librsvg-2.4.0
|
||||
>=dev-ml/lablgtk-2.6 )
|
||||
gtk? ( >=gnome-base/librsvg-2.4.0
|
||||
>=dev-ml/lablgtk-2.6[svg] )
|
||||
gd? ( >=media-libs/gd-2.0.28[truetype] )
|
||||
magic? ( sys-apps/file )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-lang/ocaml-3.10.2[ocamlopt?]"
|
||||
|
||||
MLUSER="p2p"
|
||||
|
||||
pkg_setup() {
|
||||
if use gtk; then
|
||||
echo ""
|
||||
einfo "If the compile with gui fails, and you have updated Ocaml"
|
||||
einfo "recently, you may have forgotten that you need to run"
|
||||
einfo "/usr/portage/dev-lang/ocaml/files/ocaml-rebuild.sh"
|
||||
einfo "to learn which ebuilds you need to recompile"
|
||||
einfo "each time you update Ocaml to a different version"
|
||||
einfo "see the Ocaml ebuild for details"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# dev-lang/ocaml creates its own objects but calls gcc for linking, which will
|
||||
# results in relocations if gcc wants to create a PIE executable
|
||||
if gcc-specs-pie ; then
|
||||
append-ldflags -nopie
|
||||
ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
|
||||
ewarn "We have appended -nopie to ocaml build options"
|
||||
ewarn "because linking an executable with pie while the objects are not pic will not work"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${P}-gcc.patch"
|
||||
epatch "${FILESDIR}/${P}-png.patch"
|
||||
epatch_user
|
||||
cd "${S}"/config
|
||||
eautoconf
|
||||
cd "${S}"
|
||||
use ocamlopt || sed -i -e "s/ocamlopt/idontwantocamlopt/g" "${S}/config/configure" || die "failed to disable ocamlopt"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# the dirs are not (yet) used, but it doesn't hurt to specify them anyway
|
||||
|
||||
# onlygui Disable all nets support, build only chosen GUI
|
||||
|
||||
if use gtk || use guionly; then
|
||||
myconf="--enable-gui=newgui2"
|
||||
else
|
||||
myconf="--disable-gui"
|
||||
fi
|
||||
|
||||
if use guionly; then
|
||||
myconf="${myconf} --disable-multinet --disable-donkey"
|
||||
fi
|
||||
|
||||
cd "${S}"
|
||||
econf \
|
||||
--sysconfdir=/etc/mldonkey \
|
||||
--sharedstatedir=/var/mldonkey \
|
||||
--localstatedir=/var/mldonkey \
|
||||
--enable-checks \
|
||||
--disable-batch \
|
||||
$(use_enable bittorrent) \
|
||||
$(use_enable fasttrack) \
|
||||
$(use_enable gnutella) \
|
||||
$(use_enable gnutella gnutella2) \
|
||||
$(use_enable gd) \
|
||||
$(use_enable magic) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export OCAMLRUNPARAM="l=256M"
|
||||
emake || die "emake failed"
|
||||
|
||||
if ! use guionly; then
|
||||
emake utils || die "emake utils failed"
|
||||
fi;
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local myext=""
|
||||
use ocamlopt || myext=".byte"
|
||||
use ocamlopt || export STRIP_MASK="*/bin/*"
|
||||
if ! use guionly; then
|
||||
for i in mlnet mld_hash get_range copysources subconv; do
|
||||
newbin $i$myext $i || die "failed to install $i"
|
||||
done
|
||||
use bittorrent && newbin make_torrent$myext make_torrent
|
||||
|
||||
newconfd "${FILESDIR}/mldonkey.confd-2.8" mldonkey
|
||||
fperms 600 /etc/conf.d/mldonkey
|
||||
newinitd "${FILESDIR}/mldonkey.initd" mldonkey
|
||||
fi
|
||||
|
||||
if use gtk; then
|
||||
for i in mlgui mlguistarter; do
|
||||
newbin $i$myext $i || die "failed to install $i"
|
||||
done
|
||||
make_desktop_entry mlgui "MLDonkey GUI" mldonkey "Network;P2P"
|
||||
newicon "${S}"/packages/rpm/mldonkey-icon-48.png ${PN}.png
|
||||
fi
|
||||
|
||||
if use doc ; then
|
||||
cd "${S}"/distrib
|
||||
dodoc ChangeLog *.txt
|
||||
|
||||
insinto /usr/share/doc/${PF}/scripts
|
||||
doins kill_mldonkey mldonkey_command mldonkey_previewer make_buginfo
|
||||
|
||||
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 *
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if ! use guionly; then
|
||||
enewuser ${MLUSER} -1 -1 /home/p2p users
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! use guionly; then
|
||||
echo
|
||||
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 also."
|
||||
echo
|
||||
else
|
||||
echo
|
||||
einfo "Simply run mlgui to start the chosen MLDonkey gui."
|
||||
einfo "It puts its config files into ~/.mldonkey"
|
||||
fi
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user