6524d5c
%bcond_without  fedora
6524d5c
6524d5c
%global uid 40
6524d5c
%global username flow-tools
6524d5c
%global homedir %{_localstatedir}/%{name}
6524d5c
%global gecos "Network flow monitoring"
6524d5c
e977e47
Version: 0.68.4
cc09909
Name: flow-tools
cc09909
Summary: Tool set for working with NetFlow data
e977e47
Release: 0.1.rc1%{?dist}
cc09909
Group: Applications/System
cc09909
License: BSD 
8a000ee
URL: http://code.google.com/p/%{name}/
e977e47
Source0: http://%{name}.googlecode.com/files/%{name}-%{version}-rc1.tar.bz2
6524d5c
Source1: flow-capture.init
6524d5c
Source2: flow-capture.sysconfig
3209043
Requires: rrdtool-python
8a000ee
BuildRequires: openssl-devel mysql-devel postgresql-devel zlib-devel 
8a000ee
BuildRequires: bison flex tcp_wrappers
e977e47
BuildRequires: fedora-usermgmt-devel doxygen
6524d5c
%{?FE_USERADD_REQ}
8a000ee
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
6524d5c
Requires(post): initscripts chkconfig
6524d5c
Requires(preun): initscripts chkconfig
6524d5c
Requires(postun): initscripts
6524d5c
Provides: group(%username) = %uid
6524d5c
Provides: user(%username) = %uid
6524d5c
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
cc09909
%prep
e977e47
%setup -qn %{name}-%{version}-rc1
cc09909
cc09909
%build
8a000ee
%configure \
8a000ee
  --localstatedir=%{_localstatedir}/%{name} \
8a000ee
  --sysconfdir=%{_sysconfdir}/%{name} \
8a000ee
  --enable-static=no \
8a000ee
  --with-mysql \
8a000ee
  --with-postgresql \
8a000ee
  --with-openssl
8a000ee
cc09909
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
cc09909
cc09909
%install
cc09909
rm -rf $RPM_BUILD_ROOT
8a000ee
make DESTDIR=$RPM_BUILD_ROOT install
cc09909
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
8a000ee
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/%{name}
6524d5c
install -d $RPM_BUILD_ROOT%{_initrddir}
6524d5c
install -m 0755 %SOURCE1 $RPM_BUILD_ROOT%{_initrddir}/flow-capture
6524d5c
install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
6524d5c
install -m 0644 %SOURCE2 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/flow-capture
cc09909
cc09909
%clean
cc09909
rm -rf $RPM_BUILD_ROOT
cc09909
6524d5c
%pre
6524d5c
%__fe_groupadd %uid -r %username &>/dev/null || :
6524d5c
%__fe_useradd  %uid -r -s /sbin/nologin -d %homedir -M          \
6524d5c
                    -c '%gecos' -g %username %username &>/dev/null || :
6524d5c
6524d5c
%post
6524d5c
/sbin/ldconfig
6524d5c
/sbin/chkconfig --add flow-capture
cc09909
6524d5c
%preun
6524d5c
if [ $1 = 0 ]; then
6524d5c
        /sbin/service flow-capture stop >/dev/null 2>&1
6524d5c
        /sbin/chkconfig --del flow-capture
6524d5c
fi
6524d5c
6524d5c
%postun
6524d5c
/sbin/ldconfig
6524d5c
if [ "$1" -ge "1" ]; then
6524d5c
        /sbin/service flow-capture condrestart >/dev/null 2>&1 || :
6524d5c
fi
6524d5c
6524d5c
%__fe_userdel  %username &>/dev/null || :
6524d5c
%__fe_groupdel %username &>/dev/null || :
cc09909
cc09909
%files 
cc09909
%defattr(-,root,root)
a8ad477
%doc README README.fork INSTALL TODO COPYING SECURITY ChangeLog ChangeLog.old
8a000ee
%doc docs/*.html
cc09909
%{_mandir}/man1/*
cc09909
%{_bindir}/*
cc09909
%{_libdir}/*.so.*
8a000ee
%dir %{_sysconfdir}/%{name}/
8a000ee
%dir %{_sysconfdir}/%{name}/cfg/
8a000ee
%dir %{_sysconfdir}/%{name}/sym/
8a000ee
%config(noreplace) %{_sysconfdir}/%{name}/cfg/*
8a000ee
%config(noreplace) %{_sysconfdir}/%{name}/sym/*
6524d5c
%config(noreplace) %{_sysconfdir}/sysconfig/flow-capture
6524d5c
%{_initrddir}/flow-capture
6524d5c
%attr(-,flow-tools,flow-tools) %{_localstatedir}/%{name}/
8a000ee
%dir %{_datadir}/%{name}/
8a000ee
%{_datadir}/%{name}/*
cc09909
cc09909
%files devel
cc09909
%defattr(-,root,root,-)
cc09909
%{_libdir}/*.so
cc09909
%{_includedir}/*.h
cc09909
cc09909
%changelog
e977e47
* Tue Feb 19 2008 Paul P Komkoff Jr <i@stingr.net> - 0.68.4-0.1.rc1
e977e47
- new upstream release candidate
e977e47
73ba4fd
* Fri Dec 07 2007 Release Engineering <rel-eng at fedoraproject dot org> - 0.68.3-2
73ba4fd
- Rebuild for deps
73ba4fd
a8ad477
* Mon Nov 12 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68.3-1
a8ad477
- new upstream release
a8ad477
- build tools as PIE
a8ad477
- get rid of ftpaths.h
a8ad477
- do not ship ftconfig.c
a8ad477
- do not require libft
a8ad477
7699060
* Sat Nov  3 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68.2-1
7699060
- New upstream release
7699060
6524d5c
* Thu Sep 13 2007 Orion Poplawski <orion@cora.nwra.com> - 0.68.1-2
6524d5c
- Add user and init scripts
6524d5c
bf685ee
* Sun Aug  5 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68.1-1
bf685ee
- New upstream release
bf685ee
b8684ad
* Sun Jul 15 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68.1-0.1.rc3
b8684ad
- New upstream rc
b8684ad
8a000ee
* Sun Jul 15 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68.1-0.1.rc2
8a000ee
- Switch to 0.68.1 fork
8a000ee
- Drop all patches
8a000ee
- Sanitize spec
8a000ee
fb35041
* Sun Mar 25 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68-16
fb35041
- getopt() is now in unistd.h
fb35041
3209043
* Sun Mar 18 2007 Paul P Komkoff Jr <i@stingr.net> - 0.68-15
3209043
- Add runtime dependency for python-rrdtool
3209043
ac8187c
* Fri Dec 15 2006 Paul P. Komkoff Jr <i@stingr.net>
ac8187c
- rebuilt
ac8187c
a119c43
* Thu Dec 14 2006 Jason L Tibbitts III <tibbs@math.uh.edu> - 0.68-13
a119c43
- Rebuild for new Postgres
a119c43
5314da1
* Thu Nov 16 2006 Paul P Komkoff Jr <i@stingr.net> - 0.68-12
5314da1
- Fix flow report 72 (by reaper@surnet.ru) bz#212928
5314da1
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