Package flow-tools: Specfile

# Optional builds
# _with_mysql
# _with_pgsql
# --with mysql --with pgsql
Version: 0.68
Name: flow-tools
Summary: Tool set for working with NetFlow data version %version
Release: alt4
Group: Monitoring
Copyright: BSD

Source0: ftp://ftp.eng.oar.net/pub/flow-tools/%name-%version.tar.bz2

Patch1: flow-tools-0.67-shared.patch
Patch2: flow-tools-0.68-alt-config.patch
Patch3: flow-tools-0.68-alt-docs.patch.gz
Patch4: flow-tools-0.68-alt-path.patch
Patch5: flow-tools-0.68-alt-gcc41-compile.patch
Patch6: flow-tools-0.68-alt-x86_64-time.patch

Patch20: flow-tools-0.67-mysql.patch
Patch21: flow-tools-0.68-alt-bug9607.patch

# not used now
Patch102: flow-tools-0.67-config.patch
Patch103: flow-tools-0.67-docs.patch
Patch104: flow-tools-0.67-gcc34.patch
Patch105: flow-tools-0.67-gcc4_amd64.patch
Patch106: flow-tools-0.67-debug.patch


Provides: flow-tools
BuildPreReq: flex zlib-devel %{?_with_mysql: libMySQL-devel} %{?_with_pgsql: postgresql-devel}

# Automatically added by buildreq on Tue Jan 08 2008
BuildRequires: libwrap-devel

%description
Flow-tools is library and a collection of programs used to
collect, send, process, and generate reports from NetFlow data.
The tools can be used together on a single server or distributed
to multiple servers for large deployments. The flow-toools library
provides an API for development of custom applications for NetFlow
export versions 1,5,6 and the 14 currently defined version 8
subversions.

Optional : mysql pgsql
Enabled  :%{?_with_mysql: mysql} %{?_with_pgsql: pgsql}

%package devel
Summary:        Development headers and libraries for %{name}
Group:          Development/C
Requires:	%name = %version-%release

%description devel
Development headers and libraries for %name

%prep
%setup -q 
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1

%if_with mysql
%patch20 -p1
%patch21 -p1
%endif

%build
%__aclocal
%__autoheader
%__libtoolize --force
%__automake --add-missing
%__autoconf

%configure \
    %{?_with_mysql:--with-mysql} \
    %{?_with_pgsql:--with-pgsql}

%make_build

%install
%makeinstall

%__install -m 644 configs/filter-acl %buildroot/%_sysconfdir/flow-tools/
%__install -m 644 configs/flow.acl %buildroot/%_sysconfdir/flow-tools/

%__rm -f %buildroot%_libdir/*.la

%clean

%files
%doc  AUTHORS ChangeLog INSTALL README SECURITY TODO contrib docs/*.html
%dir %_sysconfdir/flow-tools/
%dir %_sysconfdir/flow-tools/cfg
%config(noreplace) %_sysconfdir/flow-tools/cfg/*
%_sysconfdir/flow-tools/filter-acl
%_sysconfdir/flow-tools/flow.acl
%dir %_datadir/flow-tools/
%dir %_datadir/flow-tools/sym
%_datadir/flow-tools/sym/*
%_bindir/*
%_libdir/*.so.*
%_man1dir/*

%files devel
%_includedir/*
%_libdir/*.so
%_libdir/*.a

%changelog
* Tue May 27 2008 Dmitry Lebkov <dlebkov@altlinux.ru> 0.68-alt4
- spec-file fix -- add unpackaged directories

* Fri Feb 08 2008 Grigory Batalov <bga@altlinux.ru> 0.68-alt3.1
- Rebuilt with python-2.5.

* Tue Jan 08 2008 Dmitry Lebkov <dlebkov@altlinux.ru> 0.68-alt3
- fix for x86_64 by emp-at-zra-dot-ru (patch #6)
- rebuild with latest autotools

* Mon Apr 16 2007 ALT QA Team Robot <qa-robot@altlinux.org> 0.68-alt2.0
- Automated rebuild.

* Mon Jul 03 2006 Dmitry Lebkov <dlebkov@altlinux.ru> 0.68-alt2
- fix:
   + ALT bug #9607
   + compile with gcc4.1

* Wed Jan 18 2006 Dmitry Lebkov <dlebkov@altlinux.ru> 0.68-alt1
- 0.68

* Fri May 06 2005 Konstantin Klimchev <koka@altlinux.ru> 0.67-alt6
- fix:
  bug #6786 (bugzilla.altlinux.ru)
- remove: 
  flow-tools-0.67-gcc34.patch
- add: 
  flow-tools-0.67-gcc4_amd64.patch 
     from ftp.debian.org
  flow-tools-0.67-mysql.patch (only --with mysql) 
     from #6790 (bugzilla.altlinux.ru)

* Mon Jan 17 2005 Konstantin Klimchev <koka@altlinux.ru> 0.67-alt5
- fix flow-tools-0.67-gcc34.patch

* Fri Jun 18 2004 Konstantin Klimchev <koka@altlinux.ru> 0.67-alt4
- fix flow-tools-0.67-config.patch

* Wed Apr 28 2004 Konstantin Klimchev <koka@altlinux.ru> 0.67-alt3
- return: FT_PATH_CGF_ACL = "/etc/flow-tools/filter-acl" (default 
  config for flow-filter)

* Wed Feb 18 2004 Konstantin Klimchev <koka@altlinux.ru> 0.67-alt2
- rebuild for Sisyphus

* Thu Feb 5 2004 Konstantin Klimchev <koka@altlinux.ru> 0.67-alt0.2
- add patch to build shared library

* Wed Dec 24 2003 Konstantin Klimchev <koka@altlinux.ru> 0.67-alt0.1
- initial release for Daedalus

* Thu Dec 11 2003 Konstantin Klimchev <koka@atvc.ru> 0.67-1
- 0.67
- add optional build "--with mysql" and "--with pgsql"
- rewrite spec

* Tue Nov 19 2002 Oleg Prokopyev <riiki@altlinux.ru> 0.59-alt1
- Initial build for Sisyphus.