/[gentoo-x86]/net-analyzer/ntop/ntop-3.3.ebuild
Gentoo

Contents of /net-analyzer/ntop/ntop-3.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Fri Sep 7 06:47:31 2007 UTC (7 years, 3 months ago) by mr_bones_
Branch: MAIN
Changes since 1.3: +2 -2 lines
whitespace
(Portage version: 2.1.2.12)

1 cedk 1.1 # Copyright 1999-2007 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 mr_bones_ 1.4 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/ntop/ntop-3.3.ebuild,v 1.3 2007/09/06 22:47:48 vapier Exp $
4 cedk 1.1
5     inherit eutils autotools
6    
7     DESCRIPTION="tool that shows network usage like top"
8     HOMEPAGE="http://www.ntop.org/ntop.html"
9     SRC_URI="mirror://sourceforge/ntop/${P}.tar.gz"
10    
11     LICENSE="GPL-2"
12     SLOT="0"
13     KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
14 jokey 1.2 IUSE="ipv6 nls ssl tcpd zlib"
15     #IUSE="ipv6 nls snmp ssl tcpd zlib"
16 cedk 1.1
17     DEPEND="sys-apps/gawk
18     >=sys-devel/libtool-1.4
19     >=sys-libs/gdbm-1.8.0
20     net-libs/libpcap
21     >=media-libs/gd-2.0.22
22     >=media-libs/libpng-1.2.5
23     net-analyzer/rrdtool
24     snmp? ( net-analyzer/net-snmp )
25     ssl? ( >=dev-libs/openssl-0.9.6 )
26     tcpd? ( >=sys-apps/tcp-wrappers-7.6-r4 )
27     zlib? ( sys-libs/zlib )"
28    
29     # Needed by xmldumpPlugin - couldn't get it to work
30     # dev-libs/gdome2
31     # >=dev-libs/glib-2"
32    
33     RDEPEND="${DEPEND}
34     media-gfx/graphviz"
35    
36     pkg_setup() {
37 jokey 1.2 # snmp doesn't compile in this release, disabled for now
38 mr_bones_ 1.4
39 jokey 1.2 #if use snmp ; then
40     # ewarn "snmp plugin is under development and upstream does not recommend"
41     # ewarn "it for usage in production environment."
42     # if ! use ipv6 ; then
43     # echo
44     # eerror "snmp plugin has compilation problems without ipv6 support."
45     # eerror "For additional information see bug #121497."
46     # die "snmp without ipv6 is broken"
47     # else
48     # if ! built_with_use net-analyzer/net-snmp ipv6 ; then
49     # echo
50     # eerror "You have both ipv6 and snmp enabled."
51     # eerror "This require ipv6 support in net-analyzer/net-snmp."
52     # eerror "However, net-analyzer/net-snmp was compiled with ipv6 flag disabled."
53     # eerror "Please, re-emerge net-analyzer/net-snmp with USE=\"ipv6\"."
54     # die "net-analyzer/net-snmp was build without ipv6."
55     # fi
56     # fi
57     #fi
58 cedk 1.1 enewgroup ntop
59     enewuser ntop -1 -1 /var/lib/ntop ntop
60     }
61    
62     src_unpack() {
63     unpack ${A}
64     cd "${S}"
65     epatch "${FILESDIR}"/globals-core.c.diff
66     epatch "${FILESDIR}"/${P}-build.patch
67     eautoreconf
68    
69     sed -i \
70     -e "s@/usr/local/bin/dot@/usr/bin/dot@" report.c || die "sed failed"
71     }
72    
73     src_compile() {
74     # force disable xmldumpPlugin
75     export \
76     ac_cv_header_glib_h=no \
77     ac_cv_header_glibconfig_h=no \
78     ac_cv_header_gdome_h=no \
79     ac_cv_lib_glib_g_date_julian=no \
80     ac_cv_lib_xml2_xmlCheckVersion=no \
81     ac_cv_lib_gdome_gdome_di_saveDocToFile=no
82    
83     econf \
84     $(use_enable ipv6) \
85     $(use_enable nls i18n) \
86     $(use_with ssl) $(use_enable ssl sslv3) $(use_enable ssl sslwatchdog) \
87     $(use_with tcpd) \
88     $(use_with zlib) \
89     --with-rrd-home=/usr/lib \
90 vapier 1.3 --disable-snmp \
91 cedk 1.1 || die "configure problem"
92 vapier 1.3 # $(use_enable snmp)
93 cedk 1.1 emake || die "compile problem"
94     }
95    
96     src_install() {
97     emake DESTDIR="${D}" install || die "install problem"
98    
99     keepdir /var/lib/ntop
100    
101     dodoc AUTHORS CONTENTS ChangeLog MANIFESTO NEWS
102     dodoc PORTING README SUPPORT_NTOP.txt THANKS $(find docs -type f)
103    
104     newinitd "${FILESDIR}"/ntop-initd ntop
105     newconfd "${FILESDIR}"/ntop-confd ntop
106     }
107    
108     pkg_postinst() {
109     fowners ntop:ntop /var/lib/ntop
110     fperms 750 /var/lib/ntop
111    
112     elog "You need to set a password first by running"
113     elog "ntop --set-admin-password"
114     }

  ViewVC Help
Powered by ViewVC 1.1.20