8557a3d
%global commit 16dbd3efb95ef7e9ce2bc82ccc533819003b1d9b
9afc36c
%global shortcommit %(c=%{commit}; echo ${c:0:7})
8ff1a6d
9afc36c
# Run tests? ATLAS is not thread-safe so some fail as of 2017-05-16
247347c
%bcond_with tests
ff0bf58
ff0bf58
Name:           psi4
c24a225
Epoch:          1
8557a3d
Version:        1.3.0
8557a3d
Release:        0.1.rc2.%{shortcommit}git%{?dist}
ff0bf58
Summary:        An ab initio quantum chemistry package
f1759e7
License:        LGPLv3 and MIT
ff0bf58
URL:            http://www.psicode.org/
9afc36c
#Source0:        https://github.com/psi4/psi4/archive/v%{version}/psi4-%{version}.tar.gz
9afc36c
Source0:        https://github.com/psi4/psi4/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
ff0bf58
fe868c3
# Use system packages
9afc36c
Patch0:         psi4-b167f473-fedora.patch
ff0bf58
215a15e
BuildRequires:  cmake
ff0bf58
BuildRequires:  bison-devel
ff0bf58
BuildRequires:  byacc
ff0bf58
BuildRequires:  flex
4197c23
BuildRequires:  gcc-c++
ff0bf58
BuildRequires:  gcc-gfortran
15a68bb
BuildRequires:  perl-devel
215a15e
BuildRequires:  gsl-devel
215a15e
BuildRequires:  hdf5-devel
215a15e
BuildRequires:  zlib-devel
ff0bf58
247347c
BuildRequires:  openblas-devel
4197c23
BuildRequires:  CheMPS2-devel
4197c23
BuildRequires:  libint-devel >= 1.1.5-3
d65a2e9
BuildRequires:  libxc-devel
4197c23
BuildRequires:  pybind11-static
4be233a
BuildRequires:  gau2grid-devel
4be233a
BuildRequires:  libefp-devel
4197c23
5ae5109
BuildRequires:  python3-devel >= 2.7
4197c23
BuildRequires:  python3-numpy
4197c23
BuildRequires:  python3-sphinx >= 1.1
f1292f0
BuildRequires:  python3-deepdiff
a439945
# These are required also at runtime
a439945
Requires:       python3-numpy
a439945
Requires:       python3-deepdiff
4197c23
ff0bf58
# For the documentation
ff0bf58
BuildRequires:  tex(latex)
ff0bf58
BuildRequires:  tex-preview
ff0bf58
BuildRequires:  dvipng
ff0bf58
BuildRequires:  graphviz
ff0bf58
8ff1a6d
%if %{with tests}
15a68bb
# Needed for running tests
15a68bb
BuildRequires:  perl(Env)
8ff1a6d
%endif
15a68bb
b8ab233
Requires:  %{name}-data = %{epoch}:%{version}-%{release}
ff0bf58
# Libint can break the api between releases
6d49e45
Requires:  libint(api)%{?_isa} = %{_libint_apiversion}
ff0bf58
215a15e
# Don't have documentation in the cmake version yet.. 
215a15e
Obsoletes: psi4-doc < 1:0.3-1
215a15e
ff0bf58
%description
ff0bf58
PSI4 is an open-source suite of ab initio quantum chemistry programs
ff0bf58
designed for efficient, high-accuracy simulations of a variety of
ff0bf58
molecular properties. We can routinely perform computations with more
ff0bf58
than 2500 basis functions running serially or in parallel.
ff0bf58
ff0bf58
ff0bf58
%package data
ff0bf58
Summary:   Data files necessary for operation of PSI4
ff0bf58
BuildArch: noarch
ff0bf58
ff0bf58
%description data
ff0bf58
This package contains necessary data files for PSI4, e.g., basis sets
ff0bf58
and the quadrature grids.
ff0bf58
ff0bf58
ff0bf58
%package devel
ff0bf58
Summary:   Static libraries and development headers for psi
2e4c5d8
Requires:  %{name}%{?_isa} = %{epoch}:%{version}-%{release}
4197c23
# For dir ownership
4197c23
Requires:  cmake
ff0bf58
ff0bf58
%description devel
ff0bf58
This package contains static libraries and development headers for psi.
ff0bf58
ff0bf58
%prep
9afc36c
#setup -q
9afc36c
%setup -q -n psi4-%{commit}
4197c23
%patch0 -p1 -b .fedora
ff0bf58
ff0bf58
%build
215a15e
export F77=gfortran
215a15e
export FC=gfortran
ff0bf58
ff0bf58
mkdir objdir-%{_target_platform}
ff0bf58
cd objdir-%{_target_platform}
215a15e
%cmake .. \
5ae5109
       -DENABLE_OPENMP=ON -DENABLE_MPI=OFF -DENABLE_XHOST=OFF \
