File libmpfr.spec of Package libmpfr
%define realname mpfr
%define realver 4.2.2
%define srcext tar.xz
%define so_ver 6
# turn off the generation of debuginfo rpm (RH9) ??
%global debug_package %{nil}
# Common info
Name: libmpfr%{?so_ver}
Version: %{realver}
Release: wiz%{?extraver:0.}1%{?dist}
License: LGPL-3.0+
Group: System/Libraries
URL: http://www.mpfr.org/
Summary: The GNU multiple-precision floating-point library
# Install-time parameters
Provides: %{realname} = %{version}-%{release}
# Build-time parameters
BuildRequires: pkg-config
BuildRequires: xz
BuildRequires: gmp-devel >= 5.0.0
%if 0%{?suse_version}
BuildRequires: makeinfo
%endif
BuildRoot: %{_tmppath}/%{name}-root
Source0: http://www.mpfr.org/mpfr-current/%{realname}-%{realver}%{?extraver}.%{srcext}
%description
The MPFR library is a C library for multiple-precision floating-point
computations with correct rounding. MPFR has continuously been supported by the
INRIA and the current main authors come from the Caramba and AriC project-teams
at Loria (Nancy, France) and LIP (Lyon, France) respectively; see more on the
credit page. MPFR is based on the GMP multiple-precision library.
The main goal of MPFR is to provide a library for multiple-precision
floating-point computation which 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 significand).
%package -n mpfr-devel
Group: Development/Languages/C and C++
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}
Provides: lib%{realname}-devel = %{version}-%{release}
%description -n mpfr-devel
Development files for %{name}
# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{realver}%{?extraver}
%build
_CFLAGS='%{optflags} %{?gcc_lto}'
_LDFLAGS='-Wl,--as-needed -Wl,--strip-all -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro %{?gcc_lto}'
%configure \
--enable-shared-cache \
--disable-static \
CFLAGS="$_CFLAGS" \
LDFLAGS="$_LDFLAGS"
%{__make} %{?_smp_mflags}
%install
%{__make} install DESTDIR=%{buildroot}
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}%{_datadir}/doc
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%license COPYING*
%doc AUTHORS NEWS README
%{_libdir}/libmpfr.so.%{?so_ver}*
# Development stuff
%files -n mpfr-devel
%defattr(-,root,root)
%{_includedir}/mpfr.h
%{_includedir}/mpf2mpfr.h
%{_libdir}/libmpfr.so
%{_libdir}/pkgconfig/mpfr.pc
%exclude %{_libdir}/*.la
%doc %{_infodir}/*
%exclude %{_infodir}/dir
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n mpfr-devel
/sbin/install-info %{_infodir}/mpfr.info* %{_infodir}/dir || :
%preun -n mpfr-devel
if [ ${1} -eq 0 ]; then
/sbin/install-info --delete %{_infodir}/mpfr.info* %{_infodir}/dir || :
fi
%changelog