75a848
%if 0%{?rhel} == 5
75a848
%global _fmoddir %{_libdir}/gfortran/modules
75a848
%endif
75a848
503906
Name:		libxc
503906
Summary:	Library of exchange and correlation functionals to be used in DFT codes
103d00
Version:	1.2.0
103d00
Release:	1%{?dist}
503906
License:	LGPLv3+
503906
Group:		Applications/Engineering
503906
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot
503906
Source:		http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-%{version}.tar.gz
503906
URL:		http://www.tddft.org/programs/octopus/wiki/index.php/Libxc
503906
503906
BuildRequires:	gcc-gfortran
503906
503906
%description 
503906
libxc is a library of exchange and correlation functionals. Its purpose is to
503906
be used in codes that implement density-functional theory. For the moment, the
503906
library includes most of the local density approximations (LDAs), generalized
503906
density approximation (GGAs), and meta-GGAs. The library provides values for
503906
the energy density and its 1st, 2nd, and (for the LDAs) 3rd derivatives.
503906
503906
%package devel
503906
Summary:	Development library and headers for libxc
503906
Group:		Development/Libraries
503906
Requires:	%{name} = %{version}-%{release}
503906
Requires:	pkgconfig
503906
%if 0%{?fedora} >11 || 0%{?rhel} > 5
503906
# Old versions don't have the 32-bit gfortran compiler, and the Fortran part 
503906
# of the multilib'd devel package won't work in any case since Fortran modules
503906
# are architecture and compiler version dependent.
503906
Requires:	gcc-gfortran%{_isa}
503906
%endif
503906
503906
%description devel
503906
libxc is a library of exchange and correlation functionals. Its purpose is to
503906
be used in codes that implement density-functional theory. For the moment, the
503906
library includes most of the local density approximations (LDAs), generalized
503906
density approximation (GGAs), and meta-GGAs. The library provides values for
503906
the energy density and its 1st, 2nd, and (for the LDAs) 3rd derivatives.
503906
503906
This package contains the development headers and library that are necessary
503906
in order to compile programs against libxc.
503906
503906
%prep
503906
%setup -q
503906
503906
%build
503906
%configure --enable-shared --disable-static
503906
# SMP make is not working.
503906
#make %{?_smp_mflags}
503906
make
503906
503906
%install
503906
rm -rf %{buildroot}
503906
make install DESTDIR=%{buildroot}
503906
# Move modules in the right place
503906
mkdir -p %{buildroot}%{_fmoddir}
503906
mv %{buildroot}%{_includedir}/*.mod %{buildroot}%{_fmoddir}
503906
# Get rid of .la files
503906
find %{buildroot}%{_libdir} -name *.la -exec rm -rf {} \;
503906
503906
%clean
503906
rm -rf %{buildroot}
503906
503906
%post -p /sbin/ldconfig
503906
%postun -p /sbin/ldconfig
503906
503906
%files
503906
%defattr(-,root,root,-)
503906
%doc README NEWS COPYING AUTHORS ChangeLog TODO
503906
%{_libdir}/libxc.so.*
503906
503906
%files devel
503906
%defattr(-,root,root,-)
503906
%{_libdir}/libxc.so
503906
%{_includedir}/xc*.h
503906
%{_fmoddir}/libxc_funcs_m.mod
503906
%{_fmoddir}/xc_f90_*.mod
503906
%{_libdir}/pkgconfig/libxc.pc
503906
503906
%changelog
103d00
* Fri Jun 15 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.2.0-1
103d00
- Update to 1.2.0.
103d00
61e8cc
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
61e8cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
61e8cc
4c8794
* Fri May 13 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.1.0-1
4c8794
- Update to 1.1.0.
4c8794
3dbc86
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5
3dbc86
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
3dbc86
503906
* Sun Jan 23 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-4
503906
- Clean buildroot at the beginning of %%install.
503906
503906
* Sun Jan 23 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-3
503906
- Update tarball.
503906
- Make requirement on gcc-gfortran in -devel architecture explicit.
503906
503906
* Sat Jan 22 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-2
503906
- Minor review fixes.
503906
503906
* Tue Jan 18 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-1
503906
- Initial specfile.