File gmp.spec of Package gmp

#
# spec file for package gmp (Version 4.3.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           gmp
BuildRequires:  gcc-c++
License:        GPL v3 or later; LGPL v3 or later
Group:          System/Libraries
AutoReqProv:    on
# bug437293
%ifarch ppc64
Obsoletes:      gmp-64bit
%endif
#
Version:        4.3.1
Release:        1
Summary:        The GNU MP Library
Url:            http://gmplib.org/
Source:         gmp-%{version}.tar.bz2
Patch0:         gmp-noexec.diff
Patch2:         gmp-s390x.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A library for calculating huge numbers (integer and floating point).



Authors:
--------
    Torbjorn Granlund <tege@zevs.sics.se>

%package -n libgmp3
License:        GPL v3 or later; LGPL v3 or later
Summary:        Shared library for the GNU MP Library
Group:          System/Libraries
# in openSUSE 11.1 and SLE11 the shared libraries were in the gmp package itself
Provides:       gmp = 4.2.3
Obsoletes:      gmp < 4.2.3

%description -n libgmp3
Shared library for the GNU MP Library.



Authors:
--------
    Torbjorn Granlund <tege@zevs.sics.se>

%package -n libgmpxx4
License:        GPL v3 or later; LGPL v3 or later
Summary:        C++ bindings for the GNU MP Library
Group:          System/Libraries
Requires:       libgmp3 = %{version}

%description -n libgmpxx4
C++ bindings for the GNU MP Library.



Authors:
--------
    Torbjorn Granlund <tege@zevs.sics.se>

%package devel
License:        GPL v3 or later; LGPL v3 or later
Summary:        Include Files and Libraries for Development with the GNU MP Library
Group:          Development/Languages/C and C++
Requires:       libgmp3 = %{version}
Requires:       libgmpxx4 = %{version}
AutoReqProv:    on
# bug437293
%ifarch ppc64
Obsoletes:      gmp-devel-64bit
%endif
#
PreReq:         %install_info_prereq

%description devel
These libraries are needed to develop programs which calculate with
huge numbers (integer and floating point).



Authors:
--------
    Torbjorn Granlund <tege@zevs.sics.se>

%prep
%setup -q
%patch0
%patch2

%build
# export HOME=/tmp/
# %%{?suse_update_config:%%{suse_update_config -f}}
# mv config.guess config.guess.gmp
# mv config.sub config.sub.gmp
# autoreconf -fi
# mv config.guess configfsf.guess
# mv config.sub configfsf.sub
# mv config.guess.gmp config.guess
# mv config.sub.gmp config.sub
# %ifarch ppc64
# # The PowerPC64 assembler funcs are for AIX and somehow don't work on Linux.
# rm -fv mpn/powerpc64/*.asm
# %endif
#%ifarch x86_64 x86
#	    --enable-fat \
#%endif
CFLAGS="$RPM_OPT_FLAGS -fexceptions" \
./configure --prefix=/usr \
	    --libdir=%{_libdir} \
            --infodir=%{_infodir} \
            --build=%{_target_platform} \
	    --disable-mpfr \
            --enable-cxx
make CFLAGS="$RPM_OPT_FLAGS -fexceptions" %{?jobs:-j%jobs}

%check
# do not disable "make check", FIX THE BUGS!
make check

%install
make install DESTDIR=${RPM_BUILD_ROOT}
rm $RPM_BUILD_ROOT%{_libdir}/libgmp.la
rm $RPM_BUILD_ROOT%{_libdir}/libgmpxx.la
rm $RPM_BUILD_ROOT%{_libdir}/libgmpxx.a

%post -n libgmp3 -p /sbin/ldconfig

%post -n libgmpxx4 -p /sbin/ldconfig

%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%postun -n libgmp3 -p /sbin/ldconfig

%postun -n libgmpxx4 -p /sbin/ldconfig

%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%clean
rm -rf $RPM_BUILD_ROOT

%files -n libgmp3
%defattr(-,root,root)
%{_libdir}/libgmp.so.3*

%files -n libgmpxx4
%defattr(-,root,root)
%{_libdir}/libgmpxx.so.4*

%files devel
%defattr(-,root,root)
%doc AUTHORS README NEWS
%doc demos
%doc %{_infodir}/gmp.info*.gz
%{_libdir}/libgmp.a
%{_libdir}/libgmp.so
%{_libdir}/libgmpxx.so
/usr/include/gmp.h
/usr/include/gmpxx.h

%changelog
* Tue May 12 2009 rguenther@suse.de
- Update to bugfix release GMP 4.3.1.
  * Fixed bug in mpn_gcdext, affecting also mpz_gcdext and mpz_invert.
  * Fixed some minor documentation issues.
  * Recognise more IBM "POWER" processor variants.
