Blob Blame History Raw
%global with_nacl no

Name:		netsniff-ng
Version:	0.5.7
Release:	4%{?dist}
Summary:	A high performance network sniffer for packet inspection
Group:		Applications/Internet
License:	GPLv2+
URL:		http://netsniff-ng.org/
Source0:	http://www.netsniff-ng.org/pub/netsniff-ng/netsniff-ng-%{version}.tar.gz
# Temporal workaround for rhbz#836923
Patch0:	netsniff-ng-0.5.7-libcli-include-fix.patch
# drop -march/-mtune=native (breaks binaries and doesn't work on all arches)
Patch1:	netsniff-ng-0.5.7-flags.patch
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:	cmake ncurses-devel GeoIP-devel libnetfilter_conntrack-devel
BuildRequires:	userspace-rcu-devel libnl-devel libcli-devel flex bison
%if "%{with_nacl}" == "yes"
BuildRequires:	nacl-devel
%endif

%description
netsniff-ng is a high performance linux network sniffer for packet
inspection. Basically, it is similar to tcpdump, but it doesn't need one
syscall per packet. Instead, it uses an memory mapped area within kernelspace
for accessing packets without copying them to userspace (zero-copy mechanism).

This tool is useful for debugging your network, measuring performance
throughput or creating network statistics of incoming packets on central
network nodes like routers or firewalls.

%prep
%setup -q
%patch0 -p1 -b .libcli-include-fix
%patch1 -p1 -b .flags

%if "%{with_nacl}" == "yes"
[ -r src/curvetun/nacl_path.cmake ] || \
cat > src/curvetun/nacl_path.cmake <<":eof"
SET(NACL_INCLUDE_DIR %{_includedir}/nacl)
SET(NACL_LIB_DIR %{_libdir})
:eof
%endif

%build
cd src
mkdir build
cd build
%cmake ..
make  %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make -C src/build DESTDIR="%{buildroot}" install

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root, -)
%doc AUTHORS COPYING README
%{_sbindir}/*
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/*
%{_mandir}/man8/*

%changelog
* Wed Aug  8 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 0.5.7-4
- Removed code that handles drop of sysvinit script (obsoleted now)
  Resolves: rhbz#842793

* Mon Jul 30 2012 Dan Horák <dan[at]danny.cz> - 0.5.7-3
- fix build on secondary arches

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon Jul  2 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 0.5.7-1
- New version
  Resolves: rhbz#836707
- Added missing build requires (NaCl is not in Fedora yet, not using
  the bundled version, thus built without curvetun)

* Tue Apr 24 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 0.5.6-2
- Built with RPM_OPT_FLAGS
  Resolves: rhbz#815476

* Thu Mar 29 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 0.5.6-1
- New version

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.5.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Nov 03 2010 James Findley <sixy@gmx.com> - 0.5.5.0-2
- Fixed packaging bug
- Fixed URL

* Tue Nov 02 2010 James Findley <sixy@gmx.com> - 0.5.5.0-1
- Updated to 0.5.5.0 stable
- This version has major changes, including the removal of  daemon mode.

* Tue Feb 23 2010 James Findley <sixy@gmx.com> - 0.5.5.0-0.4.211svn
- Improved the way sources are provided
- Used the upstream copy of 0.5.3 for check_packets, with a patch

* Wed Feb 17 2010 James Findley <sixy@gmx.com> - 0.5.5.0-0.3.211svn
- Added the check_packets client app:
 - This makes the unix domain socket actually useful
 - This is taken from the 0.5.3 sources, but with a modified makefile

* Sun Feb 14 2010 James Findley <sixy@gmx.com> - 0.5.5.0-0.2.211svn
- Patched the UDS server
- Patched the help text to correctly mark features not yet implemented
- Added BuildRequires and Requires

* Wed Jan 27 2010 James Findley <sixy@gmx.com> - 0.5.5.0-0.1.211svn
- Prerelease of 0.5.0
- Should now work properly on older (e.g. RHEL 5.x) OSes
- Many new features added

* Fri Jan 08 2010 James Findley <sixy@gmx.com> - 0.5.4.1-5
- Added -Wno-format to hide spurious gcc warnings on AMD64

* Thu Jan 07 2010 James Findley <sixy@gmx.com> - 0.5.4.1-4
- Fixed a few typos in the spec
- Zero padded changelog dates

* Thu Jan 07 2010 James Findley <sixy@gmx.com> - 0.5.4.1-3
- Fixed a few more spec errors

* Thu Jan 07 2010 James Findley <sixy@gmx.com> - 0.5.4.1-2
- Adapted for Fedora packaging policy
- Added an initscript

* Wed Jan 06 2010 James Findley <sixy@gmx.com> - 0.5.4.1-1
- Updated to latest stable upstream

* Mon Nov 27 2009 James Findley	<sixy@gmx.com> - 0.5.2-1
- Initial Release