From 5d1805de2117b93826f71d5afcfe92e6928386a8 Mon Sep 17 00:00:00 2001 From: Jussi Lehtola Date: Tue, 25 Jan 2011 12:11:46 +0200 Subject: [PATCH 1/2] Initial import. --- ape.spec | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 2 files changed, 69 insertions(+) create mode 100644 ape.spec diff --git a/ape.spec b/ape.spec new file mode 100644 index 0000000..f0f3c35 --- /dev/null +++ b/ape.spec @@ -0,0 +1,68 @@ +Name: ape +Version: 1.1.0 +Release: 1%{?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 +# 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 +* Tue Jan 18 2011 Jussi Lehtola - 1.1.0-1 +- Initial spec. diff --git a/sources b/sources index e69de29..40232fa 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +423de21a16aa806d67c2bdba20ba5c55 ape-1.1.0.tar.gz From bdfd09c0b15c06fd99733d012d0e94d74e711bd8 Mon Sep 17 00:00:00 2001 From: Jussi Lehtola Date: Wed, 26 Jan 2011 16:33:20 +0200 Subject: [PATCH 2/2] Disable %check phase. --- ape.spec | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/ape.spec b/ape.spec index f0f3c35..7da32ff 100644 --- a/ape.spec +++ b/ape.spec @@ -1,6 +1,6 @@ Name: ape Version: 1.1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for generating atomic pseudopotentials within a DFT framework Group: Applications/Engineering License: GPLv2+ @@ -51,11 +51,16 @@ if [ $1 = 0 ] ; then /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : fi -%check -# Add binary to PATH -export PATH=$PATH:`pwd`/src -cd testsuite -./ape-run_testsuite -l +# 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,-) @@ -64,5 +69,10 @@ cd testsuite %{_infodir}/ape.info.* %changelog +* Wed Jan 26 2011 Jussi Lehtola - 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 - 1.1.0-1 - Initial spec.