-%define snap 03-02-13
Summary: Network monitoring tool
Summary(pl): Narzêdzie do monitorowania sieci
Name: ntop
Release: 0.2
License: GPL
Group: Networking
-Source0: http://snapshot.ntop.org/tgz/%{name}-%{version}.tgz
+Source0: http://dl.sourceforge.net/ntop/%{name}-%{version}.tgz
# Source0-md5: 4586e4173fcab64d2394502603fc73aa
Source1: %{name}.init
Source2: %{name}.sysconfig
+Source3: %{name}.conf
Patch0: %{name}-acam.patch
Patch1: %{name}-externallib.patch
Patch2: %{name}-perl.patch
BuildRequires: openssl-devel >= 0.9.7c
BuildRequires: readline-devel >= 4.2
BuildRequires: zlib-devel
+PreReq: rc-scripts
+Requires(pre): /usr/bin/getgid
+Requires(pre): /bin/id
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Requires(post,preun): /sbin/chkconfig
+Requires(post,postun): /sbin/ldconfig
+Requires(postun): /usr/sbin/groupdel
+Requires(postun): /usr/sbin/userdel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
--with-gdchart-root=`pwd`/../gdchart0.94c \
--enable-tcpwrap \
--with-gnu-ld \
+ --enable-i18n \
+ --enable-showoses \
--localstatedir=%{_var}/lib/%{name} || true
%configure \
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntop
install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ntop
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/ntop.conf
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
/sbin/chkconfig --add ntop
+if [ -f /var/lock/subsys/ntop ]; then
+ /etc/rc.d/init.d/ntop restart >&2
+else
+ echo "Run \"/etc/rc.d/init.d/ntop start\" to start ntop daemon." >&2
+fi
%preun
if [ "$1" = "0" ]; then
%files
%defattr(644,root,root,755)
-%doc ntop/AUTHORS ntop/NEWS ntop/README ntop/THANKS
+%doc ntop/AUTHORS ntop/NEWS ntop/README ntop/THANKS
+#ntop/docs/1STRUN.TXT ntop/docs/FAQ
%dir %{_var}/lib/%{name}
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_libdir}/lib*
-#%attr(755,root,root) /usr/share/ntop/*
%attr(755,root,root) %{_datadir}/%{name}
#%%{_libdir}/lib*.la
-#%dir %{_libdir}/%{name}
-#%dir %{_libdir}/%{name}/plugins
+%dir %{_libdir}/%{name}
%attr(755,root,root) %{_libdir}/%{name}/plugins
%{_mandir}/man*/*
-%attr(755,root,root) /etc/rc.d/init.d/ntop
-%attr(644,root,root) /etc/sysconfig/ntop
+%attr(754,root,root) /etc/rc.d/init.d/ntop
+%attr(640,root,root) /etc/sysconfig/ntop
+%attr(644,ntop,ntop) %config(noreplace) %verify(not size mtime md5) /etc/ntop.conf