5518e3
5518e3
# build compat-libmpc for bootstrapping purposes
5518e3
%define bootstrap 1
5518e3
5518e3
Summary: C library for multiple precision complex arithmetic
5518e3
Name: libmpc
5518e3
Version: 1.0.1
ed6099
Release: 3%{?dist}
5518e3
License: LGPLv3+ and GFDL
5518e3
Group: Development/Tools
5518e3
URL: http://www.multiprecision.org/
5518e3
Source0: http://www.multiprecision.org/mpc/download/mpc-%{version}.tar.gz
5518e3
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5518e3
5518e3
BuildRequires: gmp-devel >= 4.3.2
5518e3
BuildRequires: mpfr-devel >= 2.4.2
5518e3
BuildRequires: texinfo
5518e3
5518e3
%if 0%{?bootstrap}
5518e3
Source1: http://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz
5518e3
%endif
5518e3
5518e3
%description
5518e3
5518e3
MPC is a C library for the arithmetic of complex numbers with
5518e3
arbitrarily high precision and correct rounding of the result. It is
5518e3
built upon and follows the same principles as Mpfr.
5518e3
5518e3
%package devel
5518e3
Summary: Header and shared development libraries for MPC
5518e3
Group: Development/Libraries
5518e3
Requires: %{name}%{?_isa} = %{version}-%{release}
5518e3
Requires: mpfr-devel gmp-devel
5518e3
5518e3
%description devel
5518e3
Header files and shared object symlinks for MPC is a C library.
5518e3
5518e3
%package -n compat-libmpc
5518e3
Summary: compat/bootstrap mpc-0.9 library
5518e3
%description -n compat-libmpc
5518e3
%{summary}.
5518e3
5518e3
5518e3
%prep
5518e3
%setup -q -n mpc-%{version} %{?bootstrap:-a 1}
5518e3
5518e3
%build
5518e3
export CPPFLAGS="%{optflags} -std=gnu99"
5518e3
export CFLAGS="%{optflags} -std=gnu99"
5518e3
export EGREP=egrep
5518e3
5518e3
%if 0%{?bootstrap}
5518e3
pushd mpc-0.9/
5518e3
%configure --disable-static
5518e3
make %{?_smp_mflags}
5518e3
popd
5518e3
%endif
5518e3
5518e3
%configure --disable-static
5518e3
make %{?_smp_mflags}
5518e3
5518e3
%check
5518e3
make check
5518e3
5518e3
%install
5518e3
rm -rf $RPM_BUILD_ROOT
5518e3
5518e3
%if 0%{?bootstrap}
5518e3
make install DESTDIR=$RPM_BUILD_ROOT -C mpc-0.9/
5518e3
5518e3
## remove everything but shlib
5518e3
rm -fv $RPM_BUILD_ROOT%{_libdir}/libmpc.so
5518e3
rm -fv $RPM_BUILD_ROOT%{_includedir}/*
5518e3
rm -fv $RPM_BUILD_ROOT%{_infodir}/*
5518e3
%endif
5518e3
5518e3
make install DESTDIR=$RPM_BUILD_ROOT
5518e3
rm -f $RPM_BUILD_ROOT/%{_libdir}/libmpc.la
5518e3
rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir
5518e3
5518e3
%clean
5518e3
rm -rf $RPM_BUILD_ROOT
5518e3
5518e3
%post -p /sbin/ldconfig
5518e3
%postun -p /sbin/ldconfig
5518e3
5518e3
%post devel
5518e3
if [ -f %{_infodir}/mpc.info.gz ]; then # for --excludedocs
5518e3
   /sbin/install-info %{_infodir}/mpc.info.gz %{_infodir}/dir || :
5518e3
fi
5518e3
5518e3
%preun devel
5518e3
if [ $1 = 0 ]; then
5518e3
   if [ -f %{_infodir}/mpc.info.gz ]; then # for --excludedocs
5518e3
      /sbin/install-info --delete %{_infodir}/mpc.info.gz %{_infodir}/dir || :
5518e3
   fi
5518e3
fi
5518e3
5518e3
%files
5518e3
%defattr(-,root,root,-)
5518e3
%doc README NEWS COPYING.LESSER
5518e3
%{_libdir}/libmpc.so.3*
5518e3
5518e3
%files devel
5518e3
%defattr(-,root,root,-)
5518e3
%{_libdir}/libmpc.so
5518e3
%{_includedir}/mpc.h
5518e3
%{_infodir}/*.info*
5518e3
5518e3
%post -n compat-libmpc -p /sbin/ldconfig
5518e3
%postun -n compat-libmpc -p /sbin/ldconfig
5518e3
5518e3
%files -n compat-libmpc
5518e3
%{_libdir}/libmpc.so.2*
5518e3
5518e3
5518e3
%changelog
ed6099
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.0.1-3
ed6099
- Mass rebuild 2014-01-24
ed6099
ed6099
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.1-2
ed6099
- Mass rebuild 2013-12-27
ed6099
5518e3
* Tue Feb 19 2013 Rex Dieter <rdieter@fedoraproject.org> - 1.0.1-1
5518e3
- compat-libmpc (for bootsrapping purposes)
5518e3
- mpc-1.0.1
5518e3
- update Source URLs
5518e3
- fix License: tag
5518e3
5518e3
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-3
5518e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5518e3
5518e3
* Thu Aug 02 2012 Rex Dieter <rdieter@fedoraproject.org> - 1.0-2
5518e3
- %%files: track lib soname (so bumps aren't a surprise)
5518e3
- tighten subpkg deps (%%_isa)
5518e3
- %%build: --disable-static
5518e3
5518e3
* Thu Aug  2 2012 Petr Machata <pmachata@redhat.com> - 1.0-1
5518e3
- Upstream 1.0
5518e3
5518e3
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-3.2
5518e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5518e3
5518e3
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2.2
5518e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5518e3
5518e3
* Wed Oct 26 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.9-1.2
5518e3
- rebuild with new gmp without compat lib
5518e3
5518e3
* Wed Oct 12 2011 Peter Schiffer <pschiffe@redhat.com> - 0.9-1.1
5518e3
- rebuild with new gmp
5518e3
5518e3
* Wed Jun 22 2011  <pmachata@redhat.com> - 0.9-1
5518e3
- Upstream 0.9
5518e3
5518e3
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.3-0.3.svn855
5518e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
5518e3
5518e3
* Tue Nov 30 2010 Petr Machata <pmachata@redhat.com> - 0.8.3-0.2.svn855
5518e3
- Bump for rebuild against the new mpfr
5518e3
5518e3
* Fri Nov 19 2010 Petr Machata <pmachata@redhat.com> - 0.8.3-0.1.svn855
5518e3
- Devel updates (to-be-0.8.3, SVN release 855)
5518e3
  - New functions mpc_set_dc, mpc_set_ldc, mpc_get_dc, mpc_get_ldc
5518e3
  - Speed-up mpc_pow_si and mpc_pow_z
5518e3
  - Bug fixes in trigonometric functions, exp, sqrt
5518e3
- Upstream 0.8.2
5518e3
  - Speed-up mpc_pow_ui
5518e3
- Adjust BuildRequires
5518e3
- Resolves: #653931
5518e3
5518e3
* Wed Jan 20 2010 Petr Machata <pmachata@redhat.com> - 0.8.1-1
5518e3
- Upstream 0.8.1
5518e3
  - acosh, asinh, atanh: swap of precisions between real and imaginary parts
5518e3
  - atan: memory leak
5518e3
  - log: wrong ternary value in data file; masked by bug in Mpfr 2.4.1
5518e3
- Resolves: #555471 FTBFS libmpc-0.8-3.fc13
5518e3
5518e3
* Fri Nov 13 2009 Petr Machata <pmachata@redhat.com> - 0.8-3
5518e3
- Require mpfr-devel, gmp-devel in -devel subpackage
5518e3
- Don't pass --entry to install-info
5518e3
5518e3
* Thu Nov 12 2009 Petr Machata <pmachata@redhat.com> - 0.8-2
5518e3
- Rename the package to libmpc, it's a better choice of name
5518e3
- %%preun should uninstall mpc's info page, not make's
5518e3
- Move info page to -devel
5518e3
- BR on -devel packages
5518e3
- Drop postscript documentation
5518e3
5518e3
* Thu Nov 12 2009 Petr Machata <pmachata@redhat.com> - 0.8-1
5518e3
- Initial package.