%define groupid 65005 %define userid 65005 Name: ntop Version: 5.0.1 Release: 2mamba Epoch: 1 Summary: A web tool that shows the network usaged Group: Network/Monitoring Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.ntop.org Source: http://downloads.sourceforge.net/project/ntop/ntop/Stable/ntop-%{version}.tar.gz Source1: %{name}-initscript Source2: %{name}-sysconfig Patch1: ntop-3.3.8-am.patch Patch2: ntop-3.3.8-running-user.patch Patch3: ntop-3.3.8-dbfile-default-dir.patch Patch4: ntop-3.3.8-enable-sslv3.patch License: GPL BuildRequires: libgd-devel BuildRequires: libtool BuildRequires: gawk BuildRequires: autoconf, automake, pkgconfig, groff BuildRequires: libnetsnmp-devel BuildRequires: lm_sensors-devel ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libcairo-devel BuildRequires: libexpat-devel BuildRequires: libfontconfig-devel BuildRequires: libfreetype-devel BuildRequires: libgdbm-devel BuildRequires: libglib-devel BuildRequires: libglitz-devel BuildRequires: libmysql5-devel BuildRequires: libopenssl-devel BuildRequires: libpango-devel BuildRequires: libpcap-devel BuildRequires: libpcre-devel BuildRequires: libpixman-devel BuildRequires: libpng-devel BuildRequires: libselinux-devel BuildRequires: libwrap-devel BuildRequires: libX11-devel BuildRequires: libXau-devel BuildRequires: libxcb-devel BuildRequires: libxcb-util-devel BuildRequires: libXdmcp-devel BuildRequires: libxml2-devel BuildRequires: libXrender-devel BuildRequires: libz-devel BuildRequires: perl-devel BuildRequires: rrdtool-devel ## AUTOBUILDREQ-END BuildRequires: libdbi-static Requires: libGeoIP-tools BuildRoot: %{_tmppath}/%{name}-%{version}-root # FIXME: # xmldumpPlugin.c:53:2: warning: Missing header files, disabling xmldump plugin # xmldumpPlugin.c:61:2: warning: glibconfig.h unavailable # xmldumpPlugin.c:64:2: warning: glib.h unavailable # xmldumpPlugin.c:67:2: warning: gdome.h unavailable %description ntop is a tool for both Unix and Win32 that shows the network usage, similar to what the popular top Unix command does. It sports a web interface for accessing accounting data and includes support for popular tools/protocols such as NetFlow/sFlow/RRD. %prep %setup -q #find . \( -name \*\.gz -o -name \*\.c -o -name \*\.h -o -name \*\.pdf \ # -o -name \*\.dtd -o -name \*\.html -o -name \*\.js \) -print \ # | xargs chmod a-x #%patch1 -p1 %patch2 -p1 #%patch3 -p1 %{_localstatedir}/lib/ntop #%patch4 -p1 %build ./autogen.sh --noconfig #LIBS=-lm \ %configure \ --with-rrd-root=%{_bindir} \ --with-rrd-lib=%{_libdir} \ --with-rrd-include=%{_includedir} \ --enable-i18n \ --with-tcpwrap \ --enable-sslv3 \ --enable-snmp \ --enable-mysql # --with-libpng-include=%{_includedir}/libpng12/ \ # --with-libpng-lib=%{_libdir} \ # --enable-xmldump \ # --with-glib-include=%{_includedir}/glib-2.0 \ # --with-glibconfig-include=%{_libdir}/glib/include/ \ # --enable-largerrdpop # executable(ntop) is needed by ntop-3.3.8-1mamba.i586 %make -j1 %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall \ CFG_DBFILE_DIR=%{buildroot}%{_localstatedir}/ntop install -p -D %{SOURCE1} %{buildroot}%{_initrddir}/ntop install -p -D %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/ntop install -d %{buildroot}%{_localstatedir}/ntop # remove empty file rm -f %{buildroot}%{_datadir}/ntop/html/ntop.html # fix permissions chmod 0755 %{buildroot}%{_libdir}/ntop/plugins/* # these are not dlopened modules, but -devel cruft rm -f %{buildroot}%{_libdir}/libmyrrd.so rm -f %{buildroot}%{_libdir}/libntop.so rm -f %{buildroot}%{_libdir}/libntopreport.so rm -f %{buildroot}%{_libdir}/lib*Plugin*.so # Create files to be %ghost'ed - %ghost'ed files must exist in the buildroot install -d %{buildroot}%{_localstatedir}/lib/ntop/rrd install -d %{buildroot}%{_localstatedir}/lib/ntop/rrd/flows install -d %{buildroot}%{_localstatedir}/lib/ntop/rrd/graphics install -d %{buildroot}%{_localstatedir}/lib/ntop/rrd/interfaces touch %{buildroot}%{_localstatedir}/ntop/addressQueue.db touch %{buildroot}%{_localstatedir}/ntop/dnsCache.db touch %{buildroot}%{_localstatedir}/ntop/fingerprin.db touch %{buildroot}%{_localstatedir}/ntop/LsWatch.db touch %{buildroot}%{_localstatedir}/ntop/macPrefix.db touch %{buildroot}%{_localstatedir}/ntop/ntop_pw.db touch %{buildroot}%{_localstatedir}/ntop/prefsCache.db %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %pre if [ $1 -eq 1 ]; then # new install groupadd ntop -g %{groupid} 2>/dev/null useradd -u %{userid} -g ntop -c 'ntop daemon' -d /var/empty \ -s /bin/false ntop 2>/dev/null fi exit 0 %post if [ $1 -eq 1 ]; then # new install if [ -x /usr/bin/mkpasswd ]; then RANDOM_PASSWD=`/usr/bin/mkpasswd -l 10 -s 0` ntop -u ntop --set-admin-password=$RANDOM_PASSWD &>/dev/null fi fi exit 0 %preun if [ $1 -eq 0 ]; then # erase /sbin/service ntop stop /sbin/chkconfig --del ntop userdel ntop 2>/dev/null fi exit 0 %postun if [ $1 -eq 1 ]; then # update /sbin/service ntop restart &>/dev/null fi exit 0 %files %defattr(-,root,root) %dir %{_sysconfdir}/ntop %config(noreplace) %{_sysconfdir}/ntop/* %config(noreplace) %{_sysconfdir}/sysconfig/ntop %attr(755,root,root) %{_initrddir}/ntop %{_bindir}/ntop %{_libdir}/*.so %{_libdir}/*.a %{_libdir}/*.la %dir %{_libdir}/ntop/ %{_libdir}/ntop/plugins/*.so %attr(755,ntop,ntop) %dir %{_datadir}/ntop %{_datadir}/ntop %attr(755,ntop,ntop) %dir %{_localstatedir}/ntop %attr(0644,root,root) %ghost %{_localstatedir}/ntop/*.db %{_mandir}/man8/* %doc AUTHORS ChangeLog COPYING MANIFESTO %doc docs/BUG_REPORT docs/database/README docs/database/README %doc docs/FAQarchive docs/FAQ docs/HACKING docs/KNOWN_BUGS docs/TODO %doc docs/1STRUN.txt NEWS README SUPPORT_NTOP.txt THANKS %changelog * Tue May 27 2014 Silvan Calarco 5.0.1-2mamba - rebuilt with libnetsnmp 5.7.2 * Sun Aug 19 2012 Automatic Build System 5.0.1-1mamba - automatic version update by autodist * Thu Aug 09 2012 Silvan Calarco 4.1.0-3mamba - rebuilt with rrdtool 1.4.7 * Sat Jan 21 2012 Silvan Calarco 4.1.0-2mamba - rebuilt with rrdtool 1.4.6 * Tue Aug 16 2011 Automatic Build System 4.1.0-1mamba - update to 4.1.0 * Fri Oct 29 2010 Automatic Build System 4.0.1-1mamba - automatic update by autodist * Sat Oct 23 2010 Silvan Calarco 3.3.10-3mamba - rebuilt with net-snmp 5.6 * Sun Aug 08 2010 Automatic Build System 3.3.10-2mamba - automatic rebuild by autodist * Mon Mar 15 2010 Automatic Build System 3.3.10-1mamba - automatic update by autodist * Thu May 21 2009 Automatic Build System 3.3.9-2mamba - automatic rebuild by autodist * Sun Mar 22 2009 Silvan Calarco 3.3.9-1mamba - automatic update by autodist * Fri Dec 05 2008 gil 3.3.8-1mamba - update to 3.3.8 * Wed Aug 02 2006 Davide Madrisan 3.2-2qilnx - update to version 3.2 by autospec - modified owner and group for %{_datadir}/ntop * Thu Oct 06 2005 Davide Madrisan 3.2rc2-1qilnx - update to version 3.2rc2 by autospec * Mon Sep 20 2004 Davide Madrisan 2.2c-4qilnx - build option 'enable-largerrdpop' disabled * Fri Sep 17 2004 Davide Madrisan 2.2c-3qilnx - rebuild with RRD support * Mon Jul 05 2004 Silvan Calarco 2.2c-2qilnx - added /etc/sysconfig/ntop for initscript interfaces configuration * Thu Jul 01 2004 Silvan Calarco 2.2c-1qilnx - new version build - added automatic password creation * Tue Nov 04 2003 Silvan Calarco 2.2-1qilnx - first build