diff --git a/hping-20200503.zip b/hping-20200503.zip new file mode 100644 index 0000000000000000000000000000000000000000..b4413f7bb2f365fe825d7a58d03744b339028e62 Binary files /dev/null and b/hping-20200503.zip differ diff --git a/hping-fix-netbpf-header.patch b/hping-fix-netbpf-header.patch new file mode 100644 index 0000000000000000000000000000000000000000..8ecd5b15a3fb530d56de824743dc7dda6b59910b --- /dev/null +++ b/hping-fix-netbpf-header.patch @@ -0,0 +1,24 @@ +diff -urN hping-master/libpcap_stuff.c hping-master-bak/libpcap_stuff.c +--- hping-master/libpcap_stuff.c 2014-12-26 22:31:29.000000000 +0800 ++++ hping-master-bak/libpcap_stuff.c 2020-05-03 18:20:40.272372230 +0800 +@@ -16,7 +16,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include "globals.h" +diff -urN hping-master/script.c hping-master-bak/script.c +--- hping-master/script.c 2014-12-26 22:31:29.000000000 +0800 ++++ hping-master-bak/script.c 2020-05-03 18:20:53.661239114 +0800 +@@ -23,7 +23,7 @@ + #include + + #include +-#include ++#include + #include + + #include "release.h" diff --git a/hping.spec b/hping.spec new file mode 100644 index 0000000000000000000000000000000000000000..f54fea858b0baee4c46ddd8803d1cc4bef4fa3e7 --- /dev/null +++ b/hping.spec @@ -0,0 +1,50 @@ +#%global debug_package %{nil} + +Name: hping +Version: 20200503 +Release: 1 +Summary: hping is a command-line oriented TCP/IP packet assembler/analyzer +License: GPLv2 +URL: http://www.hping.org/ +Source0: https://github.com/antirez/hping/%{name}-%{version}.zip + +Patch0: hping-fix-netbpf-header.patch + +BuildRequires: gcc tcl-devel libpcap-devel + +%description +hping is a command-line oriented TCP/IP packet assembler/analyzer. The interface is inspired to the ping(8) unix command, but hping isn't only able to send ICMP echo requests. It supports TCP, UDP, ICMP and RAW-IP protocols, has a traceroute mode, the ability to send files between a covered channel, and many other features + +%prep +%setup -q -n %{name}-master/ +%patch0 -p1 + +%build +%configure +%make_build + +%install +install -d %{buildroot}/%{_bindir} +install -m0755 hping3 %{buildroot}/%{_bindir} + +install -d %{buildroot}/%{_mandir}/man8 +install -m0644 docs/hping3.8 %{buildroot}/%{_mandir}/man8 + + +%pre +%preun +%post +%postun + +%check + +%files +%license COPYING +%doc INSTALL README KNOWN-BUGS CHANGES +%{_bindir}/* +%{_mandir}/* + +%changelog +* Sun Mar 29 2020 Wei Xiong +- Package init +