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

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