2 # - duplicate configure. remove or write down reason.
3 # - configure appears to need gawk
4 # - service ntop init steals terminal (it doesnt finish nor background)
5 # - paths wrong somewhere /var/lib/ntop/ntop is expected (should be without last path component)
6 # - /var/lib/ntop/* should be %ghost
7 # - .la files should be in -devel
8 # - ntop apperars to be daemon, so it should be in _sbindir not in _bindir
10 Summary: Network monitoring tool
11 Summary(pl): Narzêdzie do monitorowania sieci
17 Source0: http://dl.sourceforge.net/ntop/%{name}-%{version}.tgz
18 # Source0-md5: 1c9b4097c2e464b84f2fe8f6626d2b06
20 Source2: %{name}.sysconfig
21 Patch0: %{name}-plugins_makefile.patch
22 Patch1: %{name}-conf.patch
23 Patch2: %{name}-DESTDIR.patch
24 URL: http://www.ntop.org/
25 BuildRequires: autoconf
26 BuildRequires: automake
27 BuildRequires: gd-devel >= 2.0.1
28 BuildRequires: gdbm-devel >= 1.8.3
29 BuildRequires: libpcap-devel
30 BuildRequires: libpng-devel
31 BuildRequires: libtiff-devel
32 BuildRequires: libwrap-devel
33 BuildRequires: libtool
34 BuildRequires: ncurses-devel >= 5.2
35 BuildRequires: openssl-devel >= 0.9.7d
36 BuildRequires: readline-devel >= 4.2
37 BuildRequires: rpmbuild(macros) >= 1.202
38 BuildRequires: zlib-devel
40 Requires(pre): /bin/id
41 Requires(pre): /usr/bin/getgid
42 Requires(pre): /usr/sbin/groupadd
43 Requires(pre): /usr/sbin/useradd
44 Requires(post,preun): /sbin/chkconfig
45 Requires(post,postun): /sbin/ldconfig
46 Requires(postun): /usr/sbin/groupdel
47 Requires(postun): /usr/sbin/userdel
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 ntop is a tool that shows the network usage, similar to what the
54 popular top Unix command does.
57 ntop to narzêdzie, które pokazuje u¿ycie sieci w podobny sposób jak
58 robi to popularna uniksowa komenda top.
67 #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}
93 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT{%{_var}/lib/%{name},/etc/{rc.d/init.d,sysconfig}}
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/etc/ntop.conf
103 mv $RPM_BUILD_ROOT%{_libdir}/lib*Plugin*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
104 rm $RPM_BUILD_ROOT%{_libdir}/*.a
107 rm -rf $RPM_BUILD_ROOT
110 %groupadd -g 120 ntop
111 %useradd -u 120 -d /var/lib/ntop -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 %{_var}/lib/%{name}
141 %attr(755,root,root) %{_bindir}/*
142 %attr(755,root,root) %{_libdir}/lib*
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) /etc/sysconfig/ntop
149 %attr(750,root,ntop) %dir /etc/ntop
150 %attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) /etc/ntop/*
151 %attr(644,root,ntop) %config(noreplace) %verify(not md5 mtime size) /etc/ntop.conf