c4055b7
%bcond_without  fedora
c4055b7
c4055b7
%global uid 40
c4055b7
%global username flow-tools
c4055b7
%global homedir %{_localstatedir}/%{name}
c4055b7
%global gecos "Network flow monitoring"
c4055b7
c4055b7
Version: 0.68.5
cc09909
Name: flow-tools
cc09909
Summary: Tool set for working with NetFlow data
9285691
Release: 1%{?dist}
cc09909
Group: Applications/System
cc09909
License: BSD 
9285691
URL: http://code.google.com/p/%{name}/
9285691
Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tar.bz2
c4055b7
Source1: flow-capture.init
c4055b7
Source2: flow-capture.sysconfig
9285691
BuildRequires: openssl-devel mysql-devel postgresql-devel zlib-devel 
c4055b7
BuildRequires: bison flex tcp_wrappers-devel
c4055b7
BuildRequires: fedora-usermgmt-devel doxygen
c4055b7
%{?FE_USERADD_REQ}
9285691
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
c4055b7
Requires(post): initscripts chkconfig
c4055b7
Requires(preun): initscripts chkconfig
c4055b7
Requires(postun): initscripts
c4055b7
Provides: group(%username) = %uid
c4055b7
Provides: user(%username) = %uid
c4055b7
cc09909
cc09909
%description
cc09909
Flow-tools is library and a collection of programs used to collect, 
cc09909
send, process, and generate reports from NetFlow data. The tools can be 
cc09909
used together on a single server or distributed to multiple servers for 
cc09909
large deployments. The flow-toools library provides an API for development 
cc09909
of custom applications for NetFlow export versions 1,5,6 and the 14 currently 
cc09909
defined version 8 subversions. A Perl and Python interface have been 
cc09909
contributed and are included in the distribution.
cc09909
cc09909
%package devel
cc09909
Summary: Development files for flow-tools
cc09909
Group: Development/Libraries
a381234
Requires: %{name} = %{version}-%{release} zlib-devel
cc09909
cc09909
%description devel
cc09909
Flow-tools is library and a collection of programs used to collect,
cc09909
send, process, and generate reports from NetFlow data. The tools can be
cc09909
used together on a single server or distributed to multiple servers for
cc09909
large deployments. The flow-toools library provides an API for development
cc09909
of custom applications for NetFlow export versions 1,5,6 and the 14 currently
cc09909
defined version 8 subversions. A Perl and Python interface have been
cc09909
contributed and are included in the distribution.
cc09909
cc09909
This package contains header files required to build applications that use
cc09909
libft.
cc09909
c4055b7
%package rrdtool
c4055b7
Summary: Scripts for flow-tools to build rrd graphs
c4055b7
Group: Applications/System
c4055b7
Requires: %{name} = %{version}-%{release} rrdtool-python
c4055b7
c4055b7
%description rrdtool
c4055b7
Flow-tools is library and a collection of programs used to collect,
c4055b7
send, process, and generate reports from NetFlow data. The tools can be
c4055b7
used together on a single server or distributed to multiple servers for
c4055b7
large deployments. The flow-toools library provides an API for development
c4055b7
of custom applications for NetFlow export versions 1,5,6 and the 14 currently
c4055b7
defined version 8 subversions. A Perl and Python interface have been
c4055b7
contributed and are included in the distribution.
c4055b7
c4055b7
This package contains scripts that use python-rrdtool to create rrds and graphs
c4055b7
from flow data.
c4055b7
c4055b7
%package docs
c4055b7
Summary: HTML and other redundant docs for flow-tools
c4055b7
Group: Applications/System
c4055b7
Requires: %{name} = %{version}-%{release}
c4055b7
c4055b7
%description docs
c4055b7
Flow-tools is library and a collection of programs used to collect,
c4055b7
send, process, and generate reports from NetFlow data. The tools can be
c4055b7
used together on a single server or distributed to multiple servers for
c4055b7
large deployments. The flow-toools library provides an API for development
c4055b7
of custom applications for NetFlow export versions 1,5,6 and the 14 currently
c4055b7
defined version 8 subversions. A Perl and Python interface have been
c4055b7
contributed and are included in the distribution.
c4055b7
c4055b7
This package contains additional documentation, such as man pages in html format.
c4055b7
cc09909
%prep
c4055b7
%setup -q
cc09909
cc09909
%build
9285691
%configure \
9285691
  --localstatedir=%{_localstatedir}/%{name} \
9285691
  --sysconfdir=%{_sysconfdir}/%{name} \
9285691
  --enable-static=no \
