# TODO
# - see if it uses system files for ettercap and geoip, ieee-oui files we did not package
# - see where plugins are needed in plugin dir or in system dir
-# - fix init script (--redirdfs is bogus?)
-#
-# Conditional build:
-%bcond_with mysql # with mysql support
+# - unpackaged
+# /etc/ntop/GeoIPASNum.dat
+# /etc/ntop/GeoLiteCity.dat
+# /usr/lib64/libntop.a
+# /usr/lib64/libntopreport.a
+# NOTE: can read oui.txt.xz if MAKE_WITH_ZLIB enabled
Summary: Network monitoring tool
Summary(pl.UTF-8): Narzędzie do monitorowania sieci
Name: ntop
-Version: 4.0.3
-Release: 0.1
+Version: 5.0.1
+Release: 9
License: GPL v3+
Group: Networking
-Source0: http://downloads.sourceforge.net/ntop/%{name}-%{version}.tgz
-# Source0-md5: f064393a2090e5bda102cd49c2707789
+Source0: http://downloads.sourceforge.net/ntop/%{name}-%{version}.tar.gz
+# Source0-md5: 01710b6925a8a5ffe1a41b8b512ebd69
Source1: %{name}.init
Source2: %{name}.sysconfig
# http://ettercap.cvs.sourceforge.net/ettercap/ettercap_ng/share/etter.finger.os?rev=HEAD
Patch5: %{name}-running-user.patch
Patch6: ieee-oui.patch
Patch7: %{name}-install.patch
-Patch8: %{name}-no_wget_etter.patch
+Patch8: %{name}-rrdtool-1.6.0.patch
+Patch9: ac-am.patch
URL: http://www.ntop.org/
BuildRequires: GeoIP-devel
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.52
BuildRequires: automake >= 1.6
BuildRequires: gawk
-BuildRequires: gd-devel >= 2.0.1
BuildRequires: gdbm-devel >= 1.8.3
-BuildRequires: gdome2-devel
-BuildRequires: glib2-devel
-BuildRequires: libdbi-devel
-BuildRequires: libevent-devel >= 1.4.0
BuildRequires: libpcap-devel
-BuildRequires: libpng-devel
-BuildRequires: libtiff-devel
BuildRequires: libtool
-BuildRequires: libwrap-devel
-BuildRequires: lua51-devel
-BuildRequires: ncurses-devel >= 5.2
BuildRequires: net-snmp-devel
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: perl-devel
-BuildRequires: readline-devel >= 4.2
+BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.268
BuildRequires: rrdtool-devel >= 1.1.0
+BuildRequires: sed >= 4.0
BuildRequires: zlib-devel
Requires(post,postun): /sbin/ldconfig
Requires(post,preun): /sbin/chkconfig
Requires(pre): /usr/bin/getgid
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
-Requires: ieee-oui
+Requires: hwdata >= 0.243-2
Requires: rc-scripts >= 0.4.2.8
# maybe is optional, needs checking
Suggests: GeoIP-db-City
%patch6 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p1
gzip -9c %{SOURCE3} >etter.finger.os.gz
cp -f %{_aclocaldir}/libtool.m4 libtool.m4.in
cat acinclude.m4.in libtool.m4.in acinclude.m4.ntop > acinclude.m4
+%{__sed} -i -e '1s,/usr/bin/env python$,%{__python},' python/sankey.py
+
%build
%{__libtoolize}
%{__aclocal}
%{__autoconf}
%{__autoheader}
%{__automake}
+
+cd nDPI
+%configure
+%{__make}
+cd ..
+
# "verified.awk -u" calls require gawk
%configure \
AWK=gawk \
--disable-static \
--with-gnu-ld \
--with-ossl-root=%{_prefix} \
- --with-tcpwrap \
- --enable-snmp \
- %{?with_mysql:--enable-mysql}
+ --enable-snmp
%{__make}
ln -snf ../../lib$p-%{version}.so $RPM_BUILD_ROOT%{_libdir}/ntop/plugins/$p.so
done
-ln -s %{_datadir}/oui.txt $RPM_BUILD_ROOT%{_sysconfdir}/ntop/oui.txt
+# read by checkForInputFile() scanning various dirs and extensions
+ln -s /lib/hwdata/oui.txt $RPM_BUILD_ROOT%{_sysconfdir}/ntop/oui.txt
# no -devel
rm -f $RPM_BUILD_ROOT%{_libdir}{,/ntop/plugins}/*.la