Name: libmpfr
Version: 2.4.1
Release: alt1
Summary: Multiple Precision Floating-Point library
License: LGPLv2.1+
Group: System/Libraries
Url: http://www.mpfr.org/
Packager: Dmitry V. Levin <ldv@altlinux.org>
# Don't build static library by default
%def_disable static
BuildRequires: libgmp-devel
# http://www.mpfr.org/mpfr-current/mpfr-%version.tar.bz2
Source0: mpfr-%version.tar
Source1: mpfrxx.h
Patch: mpfr-%version-%release.patch
%package devel
Summary: Development MPFR library, header files and documentation
License: LGPLv2.1+, FDLv1.1+
Group: Development/C
Requires: %name = %version-%release
Requires: libgmp-devel
Conflicts: libgmp-devel = 0:4.1.4-alt3
%package devel-static
Summary: Static MPFR library
License: LGPLv2.1+
Group: Development/C
Requires: %name-devel = %version-%release
%description
MPFR provides a library for multiple-precision floating-point computation
with correct rounding. The computation is both efficient and has a
well-defined semantics. It copies the good ideas from the ANSI/IEEE-754
standard for double-precision floating-point arithmetic (53-bit mantissa).
%description devel
This package provides the header files and the symbolic links necessary
to allow compilation and linking of programs that use the libraries
provided in the %name package.
%description devel-static
This package provides static library necessary to allow static linking
of MPFR-based programs.
%prep
%setup -q -n mpfr-%version
rm m4/l*.m4
%patch -p1
awk '/__MPFR_DECLSPEC/{decl=1}decl&&/_MPFR_PROTO/{decl=0;print}' mpfr.h |
sed -n 's/^.*[[:space:]*]\+\([^[:space:]*]\+\)[[:space:]]\+_MPFR_PROTO.*/\1/p' \
>>libmpfr.sym
sort -u -o libmpfr.sym{,}
%build
%autoreconf
%configure --enable-shared %{subst_enable static}
%make_build
%{?!__buildreqs:%{?!_without_check:%{?!_disable_check:%make_build -k check}}}
%install
%makeinstall
install -pm644 %_sourcedir/mpfrxx.h %buildroot%_includedir/
%define docdir %_docdir/%name-%version
mkdir -p %buildroot%docdir
install -pm644 AUTHORS FAQ.html NEWS README TODO %buildroot%docdir/
%post devel
%install_info mpfr.info
%preun devel
%uninstall_info mpfr.info
%files
%_libdir/*.so.*
%dir %docdir
%docdir/[ANR]*
%files devel
%_libdir/*.so
%_includedir/*
%_infodir/*
%dir %docdir
%docdir/[FT]*
%if_enabled static
%files devel-static
%_libdir/*.a
%endif
%changelog
* Fri Apr 17 2009 Dmitry V. Levin <ldv@altlinux.org> 2.4.1-alt1
- Updated to 2.4.1-p5.
* Thu Jan 08 2009 Dmitry V. Levin <ldv@altlinux.org> 2.3.2-alt2
- mpfr.texi: Recoded from ISO-8859-1 to UTF-8.
- Packaged %%docdir.
* Sun Dec 14 2008 Dmitry V. Levin <ldv@altlinux.org> 2.3.2-alt1
- Updated to 2.3.2.
- Removed obsolete %%post_ldconfig/%%postun_ldconfig calls.
* Mon Mar 17 2008 Dmitry V. Levin <ldv@altlinux.org> 2.3.1-alt1
- Updated to 2.3.1.
- Restricted list of global symbols exported by the library to only those
which are either declared in mpfr.h file or required by test suit.
* Tue Apr 10 2007 Dmitry V. Levin <ldv@altlinux.org> 2.2.1-alt1
- Updated to 2.2.1-p5.
* Sat Apr 22 2006 Dmitry V. Levin <ldv@altlinux.org> 2.2.0-alt1
- Packaged for Sisyphus.