2010-06-19 04:19:39 +02:00
|
|
|
{ monolithic ? true # build monolithic amule
|
|
|
|
, daemon ? false # build amule daemon
|
|
|
|
, httpServer ? false # build web interface for the daemon
|
|
|
|
, client ? false # build amule remote gui
|
|
|
|
, fetchurl, stdenv, zlib, wxGTK, perl, cryptopp, libupnp, gettext, libpng ? null
|
2010-03-30 10:20:29 +02:00
|
|
|
, pkgconfig, makeWrapper }:
|
2007-10-06 17:59:35 +02:00
|
|
|
|
2010-06-19 04:19:39 +02:00
|
|
|
assert httpServer -> libpng != null;
|
|
|
|
with stdenv;
|
|
|
|
let
|
|
|
|
# Enable/Disable Feature
|
|
|
|
edf = enabled: flag: if enabled then "--enable-" + flag else "--disable-" + flag;
|
|
|
|
in
|
|
|
|
mkDerivation rec {
|
2010-03-30 10:20:29 +02:00
|
|
|
name = "aMule-2.2.6";
|
2007-10-06 17:59:35 +02:00
|
|
|
|
2008-07-29 18:52:26 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/amule/${name}.tar.bz2";
|
2010-03-30 10:20:29 +02:00
|
|
|
sha256 = "08l1931hcg1ia8yvhgx70hx64mknjnfn6l78m0ja44w13mgjpqvc";
|
2008-07-29 18:52:26 +02:00
|
|
|
};
|
|
|
|
|
2010-03-30 10:20:29 +02:00
|
|
|
buildInputs =
|
2010-06-19 04:19:39 +02:00
|
|
|
[ zlib wxGTK perl cryptopp libupnp gettext pkgconfig makeWrapper ]
|
|
|
|
++ lib.optional httpServer libpng;
|
2008-07-29 18:52:26 +02:00
|
|
|
|
2010-06-19 04:19:39 +02:00
|
|
|
configureFlags = ''
|
|
|
|
--with-crypto-prefix=${cryptopp}
|
|
|
|
--disable-debug
|
|
|
|
--enable-optimize
|
|
|
|
${edf monolithic "monolithic"}
|
|
|
|
${edf daemon "amule-daemon"}
|
|
|
|
${edf client "amule-gui"}
|
|
|
|
${edf httpServer "webserver"}
|
|
|
|
'';
|
2008-07-29 18:52:26 +02:00
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
sed -i "src/libs/ec/file_generator.pl" \
|
|
|
|
-es'|/usr/bin/perl|${perl}/bin/perl|g'
|
|
|
|
'';
|
2007-10-06 17:59:35 +02:00
|
|
|
|
2008-10-07 23:50:24 +02:00
|
|
|
# aMule will try to `dlopen' libupnp and libixml, so help it
|
|
|
|
# find them.
|
2010-06-19 04:19:39 +02:00
|
|
|
postInstall = lib.optionalString monolithic ''
|
|
|
|
wrapProgram "$out/bin/amule" --prefix LD_LIBRARY_PATH ":" "${libupnp}/lib"
|
2008-10-07 23:50:24 +02:00
|
|
|
'';
|
|
|
|
|
2007-10-06 17:59:35 +02:00
|
|
|
meta = {
|
2008-07-29 18:52:26 +02:00
|
|
|
homepage = http://amule.org/;
|
|
|
|
description = "aMule, a peer-to-peer client for the eD2K and Kademlia networks";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
aMule is an eMule-like client for the eD2k and Kademlia
|
|
|
|
networks, supporting multiple platforms. Currently aMule
|
|
|
|
(officially) supports a wide variety of platforms and operating
|
|
|
|
systems, being compatible with more than 60 different
|
|
|
|
hardware+OS configurations. aMule is entirely free, its
|
|
|
|
sourcecode released under the GPL just like eMule, and includes
|
|
|
|
no adware or spyware as is often found in proprietary P2P
|
|
|
|
applications.
|
|
|
|
'';
|
|
|
|
|
2010-03-30 10:20:29 +02:00
|
|
|
license = "GPLv2+";
|
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.gnu; # arbitrary choice
|
2010-06-19 04:19:39 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.phreedom ];
|
2007-10-06 17:59:35 +02:00
|
|
|
};
|
|
|
|
}
|