rpms/towhee/EL-5 towhee.spec,NONE,1.1 sources,1.1,1.2

Jussi Lehtola jussilehtola at fedoraproject.org
Wed May 27 12:27:25 UTC 2009


Author: jussilehtola

Update of /cvs/pkgs/rpms/towhee/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23856/EL-5

Modified Files:
	sources 
Added Files:
	towhee.spec 
Log Message:
Imported in Fedora.


--- NEW FILE towhee.spec ---
Name:		towhee
Version:	6.2.3
Release:	2%{?dist}
Summary:	A Monte Carlo molecular simulation code
Group:		Applications/Engineering
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}

BuildRequires:	gcc-gfortran
BuildRequires:	openmpi-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
prediction of fluid phase equilibria using atom-based force fields and the
Gibbs ensemble with particular attention paid to algorithms addressing
molecule conformation sampling. The code has subsequently been extended to
several ensembles, many different force fields, and solid (or at least porous)
phases.

This package contains binaries for serial operation and the utilities.


%package mpi
Summary:	Towhee, MPI version
Group:		Applications/Engineering
Provides:	towhee-executable = %{version}-%{release}
Requires:	towhee-common = %{version}-%{release}

%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:	towhee-executable = %{version}-%{release}
%if 0%{?fedora} >= 11
BuildArch:	noarch
%endif

%description common
This package contains files needed for operation of Towhee.

%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.

%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
for file in Examples/*/towhee_input; do
 sed "s|/towheebase/ForceFields|%{_datadir}/%{name}/ForceFields|g" $file > $file.new && \
 touch -r $file $file.new && \
 mv $file.new $file
done

%build
# Use gfortran, not g77.
export F77=gfortran


## Build serial version
mkdir nompi
cd nompi
ln -s ../configure .
%configure
make %{?_smp_mflags}
cd ..

# FIXME: Build utilities too

## Build parallel version
# Load MPI enviroment

%if %modules == 1
. /etc/profile.d/modules.sh
module load %{_libdir}/openmpi/*/openmpi.module
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

mkdir mpi
cd mpi
ln -s ../configure .
%configure --enable-mpi --program-suffix=-mpi
make %{?_smp_mflags}
cd ..

%install
rm -rf %{buildroot} 
# Install binaries
make -C nompi install DESTDIR=%{buildroot}
make -C mpi install DESTDIR=%{buildroot}
# Install force fields
find ForceFields/ -name "Makefile*" -exec rm {} \;
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -a ForceFields %{buildroot}%{_datadir}/%{name}

# Remove makefiles from the examples & remove executable permissions
find Manual/ -name "Makefile*" -exec rm {} \;
find Examples/ -name "Makefile*" -exec rm {} \;
find Examples/ -type f -exec chmod 644 {} \;

%clean
rm -rf %{buildroot} 


%files
%defattr(-,root,root,-)
%doc license.gpl
%{_bindir}/fitcoex
%{_bindir}/forcefield
%{_bindir}/towhee
# FIXME: add utils here

%files mpi
%defattr(-,root,root,-)
%doc license.gpl
%{_bindir}/fitcoex-mpi
%{_bindir}/forcefield-mpi
%{_bindir}/towhee-mpi

%files common
%defattr(-,root,root,-)
%doc license.gpl
%{_datadir}/%{name}/

%files doc
%defattr(-,root,root,-)
%doc Manual/projects/towhee/*

%files examples
%defattr(-,root,root,-)
%doc Examples/*

%changelog
* Mon May 25 2009 Jussi Lehtola <jussi.lehtola at iki.fi> - 6.2.3-2
- Split examples into own subpackage.
- Make examples and doc noarch on >=F11.

* Fri May 01 2009 Jussi Lehtola <jussi.lehtola at iki.fi> - 6.2.3-1
- Update to 6.2.3 that fixes shebangs and executable bit problems.

* Thu Apr 30 2009 Jussi Lehtola <jussi.lehtola at iki.fi> - 6.2.2-3
- Removed Makefiles also from ForceFields.

* Wed Apr 29 2009 Jussi Lehtola <jussi.lehtola at iki.fi> - 6.2.2-2
- Changed defines to globals.
- Added missing BR: openmpi-devel.

* Wed Apr 29 2009 Jussi Lehtola <jussi.lehtola at iki.fi> - 6.2.2-1
- First release.


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/towhee/EL-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	26 May 2009 22:27:41 -0000	1.1
+++ sources	27 May 2009 12:26:54 -0000	1.2
@@ -0,0 +1 @@
+72475a7af55bd93376c51cd081be2e40  towhee-6.2.3.tar.gz




More information about the fedora-extras-commits mailing list