updated amuleadu-2010.1 ebuild
[dottout.git] / net-p2p / amuleadu / amuleadu-2010.1.ebuild
blob1fe1825415f1d439d76791906227a558da314315
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-p2p/amule/amule-2.2.6.ebuild,v 1.1 2009/09/18 14:59:45 patrick Exp $
5 EAPI="2"
7 inherit autotools eutils flag-o-matic wxwidgets
8 MY_PN="amule-adunanza"
9 MY_PN2="aMule-AdunanzA"
10 MY_PV="${PV}-2.2.6"
11 MY_P="${MY_PN2}-${MY_PV}"
13 S="${WORKDIR}/${MY_P}"
15 DESCRIPTION="aMule AdunanzA, IL software p2p per la comunita' fastweb"
16 HOMEPAGE="http://www.adunanza.net/"
17 SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.bz2"
19 LICENSE="GPL-2"
20 SLOT="0"
21 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
22 IUSE="daemon debug geoip gtk nls remote stats unicode upnp"
24 DEPEND="=x11-libs/wxGTK-2.8*
25 dev-libs/crypto++[sse3]
26 >=sys-libs/zlib-1.2.1
27 stats? ( >=media-libs/gd-2.0.26[jpeg] )
28 geoip? ( dev-libs/geoip )
29 upnp? ( >=net-libs/libupnp-1.6.6 )
30 remote? ( >=media-libs/libpng-1.2.0
31 unicode? ( >=media-libs/gd-2.0.26 ) )"
33 src_unpack() {
34 unpack ${A}
35 cd ${S}
36 AT_M4DIR="m4" eautoreconf
37 elibtoolize
40 pkg_setup() {
42 if ! use gtk && ! use remote && ! use daemon; then
43 eerror ""
44 eerror "You have to specify at least one of gtk, remote or daemon"
45 eerror "USE flag to build amule."
46 eerror ""
47 die "Invalid USE flag set"
50 if use stats && ! use gtk; then
51 einfo "Note: You would need both the gtk and stats USE flags"
52 einfo "to compile aMule Statistics GUI."
53 einfo "I will now compile console versions only."
57 pkg_preinst() {
58 if use daemon || use remote; then
59 enewgroup p2p
60 enewuser p2p -1 -1 /home/p2p p2p
64 src_configure() {
65 local myconf
67 WX_GTK_VER="2.8"
69 if use gtk; then
70 einfo "wxGTK with gtk support will be used"
71 need-wxwidgets unicode
72 else
73 einfo "wxGTK without X support will be used"
74 need-wxwidgets base
77 if use gtk ; then
78 use stats && myconf="${myconf}
79 --enable-wxcas
80 --enable-alc"
81 use remote && myconf="${myconf}
82 --enable-amule-gui"
83 else
84 myconf="
85 --disable-monolithic
86 --disable-amule-gui
87 --disable-wxcas
88 --disable-alc"
91 econf \
92 --with-wx-config=${WX_CONFIG} \
93 --with-wxbase-config=${WX_CONFIG} \
94 --enable-amulecmd \
95 $(use_enable debug) \
96 $(use_enable !debug optimize) \
97 $(use_enable daemon amule-daemon) \
98 $(use_enable geoip) \
99 $(use_enable nls) \
100 $(use_enable remote webserver) \
101 $(use_enable stats cas) \
102 $(use_enable stats alcc) \
103 ${myconf} || die
106 src_install() {
107 emake DESTDIR="${D}" install || die
109 if use daemon; then
110 newconfd "${FILESDIR}"/amuled.confd amuled
111 newinitd "${FILESDIR}"/amuled.initd amuled
113 if use remote; then
114 newconfd "${FILESDIR}"/amuleweb.confd amuleweb
115 newinitd "${FILESDIR}"/amuleweb.initd amuleweb
119 pkg_postinst() {
120 ewarn "Per maggiori informazioni sullo sviluppo di aMule AdunanzA"
121 ewarn "e per richieste di supporto potete consultare il forum della"
122 ewarn "comunita': http://forum.adunanza.net"