| 1 | Summary: A C library for multiple-precision floating-point computations
|
|---|
| 2 | Name: mpfr
|
|---|
| 3 | Version: 3.1.0
|
|---|
| 4 | Release: 2%{?dist}
|
|---|
| 5 | URL: http://www.mpfr.org/
|
|---|
| 6 |
|
|---|
| 7 | Source0: http://www.mpfr.org/mpfr-current/%{name}-%{version}.tar.gz
|
|---|
| 8 | Patch0: mpfr.diff
|
|---|
| 9 |
|
|---|
| 10 | License: LGPLv2+ and GPLv2+ and GFDL
|
|---|
| 11 | Group: System Environment/Libraries
|
|---|
| 12 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|---|
| 13 | #BuildRequires: autoconf libtool gmp-devel
|
|---|
| 14 | Requires: gmp >= 4.2.1
|
|---|
| 15 |
|
|---|
| 16 | %description
|
|---|
| 17 | The MPFR library is a C library for multiple-precision floating-point
|
|---|
| 18 | computations with "correct rounding". The MPFR is efficient and
|
|---|
| 19 | also has a well-defined semantics. It copies the good ideas from the
|
|---|
| 20 | ANSI/IEEE-754 standard for double-precision floating-point arithmetic
|
|---|
| 21 | (53-bit mantissa). MPFR is based on the GMP multiple-precision library.
|
|---|
| 22 |
|
|---|
| 23 | %package devel
|
|---|
| 24 | Summary: Development tools A C library for mpfr library
|
|---|
| 25 | Group: Development/Libraries
|
|---|
| 26 | Requires: %{name} = %{version}-%{release}
|
|---|
| 27 | #Requires: gmp-devel
|
|---|
| 28 |
|
|---|
| 29 | %description devel
|
|---|
| 30 | The static libraries, header files and documentation for using the MPFR
|
|---|
| 31 | multiple-precision floating-point library in applications.
|
|---|
| 32 |
|
|---|
| 33 | If you want to develop applications which will use the MPFR library,
|
|---|
| 34 | you'll need to install the mpfr-devel package. You'll also need to
|
|---|
| 35 | install the mpfr package.
|
|---|
| 36 |
|
|---|
| 37 | %prep
|
|---|
| 38 | %setup -q
|
|---|
| 39 | %patch0 -p1 -b .os2~
|
|---|
| 40 |
|
|---|
| 41 | %build
|
|---|
| 42 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
|
|---|
| 43 | %configure \
|
|---|
| 44 | --disable-shared --enable-static \
|
|---|
| 45 | --disable-assert \
|
|---|
| 46 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
|
|---|
| 47 | make %{?_smp_mflags}
|
|---|
| 48 |
|
|---|
| 49 | %install
|
|---|
| 50 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 51 | #iconv -f iso-8859-1 -t utf-8 mpfr.info >mpfr.info.aux
|
|---|
| 52 | #mv mpfr.info.aux mpfr.info
|
|---|
| 53 | make install DESTDIR=$RPM_BUILD_ROOT
|
|---|
| 54 |
|
|---|
| 55 | cp -p src/mpfr.dll $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 56 | cp -p src/.libs/mpfr_s.a $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 57 |
|
|---|
| 58 | rm -f $RPM_BUILD_ROOT%{_libdir}/libmpfr.la
|
|---|
| 59 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|---|
| 60 | rm -f $RPM_BUILD_ROOT%{_libdir}/libmpfr.a
|
|---|
| 61 | cd ..
|
|---|
| 62 | mkdir $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}
|
|---|
| 63 | mv $RPM_BUILD_ROOT/%{_docdir}/%{name}/ $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}/
|
|---|
| 64 |
|
|---|
| 65 | %clean
|
|---|
| 66 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 67 |
|
|---|
| 68 | %files
|
|---|
| 69 | %defattr(-,root,root,-)
|
|---|
| 70 | %doc COPYING NEWS README
|
|---|
| 71 | %{_libdir}/mpfr.dll
|
|---|
| 72 |
|
|---|
| 73 | %files devel
|
|---|
| 74 | %defattr(-,root,root,-)
|
|---|
| 75 | %{_libdir}/mpfr*.a
|
|---|
| 76 | %{_includedir}/*.h
|
|---|
| 77 | %{_infodir}/mpfr.info*
|
|---|
| 78 |
|
|---|
| 79 | %changelog
|
|---|
| 80 | * Fri Dec 02 2011 yd
|
|---|
| 81 | - build as dll
|
|---|
| 82 |
|
|---|
| 83 | * Thu Dec 01 2011 yd
|
|---|
| 84 | - build as static lib
|
|---|