Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
ntop
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 31
[-]
[+]
Added
ntop.spec
@@ -0,0 +1,366 @@ +# +# spec file for package ntop (Version 3.3) +# +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + + +Name: ntop +BuildRequires: dos2unix freetype2-devel gcc-c++ gd-devel gdbm-devel libart_lgpl-devel libjpeg-devel libpng-devel lsof mysql-devel net-snmp-devel openssl-devel readline-devel +%if 0%{?suse_version} +BuildRequires: tcpd-devel xorg-x11-devel +PreReq: /bin/cat %fillup_prereq %insserv_prereq sysconfig +%if 0%{?suse_version} > 1020 +BuildRequires: fdupes libpcap-devel rrdtool-devel +%else +BuildRequires: libpcap rrdtool +%endif +%else +%if 0%{?fedora_version} +PreReq: /bin/cat /sbin/insserv /bin/fillup sysconfig +BuildRequires: libpcap-devel rrdtool-devel xorg-x11-devel +%else +%if 0%{?mandriva_version} +BuildRequires: libpcap-devel librrdtool-devel rrdtool +PreReq: /bin/cat /sbin/insserv /bin/fillup sysconfig +%endif +%endif +%endif +License: GPL v2 or later +Group: Productivity/Networking/Diagnostic +AutoReqProv: on +Version: 3.3 +Release: 66 +Summary: Web-Based Network Traffic Monitor +Source: %{name}-%{version}.tar.bz2 +Source2: rcntop +Source3: rc.config.ntop +Source4: passcheck.c +Source5: README.SuSE +Patch: ntop-%{version}.diff +Patch2: rrdPlugin.diff +Patch4: dotpath.diff +Patch5: libtool.diff +Url: http://www.ntop.org +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +Ntop is a Web-based traffic monitor that shows network usage. It can be +used in both interactive or Web mode using the embedded Web server. + + + +Authors: +-------- + Luca Deri <deri@ntop.org> + +%prep +%setup -q -n %{name}-%{version} +%patch +%patch2 +%patch4 +%patch5 + +%build +%{?suse_update_config:%{suse_update_config -f gdchart* ntop . }} +# ntop wants to setup the files for the newer autoconf itself: +aclocal +./autogen.sh +# NTOP_AUTOREBUILD=yes ./configure || echo "new autoconf prepared" +# now we are ready for the real configure... +%if "%(xft-config --prefix)" == "/usr" +CFLAGS="$RPM_OPT_FLAGS -DHAVE_NCURSES_H" \ +./configure \ + --sysconfdir=/etc \ + --prefix=/usr \ + --mandir=%{_mandir} \ + --localstatedir=/var/lib \ + --libdir=%{_libdir} \ + --datadir=%{_datadir} \ + --x-libraries=/usr/%_lib \ + --disable-static \ + --enable-sslv3 \ + --enable-i18n +%else +CFLAGS="$RPM_OPT_FLAGS -DHAVE_NCURSES_H -L/usr/X11R6/%_lib -I/usr/X11R6/include" \ +./configure \ + --sysconfdir=/etc \ + --prefix=/usr \ + --mandir=%{_mandir} \ + --localstatedir=/var/lib \ + --libdir=%{_libdir} \ + --datadir=%{_datadir} \ + --x-libraries=/usr/X11R6/%_lib \ + --disable-static \ + --enable-sslv3 \ + --enable-i18n +%endif +make %{?jobs:-j%jobs} +gcc -o passcheck $RPM_OPT_FLAGS %{SOURCE4} -lgdbm + +%install +# remove old (pre SuSE Linux 7.0) README.Suse provided by ntop +rm -f docs/README.Suse +mkdir -p $RPM_BUILD_ROOT/etc +DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT +# use the relinked librrdPlugin.so instead of the copied plugin +cp $RPM_BUILD_ROOT%{_libdir}/librrdPlugin.so \ + $RPM_BUILD_ROOT%{_libdir}/ntop/plugins/rrdPlugin.so +# rm $RPM_BUILD_ROOT%{_libdir}/ntop/plugins/rrdPlugin.so +make install-man DESTDIR=$RPM_BUILD_ROOT +make install-data-as DESTDIR=$RPM_BUILD_ROOT +chmod 644 $RPM_BUILD_ROOT/etc/ntop/oui.txt.gz +chmod 644 $RPM_BUILD_ROOT/etc/ntop/specialMAC.txt.gz +install -d $RPM_BUILD_ROOT/etc/init.d/ +install -d $RPM_BUILD_ROOT/usr/sbin/ +install -d $RPM_BUILD_ROOT/var/adm/fillup-templates/ +install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/etc/init.d/ntop +ln -sf ../../etc/init.d/ntop $RPM_BUILD_ROOT/usr/sbin/rcntop +install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.ntop +install -m 755 passcheck $RPM_BUILD_ROOT/usr/sbin/passcheck +mkdir -p $RPM_BUILD_ROOT/var/lib/ntop +cp ntop-cert.pem docs/ +cp %SOURCE5 . +find $RPM_BUILD_ROOT/usr/share/ntop/html -type f -print0 | xargs -0 chmod 644 +%if 0%{?suse_version} > 1020 +%fdupes $RPM_BUILD_ROOT/usr/share/ntop/html/ +%endif +find $RPM_BUILD_ROOT -name "*.la" | xargs rm +rm docs/ntop-autotools.vsd +dos2unix docs/RedHat-rpmbuild-HOWTO.txt + +%post +# Are we in update mode? +if [ ${1:-0} -gt 1 ]; then + if [ -f etc/sysconfig/ntopd -a ! -L etc/sysconfig/ntopd ]; then + echo "Renaming config file ntopd to ntop" + mv etc/sysconfig/ntopd etc/sysconfig/ntop + fi +fi +chown wwwrun:www /usr/share/ntop /var/lib/ntop +%if 0%{?suse_version} > 1010 +etc/sysconfig/network/scripts/hwdesc2iface etc/sysconfig/ntop NTOPD_IFACE +%endif +/sbin/ldconfig +%{fillup_and_insserv -n ntop ntop } + +%postun +/sbin/ldconfig +%{insserv_cleanup} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc docs/* AUTHORS CONTENTS COPYING ChangeLog MANIFESTO NEWS PORTING +%doc SUPPORT_NTOP.txt THANKS README.SuSE +%config /etc/init.d/ntop +/usr/bin/ntop +%{_libdir}/lib*.so +/usr/sbin/rcntop +/usr/sbin/passcheck +%dir %attr(-,wwwrun,www) /usr/share/ntop +/usr/share/ntop/html +%dir %{_libdir}/ntop +%{_libdir}/ntop/plugins +%{_mandir}/man8/ntop.8.* +/var/adm/fillup-templates/sysconfig.ntop +%dir %attr(-,wwwrun,www) /var/lib/ntop +%dir /etc/ntop +/etc/ntop/ntop-cert.pem +/etc/ntop/AS-list.txt.gz +/etc/ntop/etter.finger.os.gz +/etc/ntop/oui.txt.gz +/etc/ntop/p2c.opt.table.gz +/etc/ntop/specialMAC.txt.gz + +%changelog +* Fri Feb 29 2008 lmichnovic@suse.cz +- fixed obsoleted run_ldconfig macro +- spec file adjustment for seamless build for older distributions + in BuildService +* Tue Aug 07 2007 bg@suse.de +- remove first (wrong) definition of free +* Wed Aug 01 2007 bg@suse.de +- update to version 3.3 (mainly bugfixes and automake changes) +- fix some rpmlint warnings +* Thu Jul 26 2007 prusnak@suse.cz +- changed libpcap to libpcap-devel in BuildRequires +* Fri Jun 22 2007 dmueller@suse.de +- update BuildRequires +* Tue May 08 2007 schwab@suse.de +- Fix default location of dot.