Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
:
netflow
>
flowd
> flowd.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File flowd.spec of Package flowd
Summary: The flowd NetFlow collector daemon Name: flowd Version: 0.9.1 Release: 10 #URL: http://www.mindrot.org/flowd.html URL: http://code.google.com/p/flowd/ Source0: flowd-%{version}.tar.bz2 Patch0: flowd-suse-init.patch License: BSD Group: Productivity/Networking/Diagnostic BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %if 0%{?centos_version} || 0%{?fedora_version} || 0%{?rhel_version} PreReq: initscripts %endif BuildRequires: byacc BuildRequires: glibc-devel BuildRequires: python >= 2.3 python-devel %if 0%{?fedora_version} >= 7 BuildRequires: perl-ExtUtils-MakeMaker %endif %package -n perl-Flowd Summary: Perl API to access flowd logfiles Group: Productivity/Networking/Diagnostic Requires: perl Obsoletes: flowd-perl Provides: flowd-perl %package -n python-Flowd Summary: Python API to access flowd logfiles Group: Productivity/Networking/Diagnostic Requires: python Obsoletes: flowd-python Provides: flowd-python %package tools Summary: Collection of example flowd tools Group: Productivity/Networking/Diagnostic %package devel Summary: C API to access flowd logfiles Group: Development %description This is flowd, a NetFlow collector daemon intended to be small, fast and secure. It features some basic filtering to limit or tag the flows that are recorded and is privilege separated, to limit security exposure from bugs in flowd itself. %description -n perl-Flowd This is a Perl API to the binary flowd network flow log format and an example reader application %description -n python-Flowd This is a Python API to the binary flowd network flow log format and an example reader application %description tools A collection of tools for use with flowd %description devel This is a C API to the binary flowd network flow log format. %prep %setup %patch0 %build [ -f configure -a -f flowd-config.h.in ] || autoreconf %configure --enable-gcc-warnings %__make ./setup.py build (cd Flowd-perl ; CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL \ PREFIX=%{buildroot}/usr INSTALLDIRS=vendor; make ) %install %__make DESTDIR=%{buildroot} install # Misc stuff install -d -m755 %{buildroot}/var/lib/flowd %if 0%{?centos_version} || 0%{?fedora_version} || 0%{?rhel_version} install -D -m755 flowd.init %{buildroot}/etc/rc.d/init.d/flowd %endif %if 0%{?suse_version} install -D -m755 flowd.init.suse %{buildroot}/etc/init.d/flowd ln -sf ../../etc/init.d/flowd %{buildroot}%{_sbindir}/rcflowd %endif # Perl module (cd Flowd-perl; make install) find %{buildroot}/usr/lib*/perl5 \ \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \; find %{buildroot}/usr/lib*/perl5 \ -type f -print | sed "s@^%{buildroot}@@g" > flowd-perl-filelist find %{buildroot}%{_mandir} \ -type f | grep -E '[0-9]pm(.gz)?$' | \ sed "s@^%{buildroot}@@g;s@\$@*@" >> \ flowd-perl-filelist if [ "$(cat flowd-perl-filelist)X" = "X" ] ; then echo "ERROR: EMPTY FILE LIST" exit -1 fi # Python module ./setup.py install --prefix=%{_prefix} --optimize 1 --root=%{buildroot} --record=INSTALLED_FILES sed -e 's|/[^/]*$||' INSTALLED_FILES | grep "site-packages/" | \ sort -u | awk '{ print "%attr(755,root,root) %dir " $1}' > INSTALLED_DIRS cat INSTALLED_FILES INSTALLED_DIRS > INSTALLED_OBJECTS # fix doc permissions #chmod 0644 tools/* reader.py reader.pl find tools -type f -exec chmod 0644 {} \; chmod 0644 reader.py reader.pl %clean rm -rf %{buildroot} %pre %{_sbindir}/groupadd -r _flowd 2>/dev/null || : %{_sbindir}/useradd -d /var/lib/flowd -s /bin/false -g _flowd -M -r _flowd \ 2>/dev/null || : %post %{fillup_and_insserv} %postun %if 0%{?suse_version} %insserv_cleanup %else /sbin/service flowd condrestart > /dev/null 2>&1 || : %endif %preun %if 0%{?suse_version} %stop_on_removal %else if [ "$1" = 0 ] then /sbin/service flowd stop > /dev/null 2>&1 || : /sbin/chkconfig --del flowd fi %endif %files %defattr(-,root,root) %doc ChangeLog LICENSE README TODO %dir /var/lib/flowd %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/flowd.conf %attr(0644,root,root) %{_mandir}/man5/flowd.conf.5* %attr(0644,root,root) %{_mandir}/man8/flowd.8* %attr(0644,root,root) %{_mandir}/man8/flowd-reader.8* %attr(0755,root,root) %{_bindir}/flowd-reader %if 0%{?centos_version} || 0%{?fedora_version} || 0%{?rhel_version} %attr(0755,root,root) %config /etc/rc.d/init.d/flowd %endif %if 0%{?suse_version} %attr(0755,root,root) %config /etc/init.d/flowd %attr(0755,root,root) %{_sbindir}/rcflowd %endif %attr(0755,root,root) %{_sbindir}/flowd %files -n perl-Flowd -f flowd-perl-filelist %defattr(-,root,root) %doc reader.pl %dir %{perl_vendorarch}/auto/Flowd %files -n python-Flowd -f INSTALLED_OBJECTS %defattr(-,root,root) %doc reader.py %files tools %defattr(-,root,root) %doc tools/* %files devel %defattr(-,root,root) %dir %attr(0755,root,root) %{_includedir}/flowd %attr(0644,root,root) %{_includedir}/flowd/* %attr(0644,root,root) %{_libdir}/libflowd.a %changelog * Sat May 02 2009 Carsten Schoene <cs@linux-administrator.com> - 0.9-10 - changed python & perl subpackage names - fix pre/post scripts - add suse init patch - use suse init script on suse platforms - fix permissions * Wed Nov 03 2004 Damien Miller <djm@mindrot.org> - Add devel subpackage * Fri Sep 24 2004 Damien Miller <djm@mindrot.org> - Add tools subpackage * Tue Aug 17 2004 Damien Miller <djm@mindrot.org> - Unbreak for Redhat 9 * Mon Aug 16 2004 Damien Miller <djm@mindrot.org> - Make Python package optional, Redhat 9 doesn't have support for socket.inet_ntop, which flowd.py needs * Fri Aug 13 2004 Damien Miller <djm@mindrot.org> - Subpackages for perl and python modules * Tue Aug 03 2004 Damien Miller <djm@mindrot.org> - Initial RPM spec