Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 504a3b1371feb6c6736ad5cc73c1c9d0 > files > 6

ntop-2.1.3-1mdk.src.rpm

%define name ntop
%define fname ntop
%define version 2.1.3
%define release 1mdk

%define ntop_gid 120
%define ntop_uid 120
%define ntop_group ntop
%define ntop_user  ntop

Summary: A network usage tool
Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
Source: %{fname}-%{version}.tar.bz2
Source1: %{name}.init
Source2: %{name}.logrotate
Patch0: ntop-BMS0106-sin-ceil-crypt.patch.bz2
Patch1: ntop-2.1.3-sysgd.patch.bz2
URL: http://www.ntop.org
Group: Monitoring
Prefix: %{_prefix}
BuildRoot: %{_tmppath}/%{fname}-%{version}-root
BuildRequires: libpcap-devel
BuildRequires: ncurses-devel
BuildRequires: readline-devel
BuildRequires: tcp_wrappers-devel
BuildRequires: libgdbm2-devel
BuildRequires: openssl-devel

%description
Ntop is a network and traffic analyzer that provides a wealth of
information on various networking hosts and protocols. ntop is
primarily accessed via a built-in web interface. Optionally, data may
be stored into a database for analysis or extracted from the web
server in formats suitable for manipulation in perl or php.

%prep
%setup -q
%patch0 -p0 -b .sin
%patch1 -p1 -b .sysgd

%build
(cd gdchart0.94c
rm -rf ./gd-1.8.3 ./zlib-1.1.4
%configure
make)
(cd ntop
./autogen.sh -1
%configure	--bindir=%{_sbindir} \
		--enable-optimize \
		--enable-tcpwrap \
		--enable-sslv3 \
		--sysconfdir=%{_libdir}%{fname} \
		--mandir=%{_mandir} \
		--localstatedir=%{_localstatedir}
make
)

%install
rm -rf $RPM_BUILD_ROOT
cd ntop
mkdir -p $RPM_BUILD_ROOT%{_sbindir} \
	$RPM_BUILD_ROOT%{_libdir} \
	$RPM_BUILD_ROOT%{_localstatedir}/%{fname} \
	$RPM_BUILD_ROOT/%{_libdir}%{fname} \
	$RPM_BUILD_ROOT%{_mandir}/{man1,man8} \
	$RPM_BUILD_ROOT%{_initrddir} \
	$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d \
	$RPM_BUILD_ROOT%{_prefix}/libntop/%{name}

make install DESTDIR=$RPM_BUILD_ROOT
rmdir $RPM_BUILD_ROOT%{_libdir}/plugins

install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/ntop
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ntop

%pre
/usr/sbin/groupadd -g %{ntop_gid} -r %{ntop_group} 2>/dev/null || :
/usr/sbin/useradd -M -s /bin/false \
	-d %{_localstatedir}/%{name} \
	-c "system user for ntop" \
	-g %{ntop_group} -r -u %{ntop_uid} %{ntop_user} 2>/dev/null || :

%post
/sbin/ldconfig
%_post_service ntop

%preun
%_preun_service ntop

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc ntop/AUTHORS ntop/CONTENTS ntop/COPYING ntop/ChangeLog ntop/NEWS
%doc ntop/PORTING ntop/MANIFESTO ntop/SUPPORT_NTOP.txt
%doc ntop/THANKS ntop/docs/FAQ ntop/docs/HACKING ntop/docs/KNOWN_BUGS 
%doc ntop/docs/FILES ntop/docs/README
%doc ntop/docs/1STRUN.txt
%config %{_sysconfdir}/logrotate.d/ntop
%config %{_initrddir}/ntop
%{_sbindir}/*
%{_mandir}/*/*
%{_datadir}/%{fname}/*
%{_libdir}/*
#%{_prefix}/libntop/%{name}/ntop-cert.pem
%attr(710,%{ntop_user},%{ntop_group}) %dir %{_localstatedir}/ntop

%changelog
* Thu Feb 20 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.1.3-1mdk
- Version 2.1.3.

* Thu Sep 12 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.1.2-1mdk
- Updated to release 2.1.2.

* Wed Jul 24 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.0-3mdk
- rebuild for new readline

* Thu Feb 28 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0-2mdk
- Added fixes from Olivier Thauvin <thauvin@aerov.jussieu.fr>:
	- Fix --localstatedir=%%{_localstatedir} and creating
	  %%{_localstatedir}/ntop.
	- Add share/ntop files missing in previous release.

* Tue Feb 26 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0-1mdk
- version 2.0.

* Wed Aug 22 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.3.1-3mdk
- rebuild

* Sun Apr 22 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.3.1-2mdk
- Recompile again last gcc.
- Fix glibc22 compilation.

* Thu Aug 22 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.3.1-1mdk
- initial release.