Name: daq
Summary: Data Acquisition Library for packet I/O
Summary(ja): パケットI/O用データ獲得ライブラリ
Version: 2.0.2
Release: 1%{?_dist_release}

License: GPLv2
Group: System Environment/Libraries
URL: http://www.snort.org/

Source: https://www.snort.org/downloads/snort/daq-%{version}.tar.gz

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
Provides: libdaq = %{version}-%{release}

Vendor: Project Vine
Distribution: Vine Linux

%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.

%package devel
Summary: Development files for %{name}
Summary(ja): %{name} の開発用ファイル
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: libdaq-devel = %{version}-%{release}

%description devel
The package contains libraries and header files for
developing applications that use daq.


%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)
%doc ChangeLog COPYING README
%{_libdir}/*.so.*
%dir %{_libdir}/daq
%{_libdir}/daq/*.so

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


%changelog
* Sat Sep 27 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 2.0.2-1
- new upstream release
- changed Group to System Environment/Libraries
- added devel subpackage

* Wed Jan 15 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 2.0.1-1
- new upstream release

* 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