Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > b567fbd98577e4e3409780e09c89f6a6 > files > 2

ape-1.1.0-2.fc13.src.rpm

Name:		ape
Version:	1.1.0
Release:	2%{?dist}
Summary:	A tool for generating atomic pseudopotentials within a DFT framework
Group:		Applications/Engineering
License:	GPLv2+
URL:		http://www.tddft.org/programs/APE
Source0:	http://www.tddft.org/programs/APE/sites/default/files/ape-%{version}.tar.gz
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

BuildRequires:	gcc-gfortran
BuildRequires:	gsl-devel
BuildRequires:	libxc-devel

Requires(post):		info
Requires(preun):	info

%description
APE (Atomic Pseudopotential Engine) is a tool for generating atomic
pseudopotentials within a Density-Functional Theory framework.

%prep
%setup -q

%build
# The APE configure script uses FCFLAGS instead of FFLAGS declared by the configure macro.
export FC=gfortran
export FCFLAGS="%{optflags} -ffree-form -ffree-line-length-none -I%{_fmoddir}"
%configure
# SMP make is not working.
#make %{?_smp_mflags}
make

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
# Get rid of spurious directory
rm -rf %{buildroot}%{_infodir}/dir
# Get rid of testsuite, it's already run in check phase.
rm -rf %{buildroot}%{_datadir}/ape
rm %{buildroot}%{_bindir}/ape-run*

%clean
rm -rf %{buildroot}

%post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :

%preun
if [ $1 = 0 ] ; then
  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi

# Check phase is disabled, since it fails sometimes on 32-bit architectures due
# to some hardly catchable rounding error, which has been fixed in the middle
# of big changes all over the program sometime after the release of 1.1.0.
# It should be enabled when version 1.2 is released.

#%check
## Add binary to PATH
#export PATH=$PATH:`pwd`/src
#cd testsuite
#./ape-run_testsuite -l

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README TODO sample
%{_bindir}/ape
%{_infodir}/ape.info.*

%changelog
* Wed Jan 26 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.1.0-2
- Disable %%check phase due to problems on 32-bit architectures. It needs to be
  re-enabled when version 1.2 (which does not suffer from the rounding issues
  causing the problems) is released.

* Tue Jan 18 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.1.0-1
- Initial spec.