9285691
  --with-mysql \
9285691
  --with-postgresql \
9285691
  --with-openssl
9285691
c4055b7
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
c4055b7
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
c4055b7
cc09909
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
cc09909
cc09909
%install
cc09909
rm -rf $RPM_BUILD_ROOT
9285691
make DESTDIR=$RPM_BUILD_ROOT install
cc09909
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
9285691
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/%{name}
c4055b7
install -d $RPM_BUILD_ROOT%{_initrddir}
c4055b7
install -m 0755 %SOURCE1 $RPM_BUILD_ROOT%{_initrddir}/flow-capture
c4055b7
install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
c4055b7
install -m 0644 %SOURCE2 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/flow-capture
cc09909
cc09909
%clean
cc09909
rm -rf $RPM_BUILD_ROOT
cc09909
c4055b7
%pre
c4055b7
%__fe_groupadd %uid -r %username &>/dev/null || :
c4055b7
%__fe_useradd  %uid -r -s /sbin/nologin -d %homedir -M          \
c4055b7
                    -c '%gecos' -g %username %username &>/dev/null || :
c4055b7
c4055b7
%post
c4055b7
/sbin/ldconfig
c4055b7
/sbin/chkconfig --add flow-capture
cc09909
c4055b7
%preun
c4055b7
if [ $1 = 0 ]; then
c4055b7
        /sbin/service flow-capture stop >/dev/null 2>&1
c4055b7
        /sbin/chkconfig --del flow-capture
c4055b7
fi
c4055b7
c4055b7
%postun
c4055b7
/sbin/ldconfig
c4055b7
if [ "$1" -ge "1" ]; then
c4055b7
        /sbin/service flow-capture condrestart >/dev/null 2>&1 || :
