%define version 0.6.2

Summary: Data Acquisition Library
License: GPLv2
Group: Libraries/Network
Name: daq
Prefix: %{_prefix}
Provides: daq
Release: 2%{?_dist_release}
Source: daq-%{version}.tar.gz
URL: http://www.snort.org/
Version: %{version}

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: autoconf, automake, flex, bison
BuildRequires: libnetfilter_queue-devel
BuildRequires: libdnet-devel
BuildRequires: libpcap-devel >= 1.0.0
BuildRequires: iptables-devel

%description
Snort 2.9 introduces the DAQ, or Data Acquisition library, for packet I/O.  The
DAQ replaces direct calls to PCAP functions with an abstraction layer that
facilitates operation on a variety of hardware and software interfaces without
requiring changes to Snort.  It is possible to select the DAQ type and mode
when invoking Snort to perform PCAP readback or inline operation, etc.  The
DAQ library may be useful for other packet processing applications and the
modular nature allows you to build new modules for other platforms.


%prep
%setup -q


%build
%configure
make


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/daq/*.la


%clean
rm -rf %{buildroot}


%post -p /sbin/ldconfig


%postun -p /sbin/ldconfig


%files
%defattr(-,root,root)
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/*.so.*
%{_libdir}/*.a
%dir %{_libdir}/daq
%{_libdir}/daq/*.so
%{_bindir}/daq-modules-config


%changelog
* Sun Mar 18 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.6.2-2
- fix post and postun scripts

* Wed Mar 14 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.6.2-1
- initial build for Vine Linux
