source: projects/specs/branches/6/g/gmp/gmp-vl.spec @ 3575

Revision 3575, 12.9 KB checked in by kenta, 13 years ago (diff)

gmp: new upstream release

Line 
1#
2# Important for %{ix86}:
3# This rpm has to be build on a CPU with sse2 support like Pentium 4 !
4#
5%ifarch %{ix86}
6%define              SSE2       1
7%else
8%define              SSE2       0
9%endif
10
11# Don't you want to build a libraries using SSE2?
12%{?_without_sse2%define SSE2    0}
13
14%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
15
16Summary: A GNU arbitrary precision library.
17Summary(ja): GNU 多倍長演算ライブラリ
18Name: gmp
19Version: 4.3.2
20Release: 1%{?_dist_release}
21URL: http://gmplib.org/
22Source: ftp://ftp.gnu.org/pub/gnu/gmp/gmp-%{version}.tar.bz2
23Source2: gmp.h
24Source3: gmp-mparam.h
25Patch0: gmp-4.0.1-s390.patch
26License: LGPLv3+
27Group: System Environment/Libraries
28BuildRoot: %{_tmppath}/%{name}-%{version}-root
29BuildRequires: autoconf libtool
30Obsoletes: gmp4
31
32Vendor: Project Vine
33Distribution: Vine Linux
34Packager: inagaki, kenta
35
36%description
37The gmp package contains GNU MP, a library for arbitrary precision
38arithmetic, signed integers operations, rational numbers and floating
39point numbers. GNU MP is designed for speed, for both small and very
40large operands. GNU MP is fast because it uses fullwords as the basic
41arithmetic type, it uses fast algorithms, it carefully optimizes
42assembly code for many CPUs' most common inner loops, and it generally
43emphasizes speed over simplicity/elegance in its operations.
44
45Install the gmp package if you need a fast arbitrary precision
46library.
47
48%package devel
49Summary: Development tools for the GNU MP arbitrary precision library.
50Group: Development/Libraries
51Requires: %{name} = %{version}-%{release}
52Requires(post): /sbin/install-info
53Requires(preun): /sbin/install-info
54Obsoletes: gmp4-devel
55
56%description devel
57The libraries, header files and documentation for using the GNU MP
58arbitrary precision library in applications.
59
60If you want to develop applications which will use the GNU MP library,
61you'll need to install the gmp-devel package.  You'll also need to
62install the gmp package.
63
64%package static
65Summary: Development tools for the GNU MP arbitrary precision library
66Group: Development/Libraries
67Requires: %{name}-devel = %{version}-%{release}
68
69%description static
70The static libraries for using the GNU MP arbitrary precision library
71in applications.
72
73%package -n compat32-%{name}
74Summary: A GNU arbitrary precision library.
75Group: System Environment/Libraries
76Requires: %{name} = %{version}-%{release}
77
78%description -n compat32-%{name}
79The gmp package contains GNU MP, a library for arbitrary precision
80arithmetic, signed integers operations, rational numbers and floating
81point numbers. GNU MP is designed for speed, for both small and very
82large operands. GNU MP is fast because it uses fullwords as the basic
83arithmetic type, it uses fast algorithms, it carefully optimizes
84assembly code for many CPUs' most common inner loops, and it generally
85emphasizes speed over simplicity/elegance in its operations.
86
87Install the gmp package if you need a fast arbitrary precision
88library.
89
90%package -n compat32-%{name}-devel
91Summary: Development tools for the GNU MP arbitrary precision library.
92Group: Development/Libraries
93Requires: compat32-%{name} = %{version}-%{release}
94Requires: %{name}-devel = %{version}-%{release}
95
96%description -n compat32-%{name}-devel
97The libraries, header files and documentation for using the GNU MP
98arbitrary precision library in applications.
99
100If you want to develop applications which will use the GNU MP library,
101you'll need to install the gmp-devel package.  You'll also need to
102install the gmp package.
103
104%package -n compat32-%{name}-static
105Summary: Development tools for the GNU MP arbitrary precision library
106Group: Development/Libraries
107Requires: compat32-%{name}-devel = %{version}-%{release}
108
109%description -n compat32-%{name}-static
110The static libraries for using the GNU MP arbitrary precision library
111in applications.
112
113
114%prep
115%setup -q
116%patch0 -p1
117
118%build
119autoreconf -if
120if as --help | grep -q execstack; then
121  # the object files do not require an executable stack
122  export CCAS="gcc -c -Wa,--noexecstack"
123fi
124mkdir base
125cd base
126ln -s ../configure .
127%configure --enable-mpbsd --enable-cxx
128perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
129export LD_LIBRARY_PATH=`pwd`/.libs
130make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
131cd ..
132
133%if %{SSE2}
134%define _host pentium4-vine-linux
135mkdir build-sse2
136cd build-sse2
137ln -s ../configure .
138CFLAGS="%{optflags} -march=pentium4"
139%configure --enable-mpbsd --enable-cxx
140
141perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
142export LD_LIBRARY_PATH=`pwd`/.libs
143make %{?_smp_mflags}
144unset CFLAGS
145cd ..
146%endif
147
148%install
149[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
150cd base
151export LD_LIBRARY_PATH=`pwd`/.libs
152make install DESTDIR=$RPM_BUILD_ROOT
153install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_includedir}
154
155rm -f $RPM_BUILD_ROOT%{_libdir}/lib{gmp,mp,gmpxx}.la
156rm -f $RPM_BUILD_ROOT%{_infodir}/dir
157/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
158ln -sf libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/libgmpxx.so
159cd ..
160
161%if %{SSE2}
162cd build-sse2
163export LD_LIBRARY_PATH=`pwd`/.libs
164mkdir $RPM_BUILD_ROOT%{_libdir}/sse2
165install -m 755 .libs/libgmp.so.3.* $RPM_BUILD_ROOT%{_libdir}/sse2
166cp -a .libs/libgmp.so.3 $RPM_BUILD_ROOT%{_libdir}/sse2
167chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmp.so.3
168install -m 755 .libs/libgmpxx.so.4.* $RPM_BUILD_ROOT%{_libdir}/sse2
169cp -a .libs/libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/sse2
170chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmpxx.so.4
171install -m 755 .libs/libmp.so.3.* $RPM_BUILD_ROOT%{_libdir}/sse2
172cp -a .libs/libmp.so.3 $RPM_BUILD_ROOT%{_libdir}/sse2
173chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libmp.so.3
174cd ..
175%endif
176
177# Rename gmp.h to gmp-<arch>.h and gmp-mparam.h to gmp-mparam-<arch>.h to
178# avoid file conflicts on multilib systems and install wrapper include files
179# gmp.h and gmp-mparam-<arch>.h
180basearch=%{_arch}
181# always use i386 for iX86
182%ifarch %{ix86}
183basearch=i386
184%endif
185# always use arm for arm*
186%ifarch %{arm}
187basearch=arm
188%endif
189# Rename files and install wrappers
190
191mv %{buildroot}/%{_includedir}/gmp.h %{buildroot}/%{_includedir}/gmp-${basearch}.h
192install -m644 %{SOURCE2} %{buildroot}/%{_includedir}/gmp.h
193mv %{buildroot}/%{_includedir}/gmp-mparam.h %{buildroot}/%{_includedir}/gmp-mparam-${basearch}.h
194install -m644 %{SOURCE3} %{buildroot}/%{_includedir}/gmp-mparam.h
195
196
197%check
198%ifnarch ppc
199cd base
200export LD_LIBRARY_PATH=`pwd`/.libs
201make %{?_smp_mflags} check
202cd ..
203%endif
204
205%if %{SSE2}
206cd build-sse2
207export LD_LIBRARY_PATH=`pwd`/.libs
208make %{?_smp_mflags} check
209cd ..
210%endif
211
212
213%post -p /sbin/ldconfig
214
215%postun -p /sbin/ldconfig
216
217%post devel
218/sbin/install-info %{_infodir}/gmp.info.gz %{_infodir}/dir
219
220%preun devel
221if [ "$1" = 0 ]; then
222        /sbin/install-info --delete %{_infodir}/gmp.info.gz %{_infodir}/dir
223fi
224
225%post -n compat32-%{name} -p /sbin/ldconfig
226
227%postun -n compat32-%{name} -p /sbin/ldconfig
228
229%clean
230[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
231
232
233%files
234%defattr(-,root,root,-)
235%doc COPYING COPYING.LIB NEWS README
236%{_libdir}/libgmp.so.*
237%{_libdir}/libmp.so.*
238%{_libdir}/libgmpxx.so.*
239%if %{SSE2}
240%{_libdir}/sse2/*
241%endif
242
243%files devel
244%defattr(-,root,root,-)
245%{_libdir}/libmp.so
246%{_libdir}/libgmp.so
247%{_libdir}/libgmpxx.so
248#{_libdir}/libmpfr.a
249%{_includedir}/*.h
250%{_infodir}/gmp.info*
251#{_infodir}/mpfr.info*
252
253%files static
254%defattr(-,root,root,-)
255%doc README
256%{_libdir}/libmp.a
257%{_libdir}/libgmp.a
258%{_libdir}/libgmpxx.a
259
260# compat32
261%if %{build_compat32}
262%files -n compat32-%{name}
263%defattr(-,root,root,-)
264%{_libdir}/libgmp.so.*
265%{_libdir}/libmp.so.*
266%{_libdir}/libgmpxx.so.*
267%if %{SSE2}
268%{_libdir}/sse2/*
269%endif
270
271%files -n compat32-%{name}-devel
272%defattr(-,root,root,-)
273%{_libdir}/libmp.so
274%{_libdir}/libgmp.so
275%{_libdir}/libgmpxx.so
276#{_libdir}/libmpfr.a
277
278%files -n compat32-%{name}-static
279%defattr(-,root,root,-)
280%doc README
281%{_libdir}/libmp.a
282%{_libdir}/libgmp.a
283%{_libdir}/libgmpxx.a
284%endif
285
286%changelog
287* Tue Apr 19 2011 NAKAMURA Kenta <kenta@vinelinux.org> 4.3.2-1
288- new upstream release
289
290* Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 4.3.1-2
291- rebuilt with rpm-4.8.1-3
292
293* Sat Nov 28 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.1-1
294- new upstream release
295- split static libraries to subpackage
296
297* Sun Jun 28 2009 NAKAMURA Kenta <kenta@vinelinux.org> 4.2.2-5
298- added compat32 package for x86_64 arch support
299- run autoreconf to get autotools right
300
301* Mon May 19 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-4
302- applied new versioning policy
303- added Patch3 from upstream
304
305* Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl2
306- remove --enable-mpfr
307  (mpfr has been splitted since gmp 4.2)
308
309* Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl1
310- new upstream release
311  * Mon Sep 24 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-3
312  - fix libgmpxx.so link
313  * Thu Sep 20 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-2
314  - fix check tag
315  * Thu Nov  2 2006 Thomas Woerner <twoerner@redhat.com> 4.1.4-10
316  - fixed arch order in gmp.h and gmp-mparam.h wrapper for all architectures
317- re-include libraries using SSE2 on x86 arch
318- updated URL
319
320* Wed May 09 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1.4-6vl2
321- rebuilt with new toolchain
322
323* Sat Feb 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.1.4-6vl1
324- new upstream release
325  * Mon Apr 18 2005 Thomas Woerner <twoerner@redhat.com> 4.1.4-6
326  - fixed __setfpucw call in mpfr-test.h
327  * Sun Sep 26 2004 Florian La Roche <Florian.LaRoche@redhat.de>
328  - disable ppc64 patch, now fixed upstream
329  * Wed Mar 31 2004 Thomas Woerner <twoerner@redhat.com> 4.1.2-14
330  - dropped RPATH (#118506)
331- exclude libraries using SSE2 in default settings.
332
333* Fri Mar 12 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 4.1.2-13vl1
334- modified for Vine
335
336* Mon Jan 20 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl3
337- added Obsoletes: gmp4(-devel)
338
339* Wed Jan 15 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl2
340- rebuilt against new toolchain
341
342* Fri May 31 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org>
343- modified for Vine
344
345* Sat May 25 2002 Florian La Roche <Florian.LaRoche@redhat.de>
346- update to version 4.1
347- patch s390 gmp-mparam.h to match other archs.
348
349* Thu May 23 2002 Tim Powers <timp@redhat.com>
350- automated rebuild
351
352* Mon Mar 11 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-3
353- Use standard %%configure macro and edit %%{_tmppath}
354
355* Tue Feb 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-2
356- Rebuild
357
358* Tue Jan 22 2002 Florian La Roche <Florian.LaRoche@redhat.de>
359- update to 4.0.1
360- bzip2 src
361
362* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
363- automated rebuild
364
365* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
366- Bump release + rebuild.
367
368* Mon Feb 05 2001 Philipp Knirsch <pknirsch@redhat.de>
369- Fixed bugzilla bug #25515 where GMP wouldn't work on IA64 as IA64 is not
370correctly identified as a 64 bit platform.
371
372* Mon Dec 18 2000 Preston Brown <pbrown@redhat.com>
373- include bsd mp library
374
375* Tue Oct 17 2000 Florian La Roche <Florian.LaRoche@redhat.de>
376- update to 3.1.1
377
378* Sun Sep  3 2000 Florian La Roche <Florian.LaRoche@redhat.com>
379- update to 3.1
380
381* Sat Aug 19 2000 Preston Brown <pbrown@redhat.com>
382- devel subpackage depends on main package so that .so symlink is OK.
383
384* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
385- automatic rebuild
386
387* Sat Jun  3 2000 Nalin Dahyabhai <nalin@redhat.com>
388- switch to the configure and makeinstall macros
389- FHS-compliance fixing
390- move docs to non-devel package
391
392* Fri Apr 28 2000 Bill Nottingham <notting@redhat.com>
393- libtoolize for ia64
394
395* Fri Apr 28 2000 Florian La Roche <Florian.LaRoche@redhat.com>
396- update to 3.0.1
397
398* Thu Apr 27 2000 Jakub Jelinek <jakub@redhat.com>
399- sparc64 fixes for 3.0
400
401* Wed Apr 26 2000 Florian La Roche <Florian.LaRoche@redhat.com>
402- update to 3.0
403
404* Mon Feb 14 2000 Matt Wilson <msw@redhat.com>
405- #include <string.h> in files that use string functions
406
407* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
408- fix description and summary
409
410* Mon Dec 06 1999 Michael K. Johnson <johnsonm@redhat.com>
411- s/GPL/LGPL/
412- build as non-root (#7604)
413
414* Mon Sep 06 1999 Jakub Jelinek <jj@ultra.linux.cz>
415- merge in some debian gmp fixes
416- Ulrich Drepper's __gmp_scale2 fix
417- my mpf_set_q fix
418- sparc64 fixes
419
420* Wed Apr 28 1999 Cristian Gafton <gafton@redhat.com>
421- add sparc patch for PIC handling
422
423* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
424- auto rebuild in the new build environment (release 8)
425
426* Thu Feb 11 1999 Michael Johnson <johnsonm@redhat.com>
427- include the private header file gmp-mparam.h because several
428  apps seem to assume that they are building against the gmp
429  source tree and require it.  Sigh.
430
431* Tue Jan 12 1999 Michael K. Johnson <johnsonm@redhat.com>
432- libtoolize to work on arm
433
434* Thu Sep 10 1998 Cristian Gafton <gafton@redhat.com>
435- yet another touch of the spec file
436
437* Wed Sep  2 1998 Michael Fulbright <msf@redhat.com>
438- looked over before inclusion in RH 5.2
439
440* Sat May 24 1998 Dick Porter <dick@cymru.net>
441- Patch Makefile.in, not Makefile
442- Don't specify i586, let configure decide the arch
443
444* Sat Jan 24 1998 Marc Ewing <marc@redhat.com>
445- started with package from Toshio Kuratomi <toshiok@cats.ucsc.edu>
446- cleaned up file list
447- fixed up install-info support
448
Note: See TracBrowser for help on using the repository browser.