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

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