From 8c1047163a2d21904fcd110a21b5fee2c0d2551d Mon Sep 17 00:00:00 2001 From: Dave Love Date: Feb 19 2015 23:31:42 +0000 Subject: Conditionalize out mpich on ppc64 el6 --- diff --git a/dl_poly.spec b/dl_poly.spec index 78bff62..0c1b2c3 100644 --- a/dl_poly.spec +++ b/dl_poly.spec @@ -6,9 +6,19 @@ # Maybe build with -march=native %bcond_with native +%if 0%{?el6} +%ifarch ppc64 +%bcond_with mpich +%else +%bcond_without mpich +%endif +%else +%bcond_without mpich +%endif + Name: dl_poly Version: 1.9.20140324 -Release: 7%{?dist} +Release: 8%{?dist} Summary: General purpose classical molecular dynamics (MD) simulation License: BSD URL: http://www.ccp5.ac.uk/DL_POLY_CLASSIC/ @@ -22,7 +32,10 @@ Patch1: dl_poly-java.patch # Default to the serial executable Patch2: dl_poly-javaexec.patch BuildRequires: gcc-gfortran, makedepf90, java-devel -BuildRequires: openmpi-devel, mpich-devel, desktop-file-utils +BuildRequires: openmpi-devel, desktop-file-utils +%if %{with mpich} +BuildRequires: mpich-devel +%endif Requires: %{name}-common = %{version}-%{release} BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -75,6 +88,7 @@ Requires: openmpi%{_isa}, %{name}-common = %{version}-%{release} This is a parallel version using openmpi. +%if %{with mpich} %package mpich Summary: General purpose classical molecular dynamics (MD) simulation - mpich version Requires: mpich%{_isa}, %{name}-common = %{version}-%{release} @@ -83,6 +97,7 @@ Requires: mpich%{_isa}, %{name}-common = %{version}-%{release} %{base_description} This is a parallel version using mpich. +%endif %package gui Summary: GUI for %name @@ -122,9 +137,11 @@ mv ../execute/DLPOLY.X single/%{name} %{dobuild} %{_openmpi_unload} +%if %{with mpich} %{_mpich_load} %{dobuild} %{_mpich_unload} +%endif cd ../java sh build @@ -145,13 +162,15 @@ The serial version is available directly as %{name}. %install rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/%{_libdir}/mpich/bin mkdir -p $RPM_BUILD_ROOT%{_javadir} $RPM_BUILD_ROOT%_datadir/%name mkdir -p $RPM_BUILD_ROOT%{_bindir} install source/single/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name} mkdir -p $RPM_BUILD_ROOT/%{_libdir}/openmpi/bin install source/openmpi*/%{name}_* $RPM_BUILD_ROOT%{_libdir}/openmpi/bin +%if %{with mpich} +mkdir -p $RPM_BUILD_ROOT/%{_libdir}/mpich/bin install source/mpich*/%{name}_* $RPM_BUILD_ROOT%{_libdir}/mpich/bin +%endif cp data/README README.data chmod 644 utility/dl2xyz cp -a utility $RPM_BUILD_ROOT%{_datadir}/%{name} @@ -185,10 +204,16 @@ rm -rf $RPM_BUILD_ROOT %files openmpi %{_libdir}/openmpi/bin/* +%if %{with mpich} %files mpich %{_libdir}/mpich/bin/* +%endif + %changelog +* Thu Feb 19 2015 Dave Love - 1.9.20140324-8 +- Conditionalize out mpich on ppc64 el6 + * Wed Feb 11 2015 Dave Love - 1.9.20140324-7 - Remove _isa on -common and java requires