Name: mpqc Summary: Ab-inito chemistry program Version: 2.3.1 Release: 14%{?dist} License: GPLv2+ and LGPLv2+ Group: Applications/Engineering URL: http://www.mpqc.org/ Source: http://downloads.sourceforge.net/mpqc/%{name}-%{version}.tar.bz2 Patch0: mpqc-2.3.1-mdv-fix-wfn-lib.patch Requires: %{name}-libs = %{version}-%{release} BuildRequires: autoconf flex bison BuildRequires: desktop-file-utils BuildRequires: gcc-gfortran tk doxygen BuildRequires: libint-devel atlas-devel BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %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. %package data Summary: Atom info and basis sets from MPQC Group: Applications/Engineering Requires: %{name}-doc = %{version}-%{release} BuildArch: noarch %description data Atom info and basis sets from MPQC. %package doc Summary: HTML documentation for MPQC Group: Applications/Engineering BuildArch: noarch %description doc This package contains the full documentation for MPQC that can be viewed with a graphical browser like Mozilla. %package libs Summary: Main libraries for %{name} Group: Development/Libraries Requires: %{name}-data = %{version}-%{release} %description libs This package contains the shared libraries needed to run programs dynamically linked with %{name}, the scientific computing toolkit, based on mpqc computational chemistry package from Sandia Labs. %package devel Summary: Development headers and libraries for %{name} Group: Development/Libraries Requires: %{name}-libs = %{version}-%{release} %description devel This package contains the header files and static libraries needed to build programs linked with %{name}, the scientific computing toolkit, based on mpqc computational chemistry package from Sandia Labs. %prep %setup -q %patch0 -p1 sed -i -e 's,molrender.in,%{_datadir}/molrender/molrender.in,g' src/bin/molrender/tkmolrender.in sed -i -e 's,prefix/lib,prefix/%{_lib},g' configure.in cat >molrender.desktop << EOF [Desktop Entry] Name=Molrender Comment=Graphically render 3D molecules Exec=%{_bindir}/tkmolrender Icon=applications-science Terminal=false Type=Application Categories=Education;Science;Chemistry;Physics; Version=1.0 EOF %build export F77=gfortran autoconf %configure --enable-shared --enable-threads --disable-static --disable-parallel \ --includedir="%{_includedir}/mpqc" \ --with-libdirs="-L%{_libdir}/atlas" \ --with-cxx-optflags="$CXXFLAGS" \ --with-cc-optflags="$CFLAGS" sed -i 's|.rpath .libdir||g' bin/sc-config sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} cd doc make make man1 make man3 %install rm -rf %{buildroot} make installroot="%{buildroot}" INSTALL="install -p" install make installroot="%{buildroot}" INSTALL="install -p" install_devel # rename some man pages with sc_ prefix find doc/man/man3 -type f | grep -v '/sc' | while read a; do m=$(basename $a) d=$(dirname $a) mv "$a" "$d/sc_$m" done # install the man pages mkdir %{buildroot}%{_mandir} cp -r -p doc/man/* %{buildroot}%{_mandir} install -D -p -m 644 src/bin/molrender/molrender.in %{buildroot}%{_datadir}/molrender/molrender.in install -D -p -m 644 molrender.desktop %{buildroot}%{_datadir}/applications/molrender.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/molrender.desktop find %{buildroot}%{_libdir} -name *.la -exec rm -rf {} \; find %{buildroot}%{_libdir} -name *.so.* -exec chmod 755 {} \; sed -i -e "1,1s,^.*$,#!/usr/bin/perl," %{buildroot}%{_bindir}/sc-mkf77sym sed -i -e "1,1s,^.*$,#!/usr/bin/perl -I%{_datadir}/mpqc/${_version}/perl," %{buildroot}%{_bindir}/chkmpqcout chmod 755 %{buildroot}%{_bindir}/chkmpqcout %clean rm -rf %{buildroot} %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc CHANGES CITATION README %{_bindir}/mpqc %{_bindir}/chkmpqcout %{_bindir}/scls %{_bindir}/scpr %{_bindir}/*run %{_mandir}/man1/mpqc* %{_mandir}/man1/scls* %{_mandir}/man1/scpr* %{_bindir}/molrender %{_bindir}/tkmolrender %{_datadir}/molrender %{_datadir}/applications/molrender.desktop %{_mandir}/man1/molrender* %files data %defattr(-,root,root,-) %{_datadir}/mpqc %files doc %defattr(-,root,root,-) %doc doc/html %doc LICENSE COPYING COPYING.LIB %files libs %defattr(-,root,root) %doc LICENSE COPYING COPYING.LIB %{_libdir}/lib*.so.* %files devel %defattr(-,root,root,-) %{_bindir}/sc-* %{_libdir}/lib*.so %{_includedir}/mpqc %{_mandir}/man1/sc-* %{_mandir}/man3/sc* %changelog * Wed Dec 08 2010 Carl Byington <carl@five-ten-sg.com> 2.3.1-14 - rebuild for libint changes * Wed Jul 07 2010 Carl Byington <carl@five-ten-sg.com> 2.3.1-13 - Subpackage Licensing, main package requires -libs to get license files. -data requires -doc with another copy of the license files. * Fri Jan 08 2010 Carl Byington <carl@five-ten-sg.com> 2.3.1-12 - cp -p to preserve time stamps. - remove assumption that mandir = datadir/man * Wed Jan 06 2010 Carl Byington <carl@five-ten-sg.com> 2.3.1-11 - rename some man pages with sc_ prefix * Wed Jan 06 2010 Carl Byington <carl@five-ten-sg.com> 2.3.1-10 - remove rpath from sc-config script - move include files down one level into mpqc directory * Tue Jan 05 2010 Carl Byington <carl@five-ten-sg.com> 2.3.1-9 - remove rpath from binaries - remove patch backups - use rpm build compiler flags * Mon Jan 04 2010 Carl Byington <carl@five-ten-sg.com> 2.3.1-8 - use blas and lapack from atlas. * Sat Jan 02 2010 Carl Byington <carl@five-ten-sg.com> 2.3.1-7 - add libint-devel to speed up computations. - drop mpich2-devel for now. - add atlas-devel * Wed Dec 09 2009 Carl Byington <carl@five-ten-sg.com> 2.3.1-6 - install -p to preserve timestamps - trim changelog * Wed Dec 09 2009 Carl Byington <carl@five-ten-sg.com> 2.3.1-5 - reset release to -5, renumber older releases to compensate for typo in release numbers, started at -11 rather than -1. * Sat Dec 05 2009 Carl Byington <carl@five-ten-sg.com> 2.3.1-4 - disable parallel, did not help with ghemical anyway, and conflicts with current mpich. * Thu Dec 03 2009 Carl Byington <carl@five-ten-sg.com> 2.3.1-3 - re-enable parallel to try to use multiple cpus. * Wed Dec 02 2009 Carl Byington <carl@five-ten-sg.com> 2.3.1-2 - merge molrender subpackage into main package - remove static libraries - fix permissions on installed shared libraries - trim changelog - move license file to -libs package so it is always installed * Sun Nov 29 2009 Carl Byington <carl@five-ten-sg.com> 2.3.1-1 - convert to fedora compatible spec file - convert spec file to utf8 coding - use applications-science for molrender icon - install sample molrender.in file - patch tkmolrender to reference the installed molrender.in - add buildrequires desktop-file-utils - changes for fedora review * Wed Oct 14 2009 Guillaume Bedot <littletux@mandriva.org> 2.3.1-8mdv2010.0 - Revision: 457268 - Fix linkage and sc-config