3 %bcond_with mysql # with mysql support
5 Summary: Network monitoring tool
6 Summary(pl.UTF-8): Narzędzie do monitorowania sieci
12 Source0: http://dl.sourceforge.net/ntop/%{name}-%{version}.tar.gz
13 # Source0-md5: 19c6a582c285ffae18bf0c3b599d184e
15 Source2: %{name}.sysconfig
16 Patch0: %{name}-conf.patch
17 Patch1: %{name}-config.patch
18 Patch2: %{name}-am.patch
19 URL: http://www.ntop.org/
20 BuildRequires: autoconf
21 BuildRequires: automake >= 1.6
23 BuildRequires: gd-devel >= 2.0.1
24 BuildRequires: gdbm-devel >= 1.8.3
25 BuildRequires: gdome2-devel
26 BuildRequires: glib2-devel
27 BuildRequires: libpcap-devel
28 BuildRequires: libpng-devel
29 BuildRequires: libtiff-devel
30 BuildRequires: libtool
31 BuildRequires: libwrap-devel
32 BuildRequires: ncurses-devel >= 5.2
33 BuildRequires: openssl-devel >= 0.9.7d
34 BuildRequires: readline-devel >= 4.2
35 BuildRequires: rpmbuild(macros) >= 1.202
36 BuildRequires: rpmbuild(macros) >= 1.268
37 BuildRequires: rrdtool-devel >= 1.1.0
38 BuildRequires: zlib-devel
39 Requires(post,postun): /sbin/ldconfig
40 Requires(post,preun): /sbin/chkconfig
41 Requires(postun): /usr/sbin/groupdel
42 Requires(postun): /usr/sbin/userdel
43 Requires(pre): /bin/id
44 Requires(pre): /usr/bin/getgid
45 Requires(pre): /usr/sbin/groupadd
46 Requires(pre): /usr/sbin/useradd
47 %{?with_mysql:Requires: mysql}
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 %define _localstatedir /var/lib
56 ntop is a tool that shows the network usage, similar to what the
57 popular top Unix command does.
59 %description -l pl.UTF-8
60 ntop to narzędzie, które pokazuje użycie sieci w podobny sposób jak
61 robi to popularna uniksowa komenda top.
69 # taken from autogen.sh
70 cp -f /usr/share/aclocal/libtool.m4 libtool.m4.in
71 cat acinclude.m4.in libtool.m4.in acinclude.m4.ntop > acinclude.m4
79 # "verified.awk -u" calls require gawk
84 --with-ossl-root=%{_prefix} \
86 %{?with_mysql:--enable-mysql}
91 rm -rf $RPM_BUILD_ROOT
92 install -d $RPM_BUILD_ROOT{%{_localstatedir}/ntop/rrd,/etc/{rc.d/init.d,sysconfig},%{_sbindir}}
95 DESTDIR=$RPM_BUILD_ROOT
97 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntop
98 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ntop
99 install packages/RedHat/ntop.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/ntop.conf
102 rm -f $RPM_BUILD_ROOT%{_libdir}{,/ntop/plugins}/*.la
105 rm -rf $RPM_BUILD_ROOT
108 %groupadd -g 120 ntop
109 %useradd -u 120 -d %{_localstatedir}/ntop -s /bin/false -c "ntop User" -g ntop ntop
113 /sbin/chkconfig --add ntop
114 %service ntop restart "ntop daemon"
117 if [ "$1" = "0" ]; then
119 /sbin/chkconfig --del ntop
124 if [ "$1" = "0" ]; then
130 %defattr(644,root,root,755)
131 %doc AUTHORS ChangeLog NEWS README THANKS docs/{1STRUN.txt,FAQ}
132 %attr(770,root,ntop) %dir %{_localstatedir}/ntop
133 %attr(770,root,ntop) %dir %{_localstatedir}/ntop/rrd
134 %attr(755,root,root) %{_sbindir}/*
135 %attr(755,root,root) %{_libdir}/lib*.so
136 %attr(755,root,root) %{_datadir}/%{name}
137 %dir %{_libdir}/%{name}
138 %attr(755,root,root) %{_libdir}/%{name}/plugins
140 %attr(754,root,root) /etc/rc.d/init.d/ntop
141 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntop
142 %attr(750,root,ntop) %dir %{_sysconfdir}/ntop
143 %attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop/*
144 %attr(660,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop.conf