Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
:
netflow
>
ntopng
> ntopng.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File ntopng.spec of Package ntopng
%define svnbuild 0 %define svnrel 6932 Name: ntopng Version: 1.1 Release: 0 Summary: Next Generation NTOP Url: http://www.ntop.org/ License: GPLv3 Group: System/Monitoring Source0: %{name}-%{version}_%{svnrel}.tar.bz2 Source1: nDPI.tar.bz2 Source6: ntopng.init Source7: sysconfig.ntopng Source11: GeoIPASNum.dat.gz Source12: GeoIPASNumv6.dat.gz Source13: GeoLiteCity.dat.gz Source14: GeoLiteCityv6.dat.gz Patch0: %{name}-init.patch Patch1: %{name}-prefix.patch Patch11: ntopng-1.0.2_json-c_Werror.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: gcc-c++ automake autoconf %if 0%{?suse_version} > 1020 BuildRequires: fdupes %endif %if 0%{?suse_version} >= 1010 || 0%{?rhel} || 0%{?centos_version} || 0%{?fedora_version} BuildRequires: libpcap-devel %else BuildRequires: libpcap %endif %if 0%{?suse_version} > 1030 BuildRequires: libgnutls-devel %else BuildRequires: gnutls-devel %endif BuildRequires: libxml2-devel BuildRequires: glib2-devel BuildRequires: libGeoIP-devel %if 0%{?suse_version} Recommends: redis %endif %description Next generation is a rewritten version of NTOP using C++. %prep %if %svnbuild %setup -a 1 %else %setup -n %{name}-%{version}_%{svnrel} %endif %patch0 %patch1 %patch11 %build %configure %__make %install mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_datadir}/ntopng %{buildroot}%{_mandir}/man8 mkdir -p %{buildroot}%{_datadir}/ntopng/third-party/redis-lua/src/ mkdir -p %{buildroot}/etc/init %{buildroot}/etc/init.d %{buildroot}/etc/ntopng mkdir -p %{buildroot}/var/lib/ntopng cp ntopng %{buildroot}%{_bindir} cp ntopng.8 %{buildroot}%{_mandir}/man8 cp -r httpdocs scripts %{buildroot}%{_datadir}/ntopng cp packages/etc/init/ntopng.conf %{buildroot}/etc/init cp packages/etc/init.d/ntopng %{buildroot}/etc/init.d cp third-party/redis-lua/src/redis.lua %{buildroot}%{_datadir}/ntopng/third-party/redis-lua/src/ find %{buildroot} -name ".svn" | xargs /bin/rm -rf find %{buildroot} -name "*~" | xargs /bin/rm -f mkdir -p %{buildroot}%{_datadir}/ntopng/httpdocs/geoip for src in %{S:11} %{S:12} %{S:13} %{S:14} ; do out=`basename ${src} .gz` gunzip -c ${src} > %{buildroot}%{_datadir}/ntopng/httpdocs/geoip/${out} done %if 0%{?suse_version} %__install -D -m755 %{S:6} %{buildroot}%{_sysconfdir}/init.d/%{name} %__install -D -m644 %{S:7} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name} %endif chmod -x %{buildroot}%{_datadir}/ntopng/httpdocs/font-awesome/font/fontawesome-webfont.svg %__install -d %{buildroot}%{_sbindir} ln -sf ../../etc/init.d/ntopng %{buildroot}%{_sbindir}/rcntopng %if 0%{?suse_version} > 1020 # create hardlinks for the rest %fdupes $RPM_BUILD_ROOT%{_datadir}/ntopng %endif %post %if 0%{?suse_version} %fillup_and_insserv %else chkconfig --add %{name} || : %endif %postun %if 0%{?suse_version} %restart_on_update nprobe %insserv_cleanup %else if [ "$1" == "1" ] ; then # upgrade service %{name} restart || : fi if [ "$1" == "0" ] ; then # uninstall chkconfig --del %{name} || : fi %endif %preun %if 0%{?suse_version} %stop_on_removal nprobe %else service %{name} stop || : %endif %files %defattr(-,root,root) %{_bindir}/ntopng %{_sbindir}/rcntopng %{_mandir}/man8/ntopng.8* %dir /etc/ntopng %dir /etc/init %config /etc/init/ntopng.conf /etc/init.d/ntopng %if 0%{?suse_version} /var/adm/fillup-templates/sysconfig.%{name} %endif %dir %{_datadir}/ntopng %{_datadir}/ntopng/* %doc README.* %dir %attr(0755,nobody,nobody) /var/lib/ntopng %clean rm -rf %{buildroot} %changelog