Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
ntop
> ntop.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File ntop.spec of Package ntop (Revision 63)
Currently displaying revision
63
,
show latest
# # spec file for package ntop (Version 4.0.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 %define _pkgversion 4.0.3 Name: ntop BuildRequires: dos2unix freetype2-devel gcc-c++ gd-devel gdbm-devel libart_lgpl-devel libjpeg-devel libpng-devel BuildRequires: lsof mysql-devel net-snmp-devel openssl-devel readline-devel wget BuildRequires: libGeoIP-devel lua-devel %if 0%{?suse_version} BuildRequires: tcpd-devel xorg-x11-devel libevent python-devel PreReq: /bin/cat %fillup_prereq %insserv_prereq sysconfig %if 0%{?suse_version} > 1020 BuildRequires: fdupes libpcap-devel rrdtool-devel %else BuildRequires: libpcap rrdtool-devel %endif %if 0%{?suse_version} >= 1110 BuildRequires: libevent-devel %endif %else %if 0%{?fedora_version} PreReq: /bin/cat /sbin/insserv /bin/fillup sysconfig BuildRequires: libpcap-devel rrdtool-devel xorg-x11-devel libevent-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: 4.0.3 Release: 678 Summary: Web-Based Network Traffic Monitor Source: %{name}-%{_pkgversion}.tar.bz2 Source2: rcntop Source3: rc.config.ntop Source4: passcheck.c Source5: README.SuSE Source21: GeoLiteCity.dat.gz Source22: GeoIPASNum.dat.gz Source23: etter.finger.os.gz Source24: oui.txt.gz Patch: ntop-%{version}.diff #Patch1: ntop-%{version}-geoip.patch Patch2: rrdPlugin.diff Patch4: dotpath-%{version}.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}-%{_pkgversion} %patch ##%patch1 %patch2 %patch4 # copy geoip files to source directory - disables download when running configure zcat %{S:21} > GeoLiteCity.dat zcat %{S:22} > GeoIPASNum.dat zcat %{S:23} > etter.finger.os zcat %{S:24} > oui.txt %build %{?suse_update_config:%{suse_update_config -f gdchart* ntop . }} # ntop wants to setup the files for the newer autoconf itself: aclocal %if 0%{?suse_version} <= 1020 mkdir -p m4 %endif ./autogen.sh # NTOP_AUTOREBUILD=yes ./configure || echo "new autoconf prepared" # now we are ready for the real configure... %if "%(xft-config --prefix)" == "/usr" LIBDIR=%{_libdir} 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 LIBDIR=%{_libdir} 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 %__make DESTDIR=%{buildroot} install # use the relinked librrdPlugin.so instead of the copied plugin cp -v $RPM_BUILD_ROOT%{_libdir}/librrdPlugin.so \ $RPM_BUILD_ROOT%{_libdir}/ntop/plugins/rrdPlugin.so # rm $RPM_BUILD_ROOT%{_libdir}/ntop/plugins/rrdPlugin.so %__make DESTDIR=%{buildroot} install-man ##%__make DESTDIR=%{buildroot} install-data-as 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/ %fdupes $RPM_BUILD_ROOT%{_libdir}/ntop/plugins/ %endif find $RPM_BUILD_ROOT -name "*.la" | xargs rm rm docs/ntop-autotools.vsd dos2unix docs/RedHat-rpmbuild-HOWTO.txt # strip bins strip %{buildroot}%{_bindir}/ntop strip %{buildroot}%{_libdir}/libcpacketPlugin-%{version}.so strip %{buildroot}%{_libdir}/libicmpPlugin-%{version}.so #strip %{buildroot}%{_libdir}/liblastSeenPlugin-%{version}.so strip %{buildroot}%{_libdir}/libnetflowPlugin-%{version}.so strip %{buildroot}%{_libdir}/libntop-%{version}.so strip %{buildroot}%{_libdir}/libntopreport-%{version}.so strip %{buildroot}%{_libdir}/librrdPlugin-%{version}.so strip %{buildroot}%{_libdir}/libsflowPlugin-%{version}.so strip %{buildroot}%{_libdir}/ntop/plugins/cpacketPlugin.so strip %{buildroot}%{_libdir}/ntop/plugins/icmpPlugin.so #strip %{buildroot}%{_libdir}/ntop/plugins/lastSeenPlugin.so strip %{buildroot}%{_libdir}/ntop/plugins/netflowPlugin.so strip %{buildroot}%{_libdir}/ntop/plugins/rrdPlugin.so strip %{buildroot}%{_libdir}/ntop/plugins/sflowPlugin.so strip %{buildroot}%{_sbindir}/passcheck %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} %preun %stop_on_removal %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 %{_datadir}/ntop/html %{_datadir}/ntop/perl %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 %config /etc/ntop/oui.txt.gz #/etc/ntop/p2c.opt.table.gz %config /etc/ntop/specialMAC.txt.gz %config /etc/ntop/GeoIPASNum.dat %config /etc/ntop/GeoLiteCity.dat %changelog