[boost141/el5/master] Added backward compatibility for RHEL 4
Robert Scheck
robert at fedoraproject.org
Mon Mar 14 01:07:49 UTC 2011
commit f2cd613096fa33bb97142694644fc16c7c383ad8
Author: Robert Scheck <robert at fedoraproject.org>
Date: Mon Mar 14 02:07:39 2011 +0100
Added backward compatibility for RHEL 4
boost141.spec | 36 +++++++++++++++++++++++++++---------
1 files changed, 27 insertions(+), 9 deletions(-)
---
diff --git a/boost141.spec b/boost141.spec
index a6c918c..9ce5c6d 100644
--- a/boost141.spec
+++ b/boost141.spec
@@ -10,17 +10,36 @@
%define disable_long_double 1
%endif
+# Backward compatibility for RHEL 4
+%if 0%{?rhel} < 5
+%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
+%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
+%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
+%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
+%endif
+
# Configuration of MPI backends
-%bcond_without mpich2
+%if 0%{?rhel} < 5
+ # Too old MPICH2 version on RHEL 4
+ %bcond_with mpich2
+%else
+ %bcond_without mpich2
+%endif
+
%ifarch s390 s390x
# No OpenMPI support on zseries
%bcond_with openmpi
%else
- %bcond_without openmpi
+ %if 0%{?rhel} < 5
+ # Too old OpenMPI version on RHEL 4
+ %bcond_with openmpi
+ %else
+ %bcond_without openmpi
+ %endif
# OpenMPI from RHEL 5 does not provide /etc/rpm/macros.openmpi-%{_arch}
# Work around so far: http://fedoraproject.org/wiki/PackagingDrafts/MPI
- %if 0%{?rhel} < 6
+ %if 0%{?rhel} == 5
%define _openmpi_load \
mpi-selector --set `mpi-selector --list | grep openmpi` \
source %{_sysconfdir}/profile.d/mpi-selector.sh \
@@ -535,11 +554,12 @@ find libs doc more -type f \( -name \*.htm -o -name \*.html \) \
sed "s:^:$DOCPATH/:" tmp-doc-directories \
| xargs --no-run-if-empty %{__install} -d
cat tmp-doc-directories | while read tobeinstalleddocdir; do
- find $tobeinstalleddocdir -mindepth 1 -maxdepth 1 -name \*.htm\* \
- | xargs %{__install} -p -m 644 -t $DOCPATH/$tobeinstalleddocdir
+ for tobeinstalleddocfile in $(find $tobeinstalleddocdir -mindepth 1 -maxdepth 1 -name \*.htm\*); do
+ %{__install} -p -m 644 $tobeinstalleddocfile $DOCPATH/$tobeinstalleddocdir
+ done
done
%{__rm} -f tmp-doc-directories
-%{__install} -p -m 644 -t $DOCPATH LICENSE_1_0.txt index.htm index.html
+%{__install} -p -m 644 LICENSE_1_0.txt index.htm index.html $DOCPATH
# Remove scripts used to generate include files
find $RPM_BUILD_ROOT%{_includedir}/ \( -name '*.pl' -o -name '*.sh' \) -exec %{__rm} -f {} \;
@@ -548,9 +568,7 @@ find $RPM_BUILD_ROOT%{_includedir}/ \( -name '*.pl' -o -name '*.sh' \) -exec %{_
# Install them in /usr/lib{,64} instead.
%{__rm} -Rf $RPM_BUILD_ROOT%{_datadir}/boost-%{version}/cmake
%{__install} -d $RPM_BUILD_ROOT/%{_libdir}/%{name}
-%{__install} -p -m 644 -t $RPM_BUILD_ROOT/%{_libdir}/%{name} \
- ./serial/CMakeFiles/BoostConfig.cmake \
- ./serial/CMakeFiles/BoostConfigVersion.cmake
+%{__install} -p -m 644 serial/CMakeFiles/BoostConfig{,Version}.cmake $RPM_BUILD_ROOT/%{_libdir}/%{name}
# Also put there the files that are now in libdir, so that it's all in
# one place
find $RPM_BUILD_ROOT/%{_libdir} -name '*.cmake' \
More information about the scm-commits
mailing list