c4055b7
fi
c4055b7
c4055b7
%__fe_userdel  %username &>/dev/null || :
c4055b7
%__fe_groupdel %username &>/dev/null || :
cc09909
cc09909
%files 
cc09909
%defattr(-,root,root)
c4055b7
%doc README README.fork COPYING ChangeLog
c4055b7
%{_mandir}/man1/flow-capture.1*
c4055b7
%{_mandir}/man1/flow-cat.1*
c4055b7
%{_mandir}/man1/flow-dscan.1*
c4055b7
%{_mandir}/man1/flow-expire.1*
c4055b7
%{_mandir}/man1/flow-export.1*
c4055b7
%{_mandir}/man1/flow-fanout.1*
c4055b7
%{_mandir}/man1/flow-filter.1*
c4055b7
%{_mandir}/man1/flow-gen.1*
c4055b7
%{_mandir}/man1/flow-header.1*
c4055b7
%{_mandir}/man1/flow-import.1*
c4055b7
%{_mandir}/man1/flow-mask.1*
c4055b7
%{_mandir}/man1/flow-merge.1*
c4055b7
%{_mandir}/man1/flow-nfilter.1*
c4055b7
%{_mandir}/man1/flow-print.1*
c4055b7
%{_mandir}/man1/flow-receive.1*
c4055b7
%{_mandir}/man1/flow-report.1*
c4055b7
%{_mandir}/man1/flow-rptfmt.1*
c4055b7
%{_mandir}/man1/flow-send.1*
c4055b7
%{_mandir}/man1/flow-split.1*
c4055b7
%{_mandir}/man1/flow-stat.1*
c4055b7
%{_mandir}/man1/flow-tag.1*
c4055b7
%{_mandir}/man1/flow-tools-examples.1*
c4055b7
%{_mandir}/man1/flow-tools.1*
c4055b7
%{_mandir}/man1/flow-xlate.1*
c4055b7
%{_bindir}/flow-capture
c4055b7
%{_bindir}/flow-cat
c4055b7
%{_bindir}/flow-dscan
c4055b7
%{_bindir}/flow-expire
c4055b7
%{_bindir}/flow-export
c4055b7
%{_bindir}/flow-fanout
c4055b7
%{_bindir}/flow-filter
c4055b7
%{_bindir}/flow-gen
c4055b7
%{_bindir}/flow-header
c4055b7
%{_bindir}/flow-import
c4055b7
%{_bindir}/flow-mask
c4055b7
%{_bindir}/flow-merge
c4055b7
%{_bindir}/flow-nfilter
c4055b7
%{_bindir}/flow-print
c4055b7
%{_bindir}/flow-receive
c4055b7
%{_bindir}/flow-report
c4055b7
%{_bindir}/flow-rptfmt
c4055b7
%{_bindir}/flow-send
c4055b7
%{_bindir}/flow-split
c4055b7
%{_bindir}/flow-stat
c4055b7
%{_bindir}/flow-tag
c4055b7
%{_bindir}/flow-xlate
cc09909
%{_libdir}/*.so.*
9285691
%dir %{_sysconfdir}/%{name}/
9285691
%dir %{_sysconfdir}/%{name}/cfg/
9285691
%dir %{_sysconfdir}/%{name}/sym/
9285691
%config(noreplace) %{_sysconfdir}/%{name}/cfg/*
9285691
%config(noreplace) %{_sysconfdir}/%{name}/sym/*
c4055b7
%config(noreplace) %{_sysconfdir}/sysconfig/flow-capture
c4055b7
%{_initrddir}/flow-capture
c4055b7
%attr(-,flow-tools,flow-tools) %{_localstatedir}/%{name}/
9285691
%dir %{_datadir}/%{name}/
9285691
%{_datadir}/%{name}/*
cc09909
cc09909
%files devel
cc09909
%defattr(-,root,root,-)
cc09909
%{_libdir}/*.so
cc09909
%{_includedir}/*.h
cc09909
c4055b7
%files rrdtool
c4055b7
%defattr(-,root,root)
c4055b7
%{_bindir}/flow-rpt2rrd
c4055b7
%{_bindir}/flow-log2rrd
c4055b7
%{_mandir}/man1/flow-rpt2rrd.1*
c4055b7
%{_mandir}/man1/flow-log2rrd.1*
c4055b7
c4055b7
%files docs
c4055b7
%defattr(-,root,root)
c4055b7
%doc docs/*.html ChangeLog.old TODO INSTALL SECURITY
c4055b7
cc09909
%changelog
c4055b7
* Thu Feb 25 2010 Paul P Komkoff Jr <i@stingr.net> - 0.68.5
c4055b7
- bunch of fixes from upstream
c4055b7
c4055b7
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.68.4.1-4
c4055b7
- rebuilt with new openssl
c4055b7
c4055b7
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.68.4.1-3
c4055b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
c4055b7
c4055b7
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.68.4.1-2
c4055b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
c4055b7
c4055b7
* Mon Feb  2 2009 Paul P Komkoff Jr <i@stingr.net> - 0.68.4.1-1
c4055b7
- fix for pcap generation, by Dave Plonka
c4055b7
- split out -rrdtool subpackage, for those who don't need rrdtool on their servers.
c4055b7
c4055b7
* Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> - 0.68.4-2
c4055b7
- rebuild for dependencies
c4055b7
c4055b7
* Mon Mar 31 2008 Paul P Komkoff Jr <i@stingr.net> - 0.68.4-1
c4055b7
- New upstream version
c4055b7
c4055b7
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.68.4-0.2.rc1
c4055b7
- Autorebuild for GCC 4.3
c4055b7
c4055b7
* Tue Feb 19 2008 Paul P Komkoff Jr <i@stingr.net> - 0.68.4-0.1.rc1
c4055b7
- new upstream release candidate
c4055b7
c4055b7
* Fri Dec 07 2007 Release Engineering <rel-eng at fedoraproject dot org> - 0.68.3-2
c4055b7
- Rebuild for deps
c4055b7
c4055b7
* Mon Nov 12 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68.3-1
c4055b7
- new upstream release
c4055b7
- build tools as PIE
c4055b7
- get rid of ftpaths.h
c4055b7
- do not ship ftconfig.c
c4055b7
- do not require libft
c4055b7
c4055b7
* Sat Nov  3 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68.2-1
c4055b7
- New upstream release
c4055b7
c4055b7
* Thu Sep 13 2007 Orion Poplawski <orion@cora.nwra.com> - 0.68.1-2
c4055b7
- Add user and init scripts
c4055b7
9285691
* Sun Aug  5 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68.1-1
9285691
- New upstream release
9285691
9285691
* Sun Jul 15 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68.1-0.1.rc3
9285691
- New upstream rc
9285691
9285691
* Sun Jul 15 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68.1-0.1.rc2
9285691
- Switch to 0.68.1 fork
9285691
- Drop all patches
9285691
- Sanitize spec
9285691
4a4e83e
* Sun Mar 25 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68-16
4a4e83e
- getopt() is now in unistd.h
4a4e83e
4a4e83e
* Sun Mar 18 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68-15
4a4e83e
- Add runtime dependency for python-rrdtool
4a4e83e
4a4e83e
* Fri Dec 15 2006 Paul P. Komkoff Jr <i@stingr.net>
4a4e83e
- rebuilt
4a4e83e
4a4e83e
* Thu Dec 14 2006 Jason L Tibbitts III <tibbs@math.uh.edu> - 0.68-13
4a4e83e
- Rebuild for new Postgres
4a4e83e
e515f14
* Thu Nov 16 2006 Paul P Komkoff Jr <i@stingr.net> - 0.68-12
e515f14
- Fix flow report 72 (by reaper@surnet.ru) bz#212928
e515f14
7796f6e
* Sun Sep 10 2006 Paul P Komkoff Jr <i@stingr.net> - 0.68-11
7796f6e
- rebuild
7796f6e
c626ff9
* Sun Jul  9 2006 Paul P Komkoff Jr <i@stingr.net> 0.68-10
c626ff9
- Rebuild
c626ff9
897d754
* Sun Jul  9 2006 Paul P Komkoff Jr <i@stingr.net> 0.68-9
897d754
- Fix build in mock with minimal build environment #197706
897d754
2edfb0e
* Sat Jun 10 2006 Paul P Komkoff Jr <i@stingr.net> 0.68-8
2edfb0e
- Split patches in more convenient way (and bug upstream)
2edfb0e
- Fix 2 unitialized variable bugs
2edfb0e
b76e121
* Sun Feb 19 2006 Paul P Komkoff Jr <i@stingr.net> 0.68-7
b76e121
- Rebuild
b76e121
b3df5d4
* Mon Nov 14 2005 Paul P Komkoff Jr <i@stingr.net> 0.68-6
b3df5d4
- Rebuild
b3df5d4
3eeb44a
* Sun Oct 30 2005 Paul P Komkoff Jr <i@stingr.net> 0.68-5
3eeb44a
- Fix flow-capture segfaults on platforms with 64bit time_t
3eeb44a
a285761
* Thu Oct 20 2005 Paul P Komkoff Jr <i@stingr.net> 0.68-4
a285761
- Fix accidential damage
a285761
a381234
* Wed Oct 19 2005 Paul P Komkoff Jr <i@stingr.net> 0.68-3
a381234
- add zlib-devel to build-requires of main package and to
a381234
  requires of -devel package
a381234
cc09909
* Tue Sep  6 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.68-2
cc09909
- simplify %%files
cc09909
- use more macros
cc09909
- change Group to Application/System
cc09909
- own/create %{_localstatedir}/ft/
cc09909
- add BR: autoconf
cc09909
- don't need generic INSTALL
cc09909
- mark config files as such
cc09909
- own all directories we create
cc09909
- run ldconfig on post/postun
cc09909
cc09909
* Tue Sep  6 2005 Paul P Komkoff Jr <i@stingr.net> 0.68-1
cc09909
- Submit to fedora-extras
cc09909
- Change volatile data location to /var/ft and nonvolatile
cc09909
  to /etc/flow-tools (FHS)
cc09909
- Make libft shared library
cc09909
- Split to plain/devel
cc09909
cc09909
* Fri Jan  7 2004 William Emmanuel S. Yu <wyu@ateneo.edu>
cc09909
- updated RPM file for version 0.67
cc09909
cc09909
* Tue Aug  8 2003 William Emmanuel S. Yu <wyu@ateneo.edu>
cc09909
- fixed SQL bug
cc09909
- update flow-export documentation
cc09909
cc09909
* Tue Apr 29 2003 William Emmanuel S. Yu <wyu@ateneo.edu>
cc09909
- add support for checking null symbols filename
cc09909
cc09909
* Fri Apr  4 2003 William Emmanuel S. Yu <wyu@ateneo.edu>
cc09909
- updated RPM file for version 0.66
cc09909
cc09909
* Fri Apr  4 2003 William Emmanuel S. Yu <wyu@ateneo.edu>
cc09909
- updated RPM file for version 0.65
cc09909
- included PostgreSQL support patch
cc09909
cc09909
* Mon Feb  3 2003 Larry Fahnoe <fahnoe@FahnoeTech.com>
cc09909
- added makefile patches to use RPM_OPT_FLAGS
cc09909
- added manpages and html files to spec file
cc09909
cc09909
* Tue Dec 17 2002 William Emmanuel S. Yu <wyu@ateneo.edu>
cc09909
- added tagging and ip-port patches
cc09909
cc09909
* Thu Dec 12 2002 William Emmanuel S. Yu <wyu@ateneo.edu>
cc09909
- updated RPM file for version 0.63
cc09909
cc09909
* Wed Oct 16 2002 William Emmanuel S. Yu <wyu@ateneo.edu>
cc09909
- initial creation of RPM file for version 0.62