2 # - duplicate configure. remove or write down reason.
3 # - configure appears to need gawk
5 Summary: Network monitoring tool
6 Summary(pl): Narzêdzie do monitorowania sieci
12 Source0: http://dl.sourceforge.net/ntop/%{name}-%{version}.tgz
13 # Source0-md5: 1c9b4097c2e464b84f2fe8f6626d2b06
15 Source2: %{name}.sysconfig
16 Patch1: %{name}-plugins_makefile.patch
17 Patch2: %{name}-conf.patch
18 Patch3: %{name}-DESTDIR.patch
19 URL: http://www.ntop.org/
20 BuildRequires: autoconf
21 BuildRequires: automake
22 BuildRequires: gd-devel >= 2.0.1
23 BuildRequires: gdbm-devel >= 1.8.3
24 BuildRequires: libpcap-devel
25 BuildRequires: libpng-devel
26 BuildRequires: libtiff-devel
27 BuildRequires: libwrap-devel
28 BuildRequires: libtool
29 BuildRequires: ncurses-devel >= 5.2
30 BuildRequires: openssl-devel >= 0.9.7d
31 BuildRequires: readline-devel >= 4.2
32 BuildRequires: rpmbuild(macros) >= 1.159
33 BuildRequires: zlib-devel
35 Requires(pre): /bin/id
36 Requires(pre): /usr/bin/getgid
37 Requires(pre): /usr/sbin/groupadd
38 Requires(pre): /usr/sbin/useradd
39 Requires(post,preun): /sbin/chkconfig
40 Requires(post,postun): /sbin/ldconfig
41 Requires(postun): /usr/sbin/groupdel
42 Requires(postun): /usr/sbin/userdel
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 ntop is a tool that shows the network usage, similar to what the
49 popular top Unix command does.
52 ntop to narzêdzie, które pokazuje u¿ycie sieci w podobny sposób jak
53 robi to popularna uniksowa komenda top.
62 #mv -f acinclude.m4.in acinclude.m4
69 --with-ossl-root=%{_prefix} \
70 --with-gdchart-root=`pwd`/../gdchart0.94c \
75 --localstatedir=%{_var}/lib/%{name} || true
78 --with-ossl-root=%{_prefix} \
79 --with-gdchart-root=`pwd`/../gdchart0.94c \
82 --localstatedir=%{_var}/lib/%{name}
90 rm -rf $RPM_BUILD_ROOT
91 install -d $RPM_BUILD_ROOT{%{_var}/lib/%{name},/etc/{rc.d/init.d,sysconfig}}
94 DESTDIR=$RPM_BUILD_ROOT
96 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntop
97 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ntop
98 install packages/RedHat/ntop.conf.sample $RPM_BUILD_ROOT/etc/ntop.conf
100 mv $RPM_BUILD_ROOT%{_libdir}/lib*Plugin*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
101 rm $RPM_BUILD_ROOT%{_libdir}/*.a
104 rm -rf $RPM_BUILD_ROOT
107 if [ -n "`/usr/bin/getgid ntop`" ]; then
108 if [ "`/usr/bin/getgid ntop`" != "120" ]; then
109 echo "Error: group ntop doesn't have gid=120. Correct this before installing ntop." 1>&2
113 /usr/sbin/groupadd -g 120 ntop
115 if [ -n "`/bin/id -u ntop 2>/dev/null`" ]; then
116 if [ "`/bin/id -u ntop`" != "120" ]; then
117 echo "Error: user ntop doesn't have uid=120. Correct this before installing ntop." 1>&2
121 /usr/sbin/useradd -u 120 -d /var/lib/ntop -s /bin/false \
122 -c "ntop User" -g ntop ntop 1>&2
127 /sbin/chkconfig --add ntop
128 if [ -f /var/lock/subsys/ntop ]; then
129 /etc/rc.d/init.d/ntop restart >&2
131 echo "Run \"/etc/rc.d/init.d/ntop start\" to start ntop daemon." >&2
135 if [ "$1" = "0" ]; then
136 if [ -f /var/lock/subsys/ntop ]; then
137 /etc/rc.d/init.d/ntop stop 1>&2
139 /sbin/chkconfig --del ntop
144 if [ "$1" = "0" ]; then
150 %defattr(644,root,root,755)
151 %doc AUTHORS ChangeLog NEWS README THANKS
152 %attr(770,root,ntop) %dir %{_var}/lib/%{name}
153 %attr(755,root,root) %{_bindir}/*
154 %attr(755,root,root) %{_libdir}/lib*
155 %attr(755,root,root) %{_datadir}/%{name}
156 %dir %{_libdir}/%{name}
157 %attr(755,root,root) %{_libdir}/%{name}/plugins
159 %attr(754,root,root) /etc/rc.d/init.d/ntop
160 %attr(640,root,root) /etc/sysconfig/ntop
161 %attr(750,root,ntop) %dir /etc/ntop
162 %attr(640,root,ntop) %config(noreplace) %verify(not size mtime md5) /etc/ntop/*
163 %attr(644,root,ntop) %config(noreplace) %verify(not size mtime md5) /etc/ntop.conf