new amuleadu-9999.ebuild
[dottout.git] / net-p2p / amuleadu / amuleadu-9999.ebuild
blob55927a9b573a0725f49a44a7b8b8920941547fbf
1 # Copyright 1999-2007 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.0_pre20070422.ebuild,v 1.1 2007/04/22 11:48:32 armin76 Exp $
5 inherit subversion autotools eutils flag-o-matic wxwidgets
7 ESVN_REPO_URI="https://amule-adunanza.svn.sourceforge.net/svnroot/amule-adunanza/branches/mrhyde"
8 ESVN_PROJECT="amule-adunanza"
9 S="${WORKDIR}/amule-adunanza"
11 DESCRIPTION="aMule AdunanzA, IL software p2p per la comunita' fastweb"
12 HOMEPAGE="http://www.adunanza.net/"
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
17 IUSE="amuled debug gtk nls remote stats unicode geoip optimize upnp ed2k"
19 DEPEND="dev-util/subversion
20 !net-p2p/amule
21 dev-libs/crypto++
22 =x11-libs/wxGTK-2.8*
23 >=sys-libs/zlib-1.2.1
24 stats? ( >=media-libs/gd-2.0.26 )
25 geoip? ( dev-libs/geoip )
26 upnp? ( >=net-libs/libupnp-1.4.6 )
27 remote? ( >=media-libs/libpng-1.2.0
28 unicode? ( >=media-libs/gd-2.0.26 ) )"
30 pkg_setup() {
31 ewarn ""
32 ewarn "Questo ebuild e' basato su SVN snapshot e sul relativo port"
33 ewarn "sperimentale della patch adunanza. Pertanto e' doppiamente "
34 ewarn "instabile e non vi e' garanzia di corretto funzionamento "
35 ewarn ""
37 if ! use gtk && ! use remote && ! use amuled; then
38 eerror ""
39 eerror "You have to specify at least one of gtk, remote or amuled"
40 eerror "USE flag to build amule."
41 eerror ""
42 die "Invalid USE flag set"
45 if use stats && ! use gtk; then
46 einfo "Note: You would need both the gtk and stats USE flags"
47 einfo "to compile aMule Statistics GUI."
48 einfo "I will now compile console versions only."
51 if use stats && ! built_with_use media-libs/gd jpeg; then
52 die "media-libs/gd should be compiled with the jpeg use flag when you have the stats use flag set"
57 src_unpack() {
58 subversion_src_unpack
59 AT_M4DIR="m4" eautoreconf
60 elibtoolize
63 pkg_preinst() {
64 if use amuled || use remote; then
65 enewgroup p2p
66 enewuser p2p -1 -1 /home/p2p p2p
70 src_compile() {
71 local myconf=""
73 WX_GTK_VER="2.8"
75 if use gtk; then
76 einfo "wxGTK with gtk support will be used"
77 need-wxwidgets unicode
78 else
79 einfo "wxGTK without X support will be used"
80 need-wxwidgets base
83 if use gtk ; then
84 use stats && myconf="${myconf}
85 --enable-wxcas
86 --enable-alc"
87 use remote && myconf="${myconf}
88 --enable-amule-gui"
89 else
90 myconf="
91 --disable-monolithic
92 --disable-amule-gui
93 --disable-wxcas
94 --disable-alc"
97 econf \
98 --with-wx-config=${WX_CONFIG} \
99 --with-wxbase-config=${WX_CONFIG} \
100 --enable-amulecmd \
101 $(use_enable debug) \
102 $(use_enable !debug optimize) \
103 $(use_enable amuled amule-daemon) \
104 $(use_enable geoip) \
105 $(use_enable nls) \
106 $(use_enable remote webserver) \
107 $(use_enable stats cas) \
108 $(use_enable stats alcc) \
109 $(use_enable ed2k) \
110 ${myconf} || die
112 # we filter ssp until bug #74457 is closed to build on hardened
113 filter-flags -fstack-protector -fstack-protector-all
115 emake -j1 || die
118 src_install() {
119 make DESTDIR=${D} install || die
121 if use amuled; then
122 newconfd ${FILESDIR}/amuled.confd amuled
123 newinitd ${FILESDIR}/amuled.initd amuled
126 if use remote; then
127 newconfd ${FILESDIR}/amuleweb.confd amuleweb
128 newinitd ${FILESDIR}/amuleweb.initd amuleweb
132 pkg_postinst() {
133 ewarn "Per maggiori informazioni sullo sviluppo di aMule AdunanzA"
134 ewarn "e per richieste di supporto potete consultare il forum della"
135 ewarn "comunita': http://forum.adunanza.net/forumdisplay.php?f=25"