# 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?)
+# - 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
#
# Conditional build:
%bcond_with mysql # with mysql support
Summary: Network monitoring tool
Summary(pl.UTF-8): Narzędzie do monitorowania sieci
Name: ntop
-Version: 4.0
-Release: 0.1
+Version: 5.0.1
+Release: 6
License: GPL v3+
Group: Networking
Source0: http://downloads.sourceforge.net/ntop/%{name}-%{version}.tar.gz
-# Source0-md5: c5fc7863d8ba08654ef7b4d88ff860f4
+# Source0-md5: 01710b6925a8a5ffe1a41b8b512ebd69
Source1: %{name}.init
Source2: %{name}.sysconfig
+# http://ettercap.cvs.sourceforge.net/ettercap/ettercap_ng/share/etter.finger.os?rev=HEAD
+Source3: etter.finger.os
Patch0: %{name}-conf.patch
Patch1: %{name}-config.patch
Patch2: %{name}-am.patch
Patch5: %{name}-running-user.patch
Patch6: ieee-oui.patch
Patch7: %{name}-install.patch
+Patch8: %{name}-rrdtool-1.6.0.patch
+Patch9: ac-am.patch
URL: http://www.ntop.org/
BuildRequires: GeoIP-devel
BuildRequires: autoconf
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: hwdata >= 0.243-2
Requires: rc-scripts >= 0.4.2.8
-Requires: ieee-oui
# maybe is optional, needs checking
Suggests: GeoIP-db-City
Suggests: GeoIP-db-IPASNum
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+
+gzip -9c %{SOURCE3} >etter.finger.os.gz
# taken from autogen.sh
cp -f %{_aclocaldir}/libtool.m4 libtool.m4.in
%{__autoconf}
%{__autoheader}
%{__automake}
+
+cd nDPI
+%configure
+%{__make}
+cd ..
+
# "verified.awk -u" calls require gawk
%configure \
AWK=gawk \
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