# # spec file for package netsniff-ng # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # 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.7 Release: 0 Summary: High Performance Network Sniffer for Packet Inspection License: GPL-2.0+ Group: Productivity/Networking/Diagnostic Url: http://netsniff-ng.org/ Source: http://www.netsniff-ng.org/pub/netsniff-ng/netsniff-ng-%{version}.tar.gz # PATCH-FIX-SUSE netsniff-ng-cmake_pod2man_without_stderr.patch Patch1: netsniff-ng-cmake_pod2man_without_stderr.patch # PATCH-FIX-SUSE netsniff-ng-optflags.patch Patch2: netsniff-ng-optflags.patch Patch3: netsniff-pkgconfig.diff BuildRequires: libGeoIP-devel BuildRequires: ncurses-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} >= 1130 BuildRequires: libnetfilter_conntrack-devel BuildRequires: liburcu-devel BuildRequires: nacl-devel %define with_nf 1 %else %define with_nf 0 %endif BuildRequires: autoconf BuildRequires: automake BuildRequires: bison BuildRequires: cmake >= 2.8 BuildRequires: flex BuildRequires: gcc BuildRequires: glibc-devel BuildRequires: libcli-devel BuildRequires: libnetfilter_conntrack-devel BuildRequires: libnl-devel BuildRequires: libtool BuildRequires: make BuildRequires: nacl-devel BuildRequires: pkgconfig %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 %patch2 -p1 %patch -P 3 -p1 %build install -d build pushd build cmake \ -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ -DOPTFLAGS="%{optflags}" -DNACL_INCLUDE_DIR=%{_includedir}/nacl -DNACL_LIB_DIR=%{_libdir} \ ../src/ make %{?_smp_mflags} VERBOSE=1 popd %install pushd build make DESTDIR=%{buildroot} install popd %files %defattr(-,root,root) %doc AUTHORS COPYING README REPORTING-BUGS %doc Documentation %config %{_sysconfdir}/netsniff-ng %{_sbindir}/ashunt %{_sbindir}/bpfc %{_sbindir}/curvetun %{_sbindir}/ifpps %{_sbindir}/netsniff-ng %{_sbindir}/trafgen %doc %{_mandir}/man8/ashunt.8* %doc %{_mandir}/man8/bpfc.8* %doc %{_mandir}/man8/curvetun.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