- 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
epel9
Chuck Anderson 13 years ago
parent 4bef28d523
commit cfbfadff6d

@ -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@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@wpi.edu> - 3.3-1
- update to 3.3

Loading…
Cancel
Save