* Sat May 09 2009 rguenther@suse.de
- Fix baselibs.conf wrt package split.  [bnc#501465]
* Wed Apr 15 2009 rguenther@suse.de
- Update to version 4.3.0.
  * Speedups all over the board
  * Fat binaries on x86_64
- Split shared libraries according to policy.
* Wed Dec 10 2008 olh@suse.de
- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade
  (bnc#437293)
* Mon Nov 24 2008 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Mon Aug 04 2008 rguenther@suse.de
- Update to version 4.2.3.
  * minor bugfixes
- Remove no longer applicable patches.
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Thu Jan 03 2008 rguenther@suse.de
- Fix std::FILE usage for C++ again.
- Move info postin to the correct sub-package.
* Wed Dec 12 2007 rguenther@suse.de
- Update to 4.2.2, which is now LGPLv3.
- Remove no longer applicable patches.
- Disable building of berkley MP compatibility library.
- Run testsuite only once.
- Do not package libtool .la files.
- Do not package static C++ binding library.
- Do not package CVS changelog.
* Tue May 22 2007 rguenther@suse.de
- Fix inline behavior for C99.
* Sat Jan 13 2007 meissner@suse.de
- Mark assembler code as not needing exec stack/heap by hacking
  the m4 -> assembler wrapper script.
- Run "make check", as mandated by our packaging guidelines.
* Fri Oct 13 2006 aj@suse.de
- Fix build on x86-64.
* Fri Oct 13 2006 mjancar@suse.cz
- update to 4.2.1
  * many bugfixes
* Mon May 15 2006 rguenther@suse.de
- Disable mpfr, which is now in new packages mpfr and mpfr-devel.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jan 13 2006 kukuk@suse.de
- Create -devel subpackage
* Tue Oct 11 2005 meissner@suse.de
- fixed broken random2 code using patch from Richard Guenther.
* Sun Sep 18 2005 meissner@suse.de
- Fixed implicits.
* Wed Apr 13 2005 matz@suse.de
- Make it build on i386
* Sat Apr 09 2005 ro@suse.de
- skip testsuite on alpha
* Wed Feb 16 2005 mcihar@suse.cz
- update to 4.1.4
* Thu Nov 18 2004 ro@suse.de
- fixed file list
* Mon Sep 06 2004 schwab@suse.de
- Use autoreconf.
- Fix read-only section check.
* Tue Aug 10 2004 tcrhak@suse.cz
- update to 4.1.3
* Tue Mar 02 2004 tcrhak@suse.cz
- libtoolize, but preserve gmp wrappers for config.sub and config.guess
* Mon Mar 01 2004 meissner@suse.de
- make work on ppc64 again.
- libtoolize to add .so. suffixes on amd64 and ia64 again.
* Mon Mar 01 2004 tcrhak@suse.cz
- fixed bug #33857:
  * applied some patches for 4.1.2
  * use gmp's own config.sub (fixes the configure problem)
  * added configure option --enable-cxx
* Fri Feb 27 2004 ro@suse.de
- try to fix build with regparm changes
* Sat Jan 10 2004 schwab@suse.de
- Fix quoting in autoconf macros.
* Fri Dec 05 2003 kukuk@suse.de
- Fix compiling on s390(x)
* Fri Nov 28 2003 schwab@suse.de
- Workaround gas bug causing invalid unwind information.
- Fix aliasing bug in testsuite.
* Wed Oct 15 2003 ro@suse.de
- use jobs macro instead of -jsomething
* Wed Oct 15 2003 adrian@suse.de
- fix build for mips
- build as non-root
* Sun Sep 14 2003 aj@suse.de
- Enable mpfr library.
* Thu Apr 24 2003 ro@suse.de
- fix install_info --delete call and move from preun to postun
* Thu Feb 13 2003 mmj@suse.de
- Add %%install_info macros [#23415]
* Wed Jan 15 2003 tcrhak@suse.cz
- update to version 4.1.2
* Wed Nov 20 2002 schwab@suse.de
- Work around automake bugs.
* Wed Sep 25 2002 uli@suse.de
- x86-64: compile mpf/cmp_si.c with -fno-cse-follow-jumps to work
  around compiler bug
* Tue Sep 17 2002 ro@suse.de
- removed bogus self-provides
* Tue Jun 11 2002 meissner@suse.de
- Disabled all ppc64 assembler functions for now, reenabled make check.
* Mon Jun 10 2002 olh@suse.de
- add some basic support for ppc64, disable make check
* Wed May 22 2002 coolo@suse.de
- adding support for s390x
* Mon May 06 2002 schwab@suse.de
- Fix last change.
* Mon May 06 2002 meissner@suse.de
- varargs fixes. You cannot just cast functions pointers between
  non-varargs and varargs functions, this _will_ fail on x86_64.
* Fri Jan 18 2002 tcrhak@suse.cz
- used macros %%{_lib} and %%{_libdir}
* Fri Dec 14 2001 tcrhak@suse.cz
- update to version 4.0
* Wed Aug 01 2001 dan@suse.cz
- use bzip instead of gzip
* Thu Jun 14 2001 bk@suse.de
- Add support for s390x and update s390 support
* Mon May 28 2001 pblaha@suse.cz
- fix include on ia64
* Wed Nov 15 2000 pblaha@suse.cz
- update to 3.1.1
* Tue Oct 10 2000 schwab@suse.de
- Fix umul_ppm for ia64.
* Wed Jun 07 2000 schwab@suse.de
- Recover ia64 support.
- Match "linux*" instead of "linux-gnu*".
* Wed May 31 2000 smid@suse.cz
- upgrade to 3.0.1
* Mon May 15 2000 schwab@suse.de
- Add basic support for ia64.
* Fri Apr 14 2000 smid@suse.cz
- buildroot added
* Fri Apr 07 2000 bk@suse.de
- added suse config update macro
* Thu Feb 10 2000 kukuk@suse.de
- Move /usr/info -> /usr/share/info
* Tue Dec 14 1999 kukuk@suse.de
- Create shared libraries (BUG#1508)
- Build libmp, too
- Add a lot of patches
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Fri Sep 03 1999 uli@suse.de
- added patch for PPC
* Wed Sep 01 1999 kukuk@suse.de
- Specfile cleanup
- Run make check
* Thu Jan 02 1997 florian@suse.de
- update to version 2.0.2
openSUSE Build Service is sponsored by