247347c
       -DBLAS_LIBRARIES='-lopenblaso' -DLAPACK_LIBRARIES='-lopenblaso' -DENABLE_AUTO_LAPACK=OFF \
215a15e
       -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \
e97febd
       -DCUSTOM_C_FLAGS='%{optflags} -std=c11 -DNDEBUG' -DCUSTOM_CXX_FLAGS='%{optflags} -std=c++11 -DNDEBUG' \
215a15e
       -DCUSTOM_Fortran_FLAGS='-I%{_libdir}/gfortran/modules %{optflags} -DNDEBUG' \
4be233a
       -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR="%{_lib}" \
9afc36c
       -DENABLE_CheMPS2=ON -DENABLE_libefp=OFF
9afc36c
#libefp turned off since it needs a separate Python wrapper
ff0bf58
ff0bf58
# Build program
4197c23
make %{?_smp_mflags} VERBOSE=1
ff0bf58
ff0bf58
%install
ff0bf58
make -C objdir-%{_target_platform} install DESTDIR=%{buildroot}
4197c23
4197c23
# Get rid of spurious files
4197c23
rm -rf %{buildroot}%{_builddir}
4197c23
rm -rf %{buildroot}%{_datadir}/TargetHDF5/
4197c23
rm -rf %{buildroot}%{_datadir}/TargetLAPACK/
4197c23
rm -rf %{buildroot}%{_datadir}/TargetHDF5/
4197c23
rm -rf %{buildroot}%{_datadir}/cmake/TargetHDF5/
4197c23
rm -rf %{buildroot}%{_datadir}/cmake/TargetLAPACK/
ff0bf58
8ff1a6d
%if %{with tests}
ff0bf58
%check
215a15e
# Run quick tests
ced959d
cd objdir-%{_target_platform}/tests
215a15e
ctest -L quicktests
9afc36c
# Run all tests
9afc36c
#ctest
8ff1a6d
%endif
ff0bf58
ff0bf58
%files
5ae5109
%license COPYING COPYING.LESSER
4197c23
%doc README.md
4197c23
%{_libdir}/psi4/
ff0bf58
%{_bindir}/psi4
ff0bf58
ff0bf58
%files data
5ae5109
%license COPYING COPYING.LESSER
c24a225
%{_datadir}/psi4/
ff0bf58
ff0bf58
%files devel
5ae5109
%license COPYING COPYING.LESSER
4197c23
%{_datadir}/cmake/psi4/
ff0bf58
%{_includedir}/psi4/
215a15e
%{_libdir}/psi4/
ff0bf58
ff0bf58
%changelog
8557a3d
* Mon Feb 18 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.3.0-0.1.rc2.16dbd3egit
8557a3d
- Update to 1.3.0rc2.
8557a3d
62b23c3
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.2.1-5.b167f47
62b23c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
62b23c3
a439945
* Wed Jan 02 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.2.1-4.b167f473git
a439945
- Add deepdiff requires.
a439945
3652055
* Sun Dec 09 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.2.1-3.b167f47
3652055
- Require python3-numpy instead of python2-numpy
3652055
9afc36c
* Wed Sep 26 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.2.1-2.b167f473git
9afc36c
- Update to git snapshot to make code run with -D_GLIBCXX_ASSERTIONS.
9afc36c
d8baf32
* Sat Sep 22 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.2.1-1
4be233a
- Update to 1.2.1.
4be233a
Marcel Plch 7e1f7c4
* Fri Aug 10 2018 Marcel Plch <mplch@redhat.com> - 1:1.1-8.add49b9git
Marcel Plch 7e1f7c4
- Patch for pybind 2.2.3
Marcel Plch 7e1f7c4
177e486
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-7.add49b9git
177e486
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
177e486
3b28c28
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.1-6.add49b9git
3b28c28
- Rebuilt for Python 3.7
3b28c28
adb4910
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-5.add49b9git
adb4910
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
adb4910
5a520f1
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-4.add49b9git
5a520f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
5a520f1
0d4e785
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-3.add49b9git
0d4e785
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
0d4e785
2e4c5d8
* Fri May 19 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.1-2.add49b95git
2e4c5d8
- Epoch was missing from a requires.
2e4c5d8
5ae5109
* Wed May 17 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.1-1.add49b95git
f1759e7
- Update to version 1.1. License changes from GPLv2+ to LGPLv3.
5ae5109
- Make sure binary is linked to right atlas library.
5ae5109
1a68dae
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0-3.2118f2fgit
1a68dae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
1a68dae
fe868c3
* Thu Mar 02 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.0-2.2118f2f5git
fe868c3
- Update to get patch that fixes build on rawhide.
fe868c3
4197c23
* Mon Feb 27 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.0-1.926879e2git
4197c23
- Update to newest git snapshot.
4197c23
f30f14d
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.0-0.3.rc.15fc63cgit
f30f14d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f30f14d
e4f9125
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 1:1.0-0.2.rc.15fc63cgit
e4f9125
- Rebuilt for Boost 1.63
e4f9125
b088efc
* Thu Jun 02 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.0-0.1.rc.15fc64cgit
b088efc
- Update to 1.0 release candidate.
b088efc
5e373c6
* Tue May 17 2016 Jonathan Wakely <jwakely@redhat.com> - 1:0.3-7.1881450git
5e373c6
- Rebuilt for linker errors in boost (#1331983)
5e373c6
bd9efad
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.3-6.1881450git
bd9efad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
bd9efad
f5b8812
* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 1:0.3-5.1881450git
f5b8812
- Rebuilt for Boost 1.60
f5b8812
e97febd
* Wed Sep 09 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:0.3-4.1881450fgit
e97febd
- Use narrowing patch from upstream instead of -Wno-narrowing.
e97febd
b8ab233
* Tue Sep 08 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:0.3-3.1881450fgit
b8ab233
- Add epoch to explicit requires.
b8ab233
993ec26
* Tue Sep 08 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:0.3-2.1881450fgit
993ec26
- Patch to fix broken linkage.
993ec26
215a15e
* Sun Sep 06 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:0.3-1.1881450fgit
215a15e
- Update to newest release, switched to using github release tags.
b7c9666
e5ca990
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-0.21.c7deee9git.1
e5ca990
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
e5ca990
d0a0890
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 4.0-0.20.c7deee9git.1
d0a0890
- rebuild for Boost 1.58
d0a0890
01e50d3
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-0.19.c7deee9git.1
01e50d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
01e50d3
a8a7f96
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 4.0-0.18.c7deee9git.1
a8a7f96
- Rebuilt for GCC 5 C++11 ABI change
a8a7f96
Petr Machata 38652ce
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 4.0-0.17.c7deee9git.1
Petr Machata 38652ce
- Rebuild for boost 1.57.0
Petr Machata 38652ce
4fa6316
* Thu Sep 11 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.16.c7deee99.1
4fa6316
- Forgot to tag buildroot override in previous build.
4fa6316
4fa6316
* Wed Sep 10 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.16.c7deee99
7352a25
- Update to newest snapshot.
6d49e45
- Requires libint(api).
6d49e45
ef95853
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-0.15.0c7ea92git.1
ef95853
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
ef95853
29d93c6
* Wed Jul 02 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.14.0c7ea92git.1
29d93c6
- Rebuild due to rebuilt libint.
29d93c6
ee1a3d7
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-0.14.0c7ea92git
ee1a3d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ee1a3d7
Petr Machata 2344c06
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 4.0-0.13.0c7ea92git
Petr Machata 2344c06
- Rebuild for boost 1.55.0
Petr Machata 2344c06
15a68bb
* Tue May 13 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.12.0c7ea928git
8ff1a6d
- Add BR: perl(Env) for tests.
15a68bb
d687ee3
* Tue May 13 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.11.0c7ea928git
d687ee3
- Update to newest git snapshot.
d687ee3
- Remove BR: ruby-devel.
d687ee3
b26bfd9
* Mon Mar 10 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.10.b5
b26bfd9
- Rebuild against updated libint.
b26bfd9
86201c2
* Sat Jan 04 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.9.b5
86201c2
- Drop %%?_isa from virtual provide of -static package (BZ #951582).
86201c2
7e4d1ba
* Fri Dec 27 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.8.b5
7e4d1ba
- Versioned libint build dependency.
7e4d1ba
ff0bf58
* Tue Dec 24 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.7.b5
ff0bf58
- Added LICENSE and COPYING to -data as well.
ff0bf58
- Versioned libint dependency.
ff0bf58
ff0bf58
* Sat Dec 21 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.6.b5
ff0bf58
- Get rid of bundled madness.
ff0bf58
ff0bf58
* Thu Dec 19 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.5.b5
ff0bf58
- Added BR and R on numpy.
ff0bf58
- Use ATLAS after all.
ff0bf58
ff0bf58
* Fri Aug 16 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.4.b5
ff0bf58
- Use openblas on supported architectures.
ff0bf58
- Update to beta5.
ff0bf58
ff0bf58
* Thu May 02 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.3.b4
ff0bf58
- Added BR on graphviz and enabled dot in configure for documentation.
ff0bf58
ff0bf58
* Tue Apr 30 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.2.b4
ff0bf58
- Review fixes.
ff0bf58
ff0bf58
* Thu Apr 11 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.1.b4
ff0bf58
- First release.