1 |
%define major 10 |
2 |
%define major_xx 4 |
3 |
%define major_mp 3 |
4 |
|
5 |
%define libname %mklibname %{name} %{major} |
6 |
%define develname %mklibname %{name} -d |
7 |
%define libname_gmpxx %mklibname %{name}xx %{major_xx} |
8 |
%define develname_gmpxx %mklibname %{name}xx -d |
9 |
%define libname_mp %mklibname %{name}mp %{major_mp} |
10 |
%define develname_mp %mklibname %{name}mp -d |
11 |
|
12 |
Summary: A GNU arbitrary precision library |
13 |
Name: gmp |
14 |
Version: 5.1.0 |
15 |
Release: %mkrel 1 |
16 |
License: GPLv3 |
17 |
Group: System/Libraries |
18 |
URL: http://gmplib.org/ |
19 |
Source0: http://ftp.gnu.org/pub/gnu/gmp/%{name}-%{version}.tar.xz |
20 |
Source1: http://ftp.gnu.org/pub/gnu/gmp/%{name}-%{version}.tar.xz.sig |
21 |
BuildRequires: bison |
22 |
BuildRequires: flex |
23 |
BuildRequires: readline-devel |
24 |
BuildRequires: ncurses-devel |
25 |
|
26 |
%description |
27 |
The gmp package contains GNU MP, a library for arbitrary precision |
28 |
arithmetic, signed integers operations, rational numbers and floating |
29 |
point numbers. GNU MP is designed for speed, for both small and very |
30 |
large operands. |
31 |
|
32 |
GNU MP is fast for several reasons: |
33 |
- it uses fullwords as the basic arithmetic type, |
34 |
- it uses fast algorithms, |
35 |
- it carefully optimizes assembly code for many CPUs' most common |
36 |
inner loops |
37 |
- it generally emphasizes speed over simplicity/elegance in its |
38 |
operations |
39 |
|
40 |
%package -n %{libname} |
41 |
Summary: A GNU arbitrary precision library |
42 |
Group: System/Libraries |
43 |
Provides: lib%{name} = %{version}-%{release} |
44 |
|
45 |
%description -n %{libname} |
46 |
The gmp package contains GNU MP, a library for arbitrary precision |
47 |
arithmetic, signed integers operations, rational numbers and floating |
48 |
point numbers. GNU MP is designed for speed, for both small and very |
49 |
large operands. |
50 |
|
51 |
GNU MP is fast for several reasons: |
52 |
- it uses fullwords as the basic arithmetic type, |
53 |
- it uses fast algorithms |
54 |
- it carefully optimizes assembly code for many CPUs' most common |
55 |
inner loops |
56 |
- it generally emphasizes speed over simplicity/elegance in its |
57 |
operations |
58 |
|
59 |
%package -n %{develname} |
60 |
Summary: Development tools for the GNU MP arbitrary precision library |
61 |
Group: Development/C |
62 |
Requires(post): rpm-helper |
63 |
Requires(preun): rpm-helper |
64 |
Requires: %{libname} = %{version}-%{release} |
65 |
Provides: lib%{name}-devel = %{version}-%{release} |
66 |
Provides: %{name}-devel = %{version}-%{release} |
67 |
Obsoletes: %{mklibname %{name} 3 -d} < 4.2.4 |
68 |
|
69 |
%description -n %{develname} |
70 |
The static libraries, header files and documentation for using the GNU MP |
71 |
arbitrary precision library in applications. |
72 |
|
73 |
If you want to develop applications which will use the GNU MP library, |
74 |
you'll need to install the gmp-devel package. You'll also need to |
75 |
install the gmp package. |
76 |
|
77 |
%package -n %{libname_gmpxx} |
78 |
Summary: C++ support for GMP |
79 |
Group: System/Libraries |
80 |
Requires: %{libname} = %{version}-%{release} |
81 |
Provides: libgmpxx = %{version}-%{release} |
82 |
Obsoletes: %mklibname %{name}xx 3 |
83 |
|
84 |
%description -n %{libname_gmpxx} |
85 |
C++ support for GMP. |
86 |
|
87 |
%package -n %{develname_gmpxx} |
88 |
Summary: C++ Development tools for the GMP |
89 |
Group: Development/C++ |
90 |
Requires: %{develname} = %{version}-%{release} |
91 |
Requires: %{libname_gmpxx} = %{version}-%{release} |
92 |
Provides: lib%{name}xx-devel = %{version}-%{release} |
93 |
Provides: gmpxx-devel = %{version}-%{release} |
94 |
Obsoletes: %{mklibname %{name}xx 4 -d} < 4.2.4 |
95 |
|
96 |
%description -n %{develname_gmpxx} |
97 |
C++ Development tools for the GMP. |
98 |
|
99 |
%prep |
100 |
%setup -q |
101 |
|
102 |
%build |
103 |
%configure2_5x \ |
104 |
--enable-cxx \ |
105 |
--enable-mpbsd \ |
106 |
--enable-fft \ |
107 |
--disable-static |
108 |
%make |
109 |
|
110 |
%check |
111 |
# All tests must pass |
112 |
make check |
113 |
|
114 |
%install |
115 |
%makeinstall_std |
116 |
|
117 |
#multiarch |
118 |
%multiarch_includes %{buildroot}%{_includedir}/gmp.h |
119 |
|
120 |
#we don't want these |
121 |
find %{buildroot} -name "*.la" -delete |
122 |
|
123 |
%post -n %{develname} |
124 |
%_install_info %{name}.info |
125 |
|
126 |
%preun -n %{develname} |
127 |
%_remove_install_info %{name}.info |
128 |
|
129 |
%files -n %{libname} |
130 |
%doc NEWS README |
131 |
%{_libdir}/libgmp.so.%{major}* |
132 |
|
133 |
%files -n %{develname} |
134 |
%doc doc demos |
135 |
%{_libdir}/libgmp.so |
136 |
%{_includedir}/gmp.h |
137 |
%multiarch %{multiarch_includedir}/gmp.h |
138 |
%{_infodir}/gmp.info* |
139 |
|
140 |
%files -n %{libname_gmpxx} |
141 |
%{_libdir}/libgmpxx.so.%{major_xx}* |
142 |
|
143 |
%files -n %{develname_gmpxx} |
144 |
%{_libdir}/libgmpxx.so |
145 |
%{_includedir}/gmpxx.h |