gmp/gmp.spec
OBS User autobuild 980ecfffe0 Accepting request 29122 from devel:libraries:c_c++
Copy from devel:libraries:c_c++/gmp based on submit request 29122 from user rguenther

OBS-URL: https://build.opensuse.org/request/show/29122
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gmp?expand=0&rev=15
2010-01-14 14:21:37 +00:00

185 lines
4.4 KiB
RPMSpec

#
# spec file for package gmp (Version 4.3.2)
#
# Copyright (c) 2010 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: GPLv3+ ; LGPLv3+
Group: System/Libraries
AutoReqProv: on
# bug437293
%ifarch ppc64
Obsoletes: gmp-64bit
%endif
#
Version: 4.3.2
Release: 1
Summary: The GNU MP Library
Url: http://gmplib.org/
Source: gmp-%{version}.tar.bz2
Source2: baselibs.conf
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: GPLv3+ ; LGPLv3+
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: GPLv3+ ; LGPLv3+
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: GPLv3+ ; LGPLv3+
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
%define sanitized_platform %(echo %{_target_cpu} | sed -e "s/sparc64.*/sparc64/" -e "s/sparcv.*/sparc/")-%{_vendor}-%{_target_os}
CFLAGS="$RPM_OPT_FLAGS -fexceptions" \
./configure --prefix=/usr \
--libdir=%{_libdir} \
--infodir=%{_infodir} \
--build=%{sanitized_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