Blob Blame History Raw
# Disable debug package since only static library provided (leading to an empty debuginfo file)
%global debug_package %{nil}

Name:		qd
Version:	2.3.7
Release:	7%{?dist}
Summary:	Double-Double and Quad-Double Arithmetic
Group:		Applications/Engineering
License:	BSD
URL:		http://www.cs.berkeley.edu/~yozo/
Source0:	http://www.cs.berkeley.edu/%7Eyozo/software/qd-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	gcc-c++
BuildRequires:	gcc-gfortran

%description
This package provides numeric types of twice the precision of IEEE
double (106 mantissa bits, or approximately 32 decimal digits) and
four times the precision of IEEE double (212 mantissa bits, or
approximately 64 decimal digits).  Due to features such as operator
and function overloading, these facilities can be utilized
with only minor modifications to conventional C++ and Fortran-90
programs.

In addition to the basic arithmetic operations (add, subtract,
multiply, divide, square root), common transcendental functions such
as the exponential, logarithm, trigonometric and hyperbolic functions
are also included. 

%package devel
Summary:	Double-Double and Quad-Double Arithmetic
Group:		Applications/Engineering
Provides:	qd-static = %{name}-%{version}

%description devel
This package provides numeric types of twice the precision of IEEE
double (106 mantissa bits, or approximately 32 decimal digits) and
four times the precision of IEEE double (212 mantissa bits, or
approximately 64 decimal digits).  Due to features such as operator
and function overloading, these facilities can be utilized
with only minor modifications to conventional C++ and Fortran-90
programs.

In addition to the basic arithmetic operations (add, subtract,
multiply, divide, square root), common transcendental functions such
as the exponential, logarithm, trigonometric and hyperbolic functions
are also included.


%prep
%setup -q -n qd-%{version}

%build
export CC=gcc
export CXX=g++	
export FC=gfortran
export FCFLAGS="%{optflags}"
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# Fix location of documentation
mv %{buildroot}/usr/share/doc/qd/* .
rm -rf %{buildroot}/usr/share/

# Move Fortran modules to %{_fmoddir}
mkdir -p %{buildroot}%{_fmoddir}/%{name}
mv %{buildroot}%{_libdir}/%{name}/*.mod %{buildroot}%{_fmoddir}/%{name}

%check
make check

%clean
rm -rf $RPM_BUILD_ROOT

%files devel
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README qd.pdf TODO
%{_bindir}/qd-config
%{_fmoddir}/qd/
%{_includedir}/qd/
%{_libdir}/libqd.a
%{_libdir}/libqd_f_main.a
%{_libdir}/libqdmod.a


%changelog
* Wed Sep 16 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.3.7-7
- Fix location of Fortran modules.

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.7-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sun Mar 08 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.3.7-5
- Fix license.

* Thu Dec 18 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.3.7-4
- Change base name back to qd.

* Sat Dec 13 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.3.7-3
- Removed debug package.

* Sat Dec 13 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.3.7-2
- Review fixes.
- Rename package to qd-devel.

* Thu Nov 06 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 2.3.7-1
- First release.