netsniff-ng/netsniff-ng.spec
2021-09-18 10:32:34 +08:00

37 lines
1.4 KiB
RPMSpec

Name: netsniff-ng
Version: 0.6.8
Release: 1
Summary: Packet sniffing beast
License: GPLv2
URL: http://netsniff-ng.org/
Source0: http://www.netsniff-ng.org/pub/netsniff-ng/netsniff-ng-%{version}.tar.xz
BuildRequires: make gcc ncurses-devel GeoIP-devel libnetfilter_conntrack-devel
BuildRequires: userspace-rcu-devel libnl3-devel flex bison
BuildRequires: perl-podlators zlib-devel libpcap-devel libnet-devel libsodium-devel
%description
netsniff-ng is a high performance Linux network sniffer for packet inspection. It can be used for protocol analysis, reverse engineering or network debugging. The gain of performance is reached by 'zero-copy' mechanisms, so that the kernel does not need to copy packets from kernelspace to userspace.
%prep
%setup -q
%build
export NACL_INC_DIR=$(pkg-config --variable=includedir libsodium )/sodium
export NACL_LIB=sodium
./configure --prefix='%{_prefix}' --sysconfdir='%{_sysconfdir}'
make %{?_smp_mflags} ETCDIR=%{_sysconfdir} Q= STRIP=: \
CFLAGS="%{optflags} -fPIC -fcommon" LDFLAGS="%{?__global_ldflags}"
%install
make install PREFIX=%{_prefix} ETCDIR=%{_sysconfdir} DESTDIR="%{buildroot}"
%files
%doc AUTHORS COPYING README
%{_sbindir}/*
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/*
%{_mandir}/man8/*
%changelog
* Tue Sep 7 2021 zhengyaohui <zhengyaohui1@huawei.com> - 0.6.8-1
- package init