File mpqc.spec of Package mpqc
#
# spec file for package mpqc
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
Name: mpqc
Version: 2.3.1
Release: 1
License: GPL-2.0+
%define libname libsc7
Summary: Massively Parallel Quantum Chemistry program
Url: http://www.mpqc.org/
Group: Sciences/Chemistry
Source: %name-%version.tar.bz2
Source1: %name-rpmlintrc
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch07: 07_amd64_configure.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch09: 09_build_docdir.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch10: 10_distclean.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch11: 11_ld_as_needed.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch12: 12_sh4_build_fix.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch14: 14_sc-config_sclibs.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch15: 15_sc_config_omit_external_libs.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch16: 16_format-security.patch
BuildRequires: bison
BuildRequires: blas
BuildRequires: doxygen
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: lapack-devel
BuildRequires: cblas-devel
BuildRequires: tk
Requires: %libname = %{version}
Requires: libsc-data = %version
Conflicts: %name-openmpi
%if 0%{?suse_version} < 1030
BuildRequires: openmpi
%else
BuildRequires: openmpi-devel
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
MPQC is the Massively Parallel Quantum Chemistry Program. It computes
properties of atoms and molecules from first principles using the time
independent Schrödinger equation. It runs on a wide range of architectures
ranging from individual workstations to symmetric multiprocessors to
massively parallel computers. Its design is object oriented, using the C++
programming language.
If you want to use this program on a distributed (parallel) network, you'll
also have to install the libmpich package.
%package -n molrender
Summary: Graphical molecular rendering program
Group: Sciences/Chemistry
Requires: %libname = %version
%description -n molrender
This package graphically renders 3D molecules based on the output of
computational chemistry packages like mpqc.
%package -n %libname
Summary: Main libraries for %name
Group: System/Libraries
Recommends: libsc-data = %version
%description -n %{libname}
This package contains the library needed to run programs dynamically linked
with %libname, the scientific computing toolkit, based on mpqc computational
chemistry package from Sandia Labs.
%package -n libsc-devel
Summary: Development library files for %name
Group: Development/C++
Requires: %libname = %version
%description -n libsc-devel
This package contains the library files needed to compile programs dynamically
linked with %libname, the scientific computing toolkit, based on mpqc
computational chemistry package from Sandia Labs.
%package openmpi
Summary: OpenMPI Version of the Massively Parallel Quantum Chemistry Program
Group: Sciences/Chemistry
Requires: %libname = %version
Conflicts: %name
%description openmpi
The Massively Parallel Quantum Chemistry Program (MPQC) is an ab-inito quantum
chemistry program. It is especially designed to compute molecules in a highly
parallelized fashion.
This package contains an OpenMPI version.
%package -n libsc-data
Summary: Basis Set and Atom Data for MPQC
Group: Sciences/Chemistry
Requires: %libname = %version
%description -n libsc-data
This package includes the basis set and atom data for MPQC, the MAssively Parallel
Quantum Chemistry Program.
%prep
%setup -q
%patch07 -p1
%patch09 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%build
%configure --enable-production \
--with-sc-includedir=%{_includedir}/sc \
--enable-shared \
--disable-static \
%ifarch %ix86 ppc s390
--disable-parallel \
--disable-threads \
%else
--enable-parallel \
--enable-threads \
%endif
--with-cxx=%{_bindir}/g++ \
--with-cc=%{_bindir}/gcc \
--with-f77=%{_bindir}/gfortran \
--with-sc-datadir=%{_datadir}/%{name}
make %{?_smp_mflags}
sed -i "s|includedir=/usr/include|includedir=%{_includedir}/%libname|g" bin/sc-config
%install
make install install_devel prefix=%{buildroot}%{_prefix} scdatadir=%{buildroot}%{_datadir}/mpqc includedir=%{buildroot}%{_includedir}/sc bindir=%{buildroot}%{_bindir} libdir=%{buildroot}%{_libdir}
rm %{buildroot}%{_libdir}/*.la
# install examples
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}/examples
install -m644 src/bin/mpqc/validate/input/* %{buildroot}%{_defaultdocdir}/%{name}/examples/
install -m644 COPYING CITATION LICENSE README %{buildroot}%{_defaultdocdir}/%{name}/
# header is incorrect
pushd %{buildroot}%{_bindir}
for file in chkmpqcout sc-mkf77sym; do
tail -n +4 $file > $file.new
chmod 755 $file
echo "#!%{_bindir}/perl" > $file
cat $file.new >> $file
rm $file.new
chmod 755 $file
done
popd
pushd %{buildroot}%{_mandir}/man3/
for file in _home_abuild_rpmbuild_BUILD_%{name}-%{version}* ; do
mv -v $file ${file/_home_abuild_rpmbuild_BUILD_%{name}-%{version}/}
done
popd
test -f %{buildroot}%{_defaultdocdir}/%{name}/examples/mp2/Makefile && rm %{buildroot}%{_defaultdocdir}/%{name}/examples/mp2/Makefile
%clean
rm -rf %{buildroot}
%post -n %libname -p /sbin/ldconfig
%postun -n %libname -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc %{_defaultdocdir}/%{name}
%{_bindir}/mpqc
%{_bindir}/mpqcrun
%{_bindir}/ccarun
%{_bindir}/chkmpqcout
%{_datadir}/mpqc
%{_mandir}/man1/*
%{_mandir}/man3/*
%exclude %{_datadir}/mpqc/basis
%exclude %{_datadir}/mpqc/atominfo.kv
%exclude %{_datadir}/mpqc/magic
%exclude %{_mandir}/man3/sc*
%exclude %{_mandir}/man1/molrender*
%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/lib*.so.*
%files -n libsc-data
%defattr(-,root,root)
%{_datadir}/mpqc/basis/
%{_datadir}/mpqc/atominfo.kv
%{_datadir}/mpqc/magic
%files -n libsc-devel
%defattr(-,root,root)
%{_bindir}/sc*
%{_mandir}/man3/sc*
%{_libdir}/lib*.so
%{_includedir}/sc
%files -n molrender
%defattr(-,root,root)
%{_bindir}/molrender
%{_bindir}/tkmolrender
%{_mandir}/man1/molrender*
%changelog