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

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