Summary: A C library for multiple-precision floating-point computations Name: mpfr Version: 2.3.0 Release: 2 URL: http://www.mpfr.org/ Source0: http://www.mpfr.org/mpfr-current/mpfr-%{version}.tar.bz2 Patch0: mpfr-%{version}-upstream.patch License: LGPLv2+ and GPLv2+ and GFDL Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gmp-devel Requires: gmp >= 4.2.1 %description The MPFR library is a C library for multiple-precision floating-point computations with "correct rounding". The MPFR is efficient and also 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). MPFR is based on the GMP multiple-precision library. The library is available as 32-bit and 64-bit. %package devel Summary: Development tools A C library for mpfr library Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: info Requires: /sbin/install-info %description devel The static libraries, header files and documentation for using the MPFR multiple-precision floating-point library in applications. If you want to develop applications which will use the MPFR library, you'll need to install the mpfr-devel package. You'll also need to install the mpfr package. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc -q64" or "gcc -maix64". %prep export PATH=/opt/freeware/bin:$PATH %setup -q %patch0 -p1 -b .up %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="xlc -q64" ./configure \ --prefix=%{_prefix} \ --infodir=%{_prefix}/info \ --enable-shared --enable-static \ --disable-assert make %{?_smp_mflags} cp .libs/libmpfr.so.1 . make distclean # now build the 32-bit version export CC="xlc" ./configure \ --prefix=%{_prefix} \ --infodir=%{_prefix}/info \ --enable-shared --enable-static \ --disable-assert make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q .libs/libmpfr.a ./libmpfr.so.1 %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install gzip -9 $RPM_BUILD_ROOT/%{_infodir}/mpfr.info %post devel /sbin/install-info %{_infodir}/mpfr.info.gz %{_infodir}/dir %preun devel if [ $1 -eq 0 ]; then /sbin/install-info --delete %{_infodir}/mpfr.info.gz %{_infodir}/dir fi %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,system,-) %doc COPYING COPYING.LIB NEWS README %{_libdir}/libmpfr.a %files devel %defattr(-,root,root,-) %{_libdir}/libmpfr.la %{_includedir}/*.h %{_infodir}/mpfr.info* %changelog * Mon Jan 07 2008 Michael Perzl - 2.3.0-2 - included both 32-bit and 64-bit shared objects * Wed Nov 28 2007 Michael Perzl 2.3.0-1 - first version for AIX V5.1 and higher