Blame SOURCES/autofs-5.0.7-fix-libtirpc-build-option.patch

304803
autofs-5.0.7 - fix libtirpc build option
304803
304803
From: Ian Kent <raven@themaw.net>
304803
304803
304803
---
304803
 CHANGELOG   |    1 +
304803
 autofs.spec |   17 ++++++++++++++++-
304803
 2 files changed, 17 insertions(+), 1 deletion(-)
304803
304803
diff --git a/CHANGELOG b/CHANGELOG
304803
index e848bcd..b6b2679 100644
304803
--- a/CHANGELOG
304803
+++ b/CHANGELOG
304803
@@ -34,6 +34,7 @@
304803
 - depricate nosymlink pseudo option.
304803
 - add symlink pseudo option.
304803
 - fix requires in spec file.
304803
+- fix libtirpc build option to require libtirpc-devel if needed.
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
diff --git a/autofs.spec b/autofs.spec
304803
index 703f7a9..f77acc1 100644
304803
--- a/autofs.spec
304803
+++ b/autofs.spec
304803
@@ -12,6 +12,10 @@
304803
 # disable them.
304803
 %define with_systemd        %{?_without_systemd:        0} %{?!_without_systemd:        1}
304803
 
304803
+# Use --without libtirpc in your rpmbuild command or force values to 0 to
304803
+# disable them.
304803
+%define with_libtirpc        %{?_without_libtirpc:        0} %{?!_without_libtirpc:        1}
304803
+
304803
 Summary: A tool from automatically mounting and umounting filesystems.
304803
 Name: autofs
304803
 %define version 5.0.7
304803
@@ -25,6 +29,9 @@ Buildroot: %{_tmppath}/%{name}-tmp
304803
 %if %{with_systemd}
304803
 BuildRequires: systemd-units
304803
 %endif
304803
+%if %{with_libtirpc}
304803
+BuildRequires: libtirpc-devel
304803
+%endif
304803
 BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, cyrus-sasl-devel
304803
 Requires: chkconfig
304803
 Requires: /bin/bash mktemp sed textutils sh-utils grep /bin/ps
304803
@@ -72,9 +79,17 @@ echo %{version}-%{release} > .version
304803
   %define _unitdir %{?_unitdir:/lib/systemd/system}
304803
   %define systemd_configure_arg --with-systemd
304803
 %endif
304803
+%if %{with_libtirpc}
304803
+  %define libtirpc_configure_arg --with-libtirpc
304803
+%endif
304803
 
304803
 %build
304803
-CFLAGS="$RPM_OPT_FLAGS -Wall" ./configure --libdir=%{_libdir} --disable-mount-locking --enable-ignore-busy --with-libtirpc %{?systemd_configure_arg:}
304803
+CFLAGS="$RPM_OPT_FLAGS -Wall" \
304803
+./configure --libdir=%{_libdir} \
304803
+	--disable-mount-locking \
304803
+	--enable-ignore-busy \
304803
+	%{?systemd_configure_arg:} \
304803
+	%{?libtirpc_configure_arg:}
304803
 CFLAGS="$RPM_OPT_FLAGS -Wall" make initdir=/etc/rc.d/init.d DONTSTRIP=1
304803
 
304803
 %install