- 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 %if 0%{?fedora} > 14
%global use_capnetraw 0 %global use_capnetraw 1
%else %endif
%if 0%{?rhel} > 5
%global use_capnetraw 1 %global use_capnetraw 1
%endif %endif
Name: fping Name: fping
Version: 3.3 Version: 3.3
Release: 1%{?dist} Release: 2%{?dist}
Summary: Scriptable, parallelized ping-like utility Summary: Scriptable, parallelized ping-like utility
Group: Applications/Internet Group: Applications/Internet
License: BSD with advertising License: BSD with advertising
URL: http://www.fping.org/ URL: http://www.fping.org/
Source0: http://fping.org/dist/%{name}-%{version}.tar.gz 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 %description
fping is a ping-like program which can determine the accessibility of 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} %setup -q -n %{name}-%{version}
%build %build
%configure CFLAGS="%{?use_capnetraw:-DENABLE_F_OPTION} $RPM_OPT_FLAGS" %configure --enable-ipv4 --enable-ipv6
make CFLAGS="-DIPV6 %{?use_capnetraw:-DENABLE_F_OPTION} $RPM_OPT_FLAGS" make
mv src/fping src/fping6
make clean
make CFLAGS="%{?use_capnetraw:-DENABLE_F_OPTION} $RPM_OPT_FLAGS"
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
make DESTDIR="$RPM_BUILD_ROOT" install make DESTDIR="$RPM_BUILD_ROOT" install
install -p -m 4755 src/fping6 "$RPM_BUILD_ROOT"/%{_sbindir}
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -52,6 +48,14 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/* %{_mandir}/man8/*
%changelog %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 * Thu Aug 30 2012 Charles R. Anderson <cra@wpi.edu> - 3.3-1
- update to 3.3 - update to 3.3

Loading…
Cancel
Save