2 # - service ntop init steals terminal (it doesn't finish nor background)
3 # - paths wrong somewhere /var/lib/ntop/ntop is expected (should be without last path component)
4 # - /var/lib/ntop/* should be %ghost
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: cd29a876b34a7dd76555e9acd8f160bb
15 Source2: %{name}.sysconfig
16 Patch0: %{name}-plugins_makefile.patch
17 Patch1: %{name}-conf.patch
18 Patch2: %{name}-nolibs.patch
19 Patch3: %{name}-config.patch
20 Patch4: %{name}-am.patch
21 URL: http://www.ntop.org/
22 BuildRequires: autoconf
23 BuildRequires: automake
25 BuildRequires: gd-devel >= 2.0.1
26 BuildRequires: gdbm-devel >= 1.8.3
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: zlib-devel
37 # for xmldump plugin (disabled as it's broken anyway - wants additional -I
38 # to enable, and then fails to build)
39 #BuildRequires: gdome2-devel
40 #BuildRequires: glib-devel
41 #BuildRequires: libxml2-devel
42 Requires(post,postun): /sbin/ldconfig
43 Requires(post,preun): /sbin/chkconfig
44 Requires(postun): /usr/sbin/groupdel
45 Requires(postun): /usr/sbin/userdel
46 Requires(pre): /bin/id
47 Requires(pre): /usr/bin/getgid
48 Requires(pre): /usr/sbin/groupadd
49 Requires(pre): /usr/sbin/useradd
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 %define _localstatedir /var/lib/ntop
58 ntop is a tool that shows the network usage, similar to what the
59 popular top Unix command does.
62 ntop to narzêdzie, które pokazuje u¿ycie sieci w podobny sposób jak
63 robi to popularna uniksowa komenda top.
73 # kill libtool.m4 copy
74 cp -f acinclude.m4.ntop acinclude.m4
81 # "verified.awk -u" calls require gawk
87 --with-ossl-root=%{_prefix} \
93 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT{%{_localstatedir},/etc/{rc.d/init.d,sysconfig},%{_sbindir}}
97 DESTDIR=$RPM_BUILD_ROOT
99 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntop
100 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ntop
101 install packages/RedHat/ntop.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/ntop.conf
104 rm -f $RPM_BUILD_ROOT%{_libdir}{,/ntop/plugins}/*.la
107 rm -rf $RPM_BUILD_ROOT
110 %groupadd -g 120 ntop
111 %useradd -u 120 -d %{_localstatedir} -s /bin/false -c "ntop User" -g ntop ntop
115 /sbin/chkconfig --add ntop
116 if [ -f /var/lock/subsys/ntop ]; then
117 /etc/rc.d/init.d/ntop restart >&2
119 echo "Run \"/etc/rc.d/init.d/ntop start\" to start ntop daemon." >&2
123 if [ "$1" = "0" ]; then
124 if [ -f /var/lock/subsys/ntop ]; then
125 /etc/rc.d/init.d/ntop stop 1>&2
127 /sbin/chkconfig --del ntop
132 if [ "$1" = "0" ]; then
138 %defattr(644,root,root,755)
139 %doc AUTHORS ChangeLog NEWS README THANKS
140 %attr(770,root,ntop) %dir %{_localstatedir}
141 %attr(755,root,root) %{_sbindir}/*
142 %attr(755,root,root) %{_libdir}/lib*.so
143 %attr(755,root,root) %{_datadir}/%{name}
144 %dir %{_libdir}/%{name}
145 %attr(755,root,root) %{_libdir}/%{name}/plugins
147 %attr(754,root,root) /etc/rc.d/init.d/ntop
148 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntop
149 %attr(750,root,ntop) %dir %{_sysconfdir}/ntop
150 %attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop/*
151 %attr(644,root,ntop) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ntop.conf