1 Summary: Network monitoring tool
2 Summary(pl): Narzêdzie do monitorowania sieci
8 Source0: http://dl.sourceforge.net/ntop/%{name}-%{version}.tgz
9 # Source0-md5: 1ec6055c75f1acbb5d5600492481ef85
11 Source2: %{name}.sysconfig
13 Patch0: %{name}-acam.patch
14 Patch1: %{name}-externallib.patch
15 Patch2: %{name}-perl.patch
16 URL: http://www.ntop.org/
17 BuildRequires: autoconf
18 BuildRequires: automake
19 BuildRequires: gd-devel >= 2.0.1
20 BuildRequires: gdbm-devel >= 1.8.3
21 BuildRequires: libpcap-devel
22 BuildRequires: libpng-devel
23 BuildRequires: libtiff-devel
24 BuildRequires: libwrap-devel
25 BuildRequires: libtool
26 BuildRequires: ncurses-devel >= 5.2
27 BuildRequires: openssl-devel >= 0.9.7d
28 BuildRequires: readline-devel >= 4.2
29 BuildRequires: zlib-devel
31 Requires(pre): /usr/bin/getgid
32 Requires(pre): /bin/id
33 Requires(pre): /usr/sbin/groupadd
34 Requires(pre): /usr/sbin/useradd
35 Requires(post,preun): /sbin/chkconfig
36 Requires(post,postun): /sbin/ldconfig
37 Requires(postun): /usr/sbin/groupdel
38 Requires(postun): /usr/sbin/userdel
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 ntop is a tool that shows the network usage, similar to what the
43 popular top Unix command does.
46 ntop to narzêdzie, które pokazuje u¿ycie sieci w podobny sposób jak
47 robi to popularna Unixowa komenda top.
66 #mv -f acinclude.m4.in acinclude.m4
73 --with-ossl-root=%{_prefix} \
74 --with-gdchart-root=`pwd`/../gdchart0.94c \
79 --localstatedir=%{_var}/lib/%{name} || true
82 --with-ossl-root=%{_prefix} \
83 --with-gdchart-root=`pwd`/../gdchart0.94c \
86 --localstatedir=%{_var}/lib/%{name}
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT{%{_var}/lib/%{name},/etc/{rc.d/init.d,sysconfig}}
98 DESTDIR=$RPM_BUILD_ROOT
100 #mv $RPM_BUILD_ROOT%{_bindir}/*.pem $RPM_BUILD_ROOT%{_datadir}/%{name}
102 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntop
103 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ntop
104 install %{SOURCE3} $RPM_BUILD_ROOT/etc/ntop.conf
107 rm -rf $RPM_BUILD_ROOT
110 if [ -n "`getgid ntop`" ]; then
111 if [ "`getgid ntop`" != "120" ]; then
112 echo "Error: group ntop doesn't have gid=120. Correct this before installing ntop." 1>&2
116 /usr/sbin/groupadd -g 120 -r -f ntop
118 if [ -n "`id -u ntop 2>/dev/null`" ]; then
119 if [ "`id -u ntop`" != "120" ]; then
120 echo "Error: user ntop doesn't have uid=120. Correct this before installing ntop." 1>&2
124 /usr/sbin/useradd -u 120 -r -d /var/lib/ntop -s /bin/false -c "ntop User" -g ntop ntop 1>&2
129 /sbin/chkconfig --add ntop
130 if [ -f /var/lock/subsys/ntop ]; then
131 /etc/rc.d/init.d/ntop restart >&2
133 echo "Run \"/etc/rc.d/init.d/ntop start\" to start ntop daemon." >&2
137 if [ "$1" = "0" ]; then
138 if [ -f /var/lock/subsys/ntop ]; then
139 /etc/rc.d/init.d/ntop stop 1>&2
141 /sbin/chkconfig --del ntop
146 if [ "$1" = "0" ]; then
147 /usr/sbin/userdel ntop
148 /usr/sbin/groupdel ntop
152 %defattr(644,root,root,755)
153 %doc AUTHORS NEWS README THANKS
154 #ntop/docs/1STRUN.TXT ntop/docs/FAQ
155 %dir %{_var}/lib/%{name}
156 %attr(755,root,root) %{_bindir}/*
157 %attr(755,root,root) %{_libdir}/lib*
158 %attr(755,root,root) %{_datadir}/%{name}
160 %dir %{_libdir}/%{name}
161 %attr(755,root,root) %{_libdir}/%{name}/plugins
163 %attr(754,root,root) /etc/rc.d/init.d/ntop
164 %attr(640,root,root) /etc/sysconfig/ntop
165 %attr(644,ntop,ntop) %config(noreplace) %verify(not size mtime md5) /etc/ntop.conf