2 Summary: Network monitoring tool
3 Summary(pl): Narzêdzie do monitorowania sieci
9 Source0: http://snapshot.ntop.org/tgz/%{name}-%{version}.tgz
10 # Source0-md5: 4586e4173fcab64d2394502603fc73aa
12 Source2: %{name}.sysconfig
14 Patch0: %{name}-acam.patch
15 Patch1: %{name}-externallib.patch
16 Patch2: %{name}-perl.patch
17 URL: http://www.ntop.org/
18 BuildRequires: autoconf
19 BuildRequires: automake
20 BuildRequires: gd-devel >= 2.0.1
21 BuildRequires: gdbm-devel >= 1.8.3
22 BuildRequires: libpcap-devel
23 BuildRequires: libpng-devel
24 BuildRequires: libtiff-devel
25 BuildRequires: libwrap-devel
26 BuildRequires: libtool
27 BuildRequires: ncurses-devel >= 5.2
28 BuildRequires: openssl-devel >= 0.9.7c
29 BuildRequires: readline-devel >= 4.2
30 BuildRequires: zlib-devel
32 Requires(pre): /usr/bin/getgid
33 Requires(pre): /bin/id
34 Requires(pre): /usr/sbin/groupadd
35 Requires(pre): /usr/sbin/useradd
36 Requires(post,preun): /sbin/chkconfig
37 Requires(post,postun): /sbin/ldconfig
38 Requires(postun): /usr/sbin/groupdel
39 Requires(postun): /usr/sbin/userdel
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 ntop is a tool that shows the network usage, similar to what the
44 popular top Unix command does.
47 ntop to narzêdzie, które pokazuje u¿ycie sieci w podobny sposób jak
48 robi to popularna Unixowa komenda top.
68 #mv -f acinclude.m4.in acinclude.m4
75 --with-ossl-root=%{_prefix} \
76 --with-gdchart-root=`pwd`/../gdchart0.94c \
81 --localstatedir=%{_var}/lib/%{name} || true
84 --with-ossl-root=%{_prefix} \
85 --with-gdchart-root=`pwd`/../gdchart0.94c \
88 --localstatedir=%{_var}/lib/%{name}
96 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT{%{_var}/lib/%{name},/etc/{rc.d/init.d,sysconfig}}
101 DESTDIR=$RPM_BUILD_ROOT
103 #mv $RPM_BUILD_ROOT%{_bindir}/*.pem $RPM_BUILD_ROOT%{_datadir}/%{name}
105 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntop
106 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ntop
107 install %{SOURCE3} $RPM_BUILD_ROOT/etc/ntop.conf
110 rm -rf $RPM_BUILD_ROOT
113 if [ -n "`getgid ntop`" ]; then
114 if [ "`getgid ntop`" != "120" ]; then
115 echo "Error: group ntop doesn't have gid=120. Correct this before installing ntop." 1>&2
119 /usr/sbin/groupadd -g 120 -r -f ntop
121 if [ -n "`id -u ntop 2>/dev/null`" ]; then
122 if [ "`id -u ntop`" != "120" ]; then
123 echo "Error: user ntop doesn't have uid=120. Correct this before installing ntop." 1>&2
127 /usr/sbin/useradd -u 120 -r -d /var/lib/ntop -s /bin/false -c "ntop User" -g ntop ntop 1>&2
132 /sbin/chkconfig --add ntop
133 if [ -f /var/lock/subsys/ntop ]; then
134 /etc/rc.d/init.d/ntop restart >&2
136 echo "Run \"/etc/rc.d/init.d/ntop start\" to start ntop daemon." >&2
140 if [ "$1" = "0" ]; then
141 if [ -f /var/lock/subsys/ntop ]; then
142 /etc/rc.d/init.d/ntop stop 1>&2
144 /sbin/chkconfig --del ntop
149 if [ "$1" = "0" ]; then
150 /usr/sbin/userdel ntop
151 /usr/sbin/groupdel ntop
155 %defattr(644,root,root,755)
156 %doc ntop/AUTHORS ntop/NEWS ntop/README ntop/THANKS
157 #ntop/docs/1STRUN.TXT ntop/docs/FAQ
158 %dir %{_var}/lib/%{name}
159 %attr(755,root,root) %{_bindir}/*
160 %attr(755,root,root) %{_libdir}/lib*
161 #%attr(755,root,root) /usr/share/ntop/*
162 %attr(755,root,root) %{_datadir}/%{name}
164 #%dir %{_libdir}/%{name}
165 #%dir %{_libdir}/%{name}/plugins
166 %attr(755,root,root) %{_libdir}/%{name}/plugins
168 %attr(754,root,root) /etc/rc.d/init.d/ntop
169 %attr(640,root,root) /etc/sysconfig/ntop
170 %attr(644,ntop,ntop) %config(noreplace) %verify(not size mtime md5) /etc/ntop.conf