rpms/towhee/EL-5 towhee.spec,1.6,1.7
Jussi Lehtola
jussilehtola at fedoraproject.org
Sun Jul 25 08:47:10 UTC 2010
- Previous message: rpms/xgridfit/devel .cvsignore, 1.9, 1.10 import.log, 1.9, 1.10 sources, 1.9, 1.10 xgridfit.spec, 1.18, 1.19
- Next message: rpms/apanov-heuristica-fonts/devel apanov-heuristica-fonts.spec, 1.19, 1.20 import.log, 1.15, 1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jussilehtola
Update of /cvs/pkgs/rpms/towhee/EL-5
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv14786
Modified Files:
towhee.spec
Log Message:
Switch back to former spec file.
Index: towhee.spec
===================================================================
RCS file: /cvs/pkgs/rpms/towhee/EL-5/towhee.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- towhee.spec 24 Jul 2010 11:31:58 -0000 1.6
+++ towhee.spec 25 Jul 2010 08:47:09 -0000 1.7
@@ -7,16 +7,38 @@ License: GPLv2+
URL: http://towhee.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+Provides: towhee-executable = %{version}-%{release}
Requires: towhee-common = %{version}-%{release}
-
-# Bug 502883
-# Error: operand out of range (0x0000000000008008 is not between 0xffffffffffff8000 and 0x0000000000007fff)
-# -mminimal-toc doesn't help
-ExcludeArch: ppc64
+#ExcludeArch: ppc64
BuildRequires: gcc-gfortran
BuildRequires: openmpi-devel
-BuildRequires: mpich2-devel
+
+# Check for mpi-selector or environment-modules
+%global selector 0
+%global modules 0
+
+%if 0%{?fedora} > 9
+%global modules 1
+%endif
+
+%if 0%{?rhel} == 4
+%global selector 1
+%endif
+
+%if 0%{?rhel} == 5
+%global selector 1
+%endif
+
+%if %modules == 1
+BuildRequires: environment-modules
+%endif
+
+%if %selector == 1
+BuildRequires: mpi-selector
+%endif
+
+# End MPI requires section
%description
Towhee is a Monte Carlo molecular simulation code originally designed for the
@@ -32,38 +54,24 @@ N.B. Due to some general names the utili
analyse_movie is now towhee-analyse_movie.
-%package openmpi
-Summary: Towhee, Open MPI version
+%package mpi
+Summary: Towhee, MPI version
Group: Applications/Engineering
+Provides: towhee-executable = %{version}-%{release}
Requires: towhee-common = %{version}-%{release}
-Obsoletes: towhee-mpi < %{version}-%{release}
-Provides: towhee-mpi = %{version}-%{release}
-Requires: openmpi
-
-%description openmpi
-This package contains MPI enabled binaries of Towhee, compiled against
-Open MPI.
-
-If you want the analysis tools, install the towhee package.
-
-%package mpich2
-Summary: Towhee, Open MPI version
-Group: Applications/Engineering
-Requires: towhee-common = %{version}-%{release}
-Requires: mpich2
-
-%description mpich2
-This package contains MPI enabled binaries of Towhee, compiled against MPICH2.
-If you want the analysis tools, install the towhee package.
+%description mpi
+This package contains the MPI enabled binaries of Towhee.
%package common
Summary: Towhee common files
Group: Applications/Engineering
# So that the package gets removed with the binaries
-Requires: %{name} = %{version}-%{release}
+Requires: towhee-executable = %{version}-%{release}
+%if 0%{?fedora} >= 11
BuildArch: noarch
+%endif
%description common
This package contains files needed for operation of Towhee.
@@ -71,7 +79,11 @@ This package contains files needed for o
%package doc
Summary: Towhee manual
Group: Applications/Engineering
+# So that the package gets removed with the binaries
+Requires: towhee-executable = %{version}-%{release}
+%if 0%{?fedora} >= 11
BuildArch: noarch
+%endif
%description doc
This package contains the HTML manual for Towhee.
@@ -79,11 +91,16 @@ This package contains the HTML manual fo
%package examples
Summary: Towhee examples
Group: Applications/Engineering
+Requires: towhee-executable = %{version}-%{release}
+%if 0%{?fedora} >= 11
BuildArch: noarch
+%endif
%description examples
This package contains examples for Towhee operation.
+
+
%prep
%setup -q
# Fix Force field locations in examples
@@ -98,6 +115,10 @@ done
# Use gfortran, not g77.
export F77=gfortran
+export FFLAGS="%{optflags}"
+export CXXFLAGS="%{optflags}"
+export CFLAGS="%{optflags}"
+
## Build serial version
mkdir nompi
cd nompi
@@ -112,34 +133,33 @@ cd ..
cd ..
-## Build parallel versions
-# Use mpif90 to build
-export F77=mpif90
+## Build parallel version
+# Load MPI enviroment
+%if %modules == 1
%{_openmpi_load}
-mkdir openmpi
-cd openmpi
-ln -s ../configure .
-%configure --enable-mpi --program-suffix=${MPI_SUFFIX}
-make %{?_smp_mflags}
-cd ..
-%{_openmpi_unload}
+export CFLAGS="%{optflags}"
+%endif
+
+%if %selector == 1
+# Set MPI environment
+mpi-selector --set `mpi-selector --list | grep openmpi`
+source /etc/profile.d/mpi-selector.sh
+%endif
-%{_mpich2_load}
-mkdir mpich2
-cd mpich2
+# Use mpif90 to build
+export F77=mpif90
+mkdir mpi
+cd mpi
ln -s ../configure .
-%configure --enable-mpi --program-suffix=${MPI_SUFFIX}
+%configure --enable-mpi --program-suffix=-mpi
make %{?_smp_mflags}
cd ..
-%{_mpich2_unload}
-
%install
rm -rf %{buildroot}
# Install binaries
-make -C openmpi install DESTDIR=%{buildroot} bindir=%{_libdir}/openmpi/bin INSTALL="install -p"
-make -C mpich2 install DESTDIR=%{buildroot} bindir=%{_libdir}/mpich2/bin INSTALL="install -p"
+make -C mpi install DESTDIR=%{buildroot} INSTALL="install -p"
make -C nompi install DESTDIR=%{buildroot} INSTALL="install -p"
# Install force fields
@@ -153,19 +173,16 @@ find Examples/ -name "Makefile*" -exec r
find Examples/ -type f -exec chmod 644 {} \;
# Rename utilities
-for bin in {analyse_{movie,histogram},car2towhee,charmm2pdb,{faux,pdb,xmd,xtl,xyz}2towhee,fitcoex,jre_to_towhee,maftodensity,rdf2pmfpair,unitcell}; do
+for bin in {analyse_{movie,histogram},car2towhee,charmm2pdb,{faux,pdb,xmd,xtl,xyz}2towhee,fitcoex,jre_to_towhee,maftodensity,rdf2pmfpair,unitcell}{,-mpi}; do
mv %{buildroot}%{_bindir}/$bin %{buildroot}%{_bindir}/towhee-$bin
done
# Remove mpi versions of the utilities
-for mpi in openmpi mpich2; do
- for bin in {analyse_{movie,histogram},car2towhee,charmm2pdb,{faux,pdb,xmd,xtl,xyz}2towhee,fitcoex,jre_to_towhee,maftodensity,rdf2pmfpair,unitcell}; do
- rm %{buildroot}%{_libdir}/$mpi/bin/${bin}_${mpi}
- done
-done
+rm %{buildroot}%{_bindir}/towhee-*-mpi
%clean
rm -rf %{buildroot}
+
%files
%defattr(-,root,root,-)
%doc license.gpl
@@ -174,13 +191,11 @@ rm -rf %{buildroot}
# Utils
%{_bindir}/towhee-*
-%files openmpi
-%defattr(-,root,root,-)
-%{_libdir}/openmpi/bin/*_openmpi
-
-%files mpich2
+%files mpi
%defattr(-,root,root,-)
-%{_libdir}/mpich2/bin/*_mpich2
+%doc license.gpl
+%{_bindir}/forcefield-mpi
+%{_bindir}/towhee-mpi
%files common
%defattr(-,root,root,-)
@@ -196,24 +211,9 @@ rm -rf %{buildroot}
%doc Examples/*
%changelog
-* Sat Jul 24 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 6.2.11-1
+* Sun Jul 25 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 6.2.11-1
- Update to 6.2.11.
-* Sat Jun 19 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 6.2.9-1
-- Update to 6.2.9.
-
-* Sat Dec 19 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 6.2.7-1
-- Adopt MPI guidelines, fixing FTBFS in rawhide.
-
-* Fri Oct 23 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 6.2.6-4
-- Fix FTBFS problem caused by behaviour change of openmpi.
-
-* Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 6.2.6-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
-
-* Thu Jul 16 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 6.2.6-1
-- Restore ExcludeArch: ppc64.
-
* Thu Jul 16 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 6.2.6-1
- Update to upstream 6.2.6.
- Previous message: rpms/xgridfit/devel .cvsignore, 1.9, 1.10 import.log, 1.9, 1.10 sources, 1.9, 1.10 xgridfit.spec, 1.18, 1.19
- Next message: rpms/apanov-heuristica-fonts/devel apanov-heuristica-fonts.spec, 1.19, 1.20 import.log, 1.15, 1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list