# vim: set ts=4 sw=4 et: # Copyright (c) 2012 Pascal Bleser # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ Name: netsniff-ng Version: 0.5.6 Release: 0 Summary: High Performance Network Sniffer for Packet Inspection Source: http://www.netsniff-ng.org/pub/netsniff-ng/netsniff-ng-%{version}.tar.gz Patch1: netsniff-ng-cmake_pod2man_without_stderr.patch URL: http://code.google.com/p/netsniff-ng/ Group: Productivity/Networking/Diagnostic License: GPL-2.0+ BuildRoot: %{_tmppath}/build-%{name}-%{version} BuildRequires: ncurses-devel BuildRequires: libGeoIP-devel %if 0%{?suse_version} >= 1130 BuildRequires: libnetfilter_conntrack-devel BuildRequires: liburcu-devel %define with_nf 1 %else %define with_nf 0 %endif BuildRequires: flex bison BuildRequires: cmake gcc make glibc-devel BuildRequires: autoconf automake libtool %description netsniff-ng is a high performance Linux network sniffer for packet inspection. Basically, it is similar to tcpdump, but it doesn't need syscalls for fetching packets. Instead, it uses an memory mapped area within kernel space for accessing packets without the need of copying them to userspace ('zero-copy' mechanism). It can be used for protocol analysis and reverse engineering, network debugging, measurement of performance throughput, or network statistics creation of incoming packets on central network nodes like routers or firewalls. %prep %setup -q %if 0%{?suse_version} < 1140 %patch1 %endif %build %__install -d build pushd build cmake \ -DCMAKE_INSTALL_PREFIX="%{_usr}" \ ../src/ %__make %{?_smp_mflags} VERBOSE=1 popd %install pushd build %__make DESTDIR="%{buildroot}" install popd %clean %{?buildroot:%__rm -rf "%{buildroot}"} %files %defattr(-,root,root) %doc AUTHORS COPYING MAINTAINER PROJECTS README REPORTING-BUGS %doc THANKS Documentation %config %{_sysconfdir}/netsniff-ng %{_sbindir}/ashunt %{_sbindir}/bpfc %{_sbindir}/ifpps %{_sbindir}/netsniff-ng %{_sbindir}/trafgen %doc %{_mandir}/man8/ashunt.8* %doc %{_mandir}/man8/bpfc.8* %doc %{_mandir}/man8/ifpps.8* %doc %{_mandir}/man8/netsniff-ng.8* %doc %{_mandir}/man8/trafgen.8* %if %with_nf %{_sbindir}/flowtop %doc %{_mandir}/man8/flowtop.8* %endif %changelog