]>
Commit | Line | Data |
---|---|---|
9db6ac21 JB |
1 | # |
2 | # Conditional build: | |
c9ec1c7f | 3 | %bcond_without tests # don't perform make check |
9db6ac21 | 4 | # |
6ee01af0 | 5 | Summary: Multiple-precision floating-point computations library |
54956df2 | 6 | Summary(pl.UTF-8): Biblioteka obliczeń zmiennoprzecinkowych wielokrotnej precyzji |
6ee01af0 | 7 | Name: mpfr |
d2f8c07b | 8 | Version: 4.2.1 |
2ec974bc | 9 | Release: 1 |
31543a7f | 10 | License: LGPL v3+ |
6ee01af0 | 11 | Group: Libraries |
e964a19a | 12 | Source0: https://www.mpfr.org/mpfr-current/%{name}-%{version}.tar.xz |
d2f8c07b | 13 | # Source0-md5: 523c50c6318dde6f9dc523bc0244690a |
6ee01af0 | 14 | Patch0: %{name}-info.patch |
e964a19a | 15 | URL: https://www.mpfr.org/ |
6642e189 | 16 | BuildRequires: autoconf >= 2.50 |
d1626062 | 17 | BuildRequires: autoconf-archive |
2ec974bc | 18 | BuildRequires: automake >= 1:1.13 |
ca577b00 | 19 | BuildRequires: gmp-devel >= 5.0 |
6642e189 | 20 | BuildRequires: libtool |
31543a7f | 21 | BuildRequires: tar >= 1:1.22 |
6ee01af0 | 22 | BuildRequires: texinfo |
31543a7f | 23 | BuildRequires: xz |
ca577b00 | 24 | Requires: gmp >= 5.0 |
6ee01af0 JB |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
28 | The MPFR library is a C library for multiple-precision floating-point | |
29 | computations with exact rounding (also called correct rounding). It is | |
30 | based on the GMP multiple-precision library. The main goal of MPFR is | |
31 | to provide a library for multiple-precision floating-point computation | |
32 | which is both efficient and has a well-defined semantics. It copies | |
33 | the good ideas from the ANSI/IEEE-754 standard for double-precision | |
34 | floating-point arithmetic (53-bit mantissa). | |
35 | ||
93e5165e JR |
36 | %description -l pl.UTF-8 |
37 | Biblioteka MPFR to biblioteka C do obliczeń zmiennoprzecinkowych z | |
38 | wielokrotną precyzją i dokładnym zaokrąglaniem (zwanym także poprawnym | |
39 | zaokrąglaniem). Jest oparta na bibliotece GMP wielokrotnej precyzji. | |
40 | Głównym celem MPFR jest dostarczenie biblioteki do obliczeń | |
41 | zmiennoprzecinkowych wielokrotnej precyzji, która jest wydajna i ma | |
42 | dobrze zdefiniowaną semantykę. Powiela dobre idee ze standardu | |
43 | ANSI/IEEE-754 dla arytmetyki zmiennoprzecinkowej podwójnej precyzji (z | |
44 | 53-bitową mantysą). | |
6ee01af0 JB |
45 | |
46 | %package devel | |
47 | Summary: Header files for MPFR library | |
54956df2 | 48 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki MPFR |
6ee01af0 JB |
49 | Group: Development/Libraries |
50 | Requires: %{name} = %{version}-%{release} | |
ca577b00 | 51 | Requires: gmp-devel >= 5.0 |
d2f8c07b | 52 | Obsoletes: libmpfr-devel < 4.2 |
6ee01af0 JB |
53 | |
54 | %description devel | |
55 | Header files for MPFR library. | |
56 | ||
93e5165e JR |
57 | %description devel -l pl.UTF-8 |
58 | Pliki nagłówkowe biblioteki MPFR. | |
6ee01af0 JB |
59 | |
60 | %package static | |
61 | Summary: Static MPFR library | |
54956df2 | 62 | Summary(pl.UTF-8): Statyczna biblioteka MPFR |
6ee01af0 JB |
63 | Group: Development/Libraries |
64 | Requires: %{name}-devel = %{version}-%{release} | |
65 | ||
66 | %description static | |
67 | Static MPFR library. | |
68 | ||
93e5165e | 69 | %description static -l pl.UTF-8 |
6ee01af0 JB |
70 | Statyczna biblioteka MPFR. |
71 | ||
72 | %prep | |
73 | %setup -q | |
74 | %patch0 -p1 | |
6ee01af0 | 75 | |
5fae08a2 JB |
76 | # triggers bug in gold (as of binutils-2.21.53.0.2-1.i686) |
77 | mkdir my-ld | |
78 | if [ -x /usr/bin/ld.bfd ]; then | |
79 | ln -s /usr/bin/ld.bfd my-ld/ld | |
80 | fi | |
81 | ||
6ee01af0 | 82 | %build |
5fae08a2 | 83 | export PATH=$PWD/my-ld:$PATH |
6642e189 | 84 | %{__libtoolize} |
c5c93062 | 85 | %{__aclocal} -I m4 |
6642e189 JB |
86 | %{__autoconf} |
87 | %{__automake} | |
6ee01af0 JB |
88 | %configure \ |
89 | --enable-shared | |
edea4840 | 90 | |
102da87d ER |
91 | # make -j4 creates truncated .lo files |
92 | %{__make} -j1 all | |
9db6ac21 JB |
93 | |
94 | %if %{with tests} | |
102da87d | 95 | %{__make} check |
9db6ac21 | 96 | %endif |
6ee01af0 JB |
97 | |
98 | %install | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %{__make} install \ | |
102 | DESTDIR=$RPM_BUILD_ROOT | |
103 | ||
ca577b00 JB |
104 | # obsoleted by pkg-config |
105 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libmpfr.la | |
106 | # move to PLD specific place | |
107 | install -d $RPM_BUILD_ROOT%{_examplesdir} | |
108 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/mpfr/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
109 | # packaged as %doc | |
110 | %{__rm} $RPM_BUILD_ROOT%{_docdir}/mpfr/* | |
111 | ||
102da87d ER |
112 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
113 | ||
6ee01af0 JB |
114 | %clean |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
117 | %post -p /sbin/ldconfig | |
118 | %postun -p /sbin/ldconfig | |
119 | ||
8bfa5dba | 120 | %post devel -p /sbin/postshell |
c017c350 | 121 | -/usr/sbin/fix-info-dir -c %{_infodir} |
6ee01af0 | 122 | |
8bfa5dba | 123 | %postun devel -p /sbin/postshell |
c017c350 | 124 | -/usr/sbin/fix-info-dir -c %{_infodir} |
6ee01af0 JB |
125 | |
126 | %files | |
127 | %defattr(644,root,root,755) | |
5fae08a2 | 128 | %doc AUTHORS BUGS ChangeLog NEWS README TODO doc/FAQ.html |
6ee01af0 | 129 | %attr(755,root,root) %{_libdir}/libmpfr.so.*.*.* |
ca577b00 | 130 | %attr(755,root,root) %ghost %{_libdir}/libmpfr.so.6 |
6ee01af0 JB |
131 | |
132 | %files devel | |
133 | %defattr(644,root,root,755) | |
134 | %attr(755,root,root) %{_libdir}/libmpfr.so | |
6ee01af0 JB |
135 | %{_includedir}/mpfr.h |
136 | %{_includedir}/mpf2mpfr.h | |
ca577b00 | 137 | %{_pkgconfigdir}/mpfr.pc |
6ee01af0 | 138 | %{_infodir}/mpfr.info* |
ca577b00 | 139 | %{_examplesdir}/%{name}-%{version} |
6ee01af0 JB |
140 | |
141 | %files static | |
142 | %defattr(644,root,root,755) | |
143 | %{_libdir}/libmpfr.a |