[fping] - use configure options to build ipv4 and ipv6 versions simultaneously so we can use the standard

Charles R. Anderson cra at fedoraproject.org
Fri Aug 31 07:16:46 UTC 2012


commit cfbfadff6d1f576b6f08dc57df2297a07aaef390
Author: Chuck Anderson <cra at dustpuppy.wpi.edu>
Date:   Fri Aug 31 03:16:04 2012 -0400

    - use configure options to build ipv4 and ipv6 versions simultaneously
      so we can use the standard make install to get the fping6 man page,
      etc.
    - build for el6 w/cap_net_raw (el5 still needs traditional setuid)
    - use preferred Buildroot tag for el5
    - make conditional build with/without ENABLE_F_OPTION actually work

 fping.spec |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/fping.spec b/fping.spec
index 1a6e15c..7328c11 100644
--- a/fping.spec
+++ b/fping.spec
@@ -1,18 +1,19 @@
-%if 0%{?fedora} < 15
-%global use_capnetraw 0
-%else
+%if 0%{?fedora} > 14
+%global use_capnetraw 1
+%endif
+%if 0%{?rhel} > 5
 %global use_capnetraw 1
 %endif
 
 Name: fping
 Version: 3.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: Scriptable, parallelized ping-like utility
 Group: Applications/Internet
 License: BSD with advertising
 URL: http://www.fping.org/
 Source0: http://fping.org/dist/%{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 %description
 fping is a ping-like program which can determine the accessibility of
@@ -24,17 +25,12 @@ use in scripting in mind.
 %setup -q -n %{name}-%{version}
 
 %build
-%configure
-make CFLAGS="-DIPV6 %{?use_capnetraw:-DENABLE_F_OPTION} $RPM_OPT_FLAGS"
-mv src/fping src/fping6
-
-make clean
-make CFLAGS="%{?use_capnetraw:-DENABLE_F_OPTION} $RPM_OPT_FLAGS"
+CFLAGS="%{?use_capnetraw:-DENABLE_F_OPTION} $RPM_OPT_FLAGS" %configure --enable-ipv4 --enable-ipv6
+make
 
 %install
 rm -rf $RPM_BUILD_ROOT
 make DESTDIR="$RPM_BUILD_ROOT" install
-install -p -m 4755 src/fping6 "$RPM_BUILD_ROOT"/%{_sbindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -52,6 +48,14 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/*
 
 %changelog
+* Thu Aug 30 2012 Charles R. Anderson <cra at wpi.edu> - 3.3-2
+- use configure options to build ipv4 and ipv6 versions simultaneously
+  so we can use the standard make install to get the fping6 man page,
+  etc.
+- build for el6 w/cap_net_raw (el5 still needs traditional setuid)
+- use preferred Buildroot tag for el5
+- make conditional build with/without ENABLE_F_OPTION actually work
+
 * Thu Aug 30 2012 Charles R. Anderson <cra at wpi.edu> - 3.3-1
 - update to 3.3
 


More information about the scm-commits mailing list