Forráskód Böngészése

update to new version; fix substitution option; install without suffix

Ralf S. Engelschall 21 éve
szülő
commit
d15a895fdb
2 módosított fájl, 31 hozzáadás és 12 törlés
  1. 21 0
      hping/hping.patch
  2. 10 12
      hping/hping.spec

+ 21 - 0
hping/hping.patch

@@ -0,0 +1,21 @@
+Index: libpcap_stuff.c
+--- libpcap_stuff.c.orig	2002-12-13 15:07:07.000000000 +0100
++++ libpcap_stuff.c	2004-05-03 20:14:42.000000000 +0200
+@@ -17,7 +17,7 @@
+ #include <stdlib.h>
+ #include <sys/ioctl.h>
+ #include <pcap.h>
+-#include <net/bpf.h>
++#include <pcap-bpf.h>
+ 
+ #include "globals.h"
+ 
+@@ -35,7 +35,7 @@
+ 		printf("[open_pcap] pcap_open_live: %s\n", errbuf);
+ 		return -1;
+ 	}
+-#if (!defined OSTYPE_LINUX) && (!defined __sun__)
++#if 0
+ 	/* Return the packets to userspace as fast as possible */
+ 	if (ioctl(pcap_fileno(pcapfp), BIOCIMMEDIATE, &on) == -1)
+ 		perror("[open_pcap] ioctl(... BIOCIMMEDIATE ...)");

+ 10 - 12
hping/hping.spec

@@ -24,9 +24,9 @@
 ##
 
 #   package version
-%define       V_opkg 2.0.0rc2
-%define       V_dst  2.0.0-rc2
-%define       V_src  2-rc2
+%define       V_opkg 2.0.0rc3
+%define       V_dst  2.0.0-rc3
+%define       V_src  2-rc3
 
 #   package information
 Name:         hping
@@ -39,10 +39,11 @@ Class:        EVAL
 Group:        Network
 License:      GPL
 Version:      %{V_opkg}
-Release:      20040207
+Release:      20040503
 
 #   list of sources
 Source0:      http://www.hping.org/hping%{V_dst}.tar.gz
+Patch0:       hping.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -67,10 +68,11 @@ AutoReqProv:  no
 
 %prep
     %setup -q -n hping%{V_src}
+    %patch -p0
     %{l_shtool} subst \
         -e 's;\^$PCAP\^;^PCAP=%{l_ldflags} -lpcap^;' \
         -e 's;\^$PCAP_INCLUDE\^;^%{l_cppflags}^;' \
-        -s 's;INSTALL_MANPATH;%{l_prefix}/man;' \
+        -e 's;INSTALL_MANPATH;%{l_prefix}/man;' \
         configure
 
 %build
@@ -89,15 +91,11 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/sbin \
         $RPM_BUILD_ROOT%{l_prefix}/man/man8
     %{l_shtool} install -c -s -m 700 \
-        hping2 \
-        $RPM_BUILD_ROOT%{l_prefix}/sbin/
-    ln -s hping2 $RPM_BUILD_ROOT%{l_prefix}/sbin/hping
+        hping2 $RPM_BUILD_ROOT%{l_prefix}/sbin/hping
     %{l_shtool} install -c -m 644 \
-        docs/hping2.8 \
-        $RPM_BUILD_ROOT%{l_prefix}/man/man8/
-    ln -s hping2.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/hping.8
+        docs/hping2.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/hping.8
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
-        '%attr(0700,%{l_susr},%{l_mgrp}) %{l_prefix}/sbin/hping2'
+        '%attr(0700,%{l_susr},%{l_mgrp}) %{l_prefix}/sbin/hping'
 
 %files -f files