source: projects/specs/trunk/g/gmp/gmp-vl.spec @ 8183

Revision 8183, 13.0 KB checked in by kenta, 10 years ago (diff)
  • gmp
    • rebuilt
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: 5.1.3
20Release: 2%{?_dist_release}
21URL: http://gmplib.org/
22Source: ftp://ftp.gnu.org/pub/gnu/gmp/gmp-%{version}.tar.xz
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
54#Obsoletes: 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
128%configure --enable-cxx
129perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
130export LD_LIBRARY_PATH=`pwd`/.libs
131make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
132cd ..
133
134%if %{SSE2}
135%define _host pentium4-vine-linux
136mkdir build-sse2
137cd build-sse2
138ln -s ../configure .
139CFLAGS="%{optflags} -march=pentium4"
140#%configure --enable-mpbsd --enable-cxx
141%configure --enable-cxx
142
143perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
144export LD_LIBRARY_PATH=`pwd`/.libs
145make %{?_smp_mflags}
146unset CFLAGS
147cd ..
148%endif
149
150%install
151[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
152cd base
153export LD_LIBRARY_PATH=`pwd`/.libs
154make install DESTDIR=$RPM_BUILD_ROOT
155install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_includedir}
156
157rm -f $RPM_BUILD_ROOT%{_libdir}/lib{gmp,mp,gmpxx}.la
158rm -f $RPM_BUILD_ROOT%{_infodir}/dir
159/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
160ln -sf libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/libgmpxx.so
161cd ..
162
163%if %{SSE2}
164cd build-sse2
165export LD_LIBRARY_PATH=`pwd`/.libs
166mkdir $RPM_BUILD_ROOT%{_libdir}/sse2
167install -m 755 .libs/libgmp.so.*.* $RPM_BUILD_ROOT%{_libdir}/sse2
168cp -a .libs/libgmp.so.[^.]* $RPM_BUILD_ROOT%{_libdir}/sse2
169chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmp.so.[^.]*
170install -m 755 .libs/libgmpxx.so.*.* $RPM_BUILD_ROOT%{_libdir}/sse2
171cp -a .libs/libgmpxx.so.? $RPM_BUILD_ROOT%{_libdir}/sse2
172chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmpxx.so.?
173cd ..
174%endif
175
176# Rename gmp.h to gmp-<arch>.h and gmp-mparam.h to gmp-mparam-<arch>.h to
177# avoid file conflicts on multilib systems and install wrapper include files
178# gmp.h and gmp-mparam-<arch>.h
179basearch=%{_arch}
180# always use i386 for iX86
181%ifarch %{ix86}
182basearch=i386
183%endif
184# always use arm for arm*
185%ifarch %{arm}
186basearch=arm
187%endif
188# Rename files and install wrappers
189
190mv %{buildroot}/%{_includedir}/gmp.h %{buildroot}/%{_includedir}/gmp-${basearch}.h
191install -m644 %{SOURCE2} %{buildroot}/%{_includedir}/gmp.h
192mv %{buildroot}/%{_includedir}/gmp-mparam.h %{buildroot}/%{_includedir}/gmp-mparam-${basearch}.h
193install -m644 %{SOURCE3} %{buildroot}/%{_includedir}/gmp-mparam.h
194
195
196%check
197%ifnarch ppc
198cd base
199export LD_LIBRARY_PATH=`pwd`/.libs
200make %{?_smp_mflags} check
201cd ..
202%endif
203
204%if %{SSE2}
205cd build-sse2
206export LD_LIBRARY_PATH=`pwd`/.libs
207make %{?_smp_mflags} check
208cd ..
209%endif
210
211
212%post -p /sbin/ldconfig
213
214%postun -p /sbin/ldconfig
215
216%post devel
217/sbin/install-info %{_infodir}/gmp.info.gz %{_infodir}/dir
218
219%preun devel
220if [ "$1" = 0 ]; then
221        /sbin/install-info --delete %{_infodir}/gmp.info.gz %{_infodir}/dir
222fi
223
224%post -n compat32-%{name} -p /sbin/ldconfig
225
226%postun -n compat32-%{name} -p /sbin/ldconfig
227
228%clean
229[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
230
231
232%files
233%defattr(-,root,root,-)
234%doc COPYING COPYING.LIB NEWS README
235%{_libdir}/libgmp.so.*
236%{_libdir}/libgmpxx.so.*
237%if %{SSE2}
238%{_libdir}/sse2/*
239%endif
240
241%files devel
242%defattr(-,root,root,-)
243%{_libdir}/libgmp.so
244%{_libdir}/libgmpxx.so
245#{_libdir}/libmpfr.a
246%{_includedir}/*.h
247%{_infodir}/gmp.info*
248#{_infodir}/mpfr.info*
249
250%files static
251%defattr(-,root,root,-)
252%doc README
253%{_libdir}/libgmp.a
254%{_libdir}/libgmpxx.a
255
256# compat32
257%if %{build_compat32}
258%files -n compat32-%{name}
259%defattr(-,root,root,-)
260%{_libdir}/libgmp.so.*
261%{_libdir}/libgmpxx.so.*
262%if %{SSE2}
263%{_libdir}/sse2/*
264%endif
265
266%files -n compat32-%{name}-devel
267%defattr(-,root,root,-)
268%{_libdir}/libgmp.so
269%{_libdir}/libgmpxx.so
270#{_libdir}/libmpfr.a
271
272%files -n compat32-%{name}-static
273%defattr(-,root,root,-)
274%doc README
275%{_libdir}/libgmp.a
276%{_libdir}/libgmpxx.a
277%endif
278
279%changelog
280* Tue Jan 14 2014 NAKAMURA Kenta <kenta@vinelinux.org> 5.1.3-2
281- rebuilt with the current environment
282
283* Sun Nov 03 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.1.3-1
284- new upstream release
285- changed file archive type to xz
286- replaced Patch0 to Fedora rawhide's Patch
287- deleted unrecognized option: --enable-mpbsd
288
289* Tue Apr 19 2011 NAKAMURA Kenta <kenta@vinelinux.org> 4.3.2-1
290- new upstream release
291
292* Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 4.3.1-2
293- rebuilt with rpm-4.8.1-3
294
295* Sat Nov 28 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.1-1
296- new upstream release
297- split static libraries to subpackage
298
299* Sun Jun 28 2009 NAKAMURA Kenta <kenta@vinelinux.org> 4.2.2-5
300- added compat32 package for x86_64 arch support
301- run autoreconf to get autotools right
302
303* Mon May 19 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-4
304- applied new versioning policy
305- added Patch3 from upstream
306
307* Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl2
308- remove --enable-mpfr
309  (mpfr has been splitted since gmp 4.2)
310
311* Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl1
312- new upstream release
313  * Mon Sep 24 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-3
314  - fix libgmpxx.so link
315  * Thu Sep 20 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-2
316  - fix check tag
317  * Thu Nov  2 2006 Thomas Woerner <twoerner@redhat.com> 4.1.4-10
318  - fixed arch order in gmp.h and gmp-mparam.h wrapper for all architectures
319- re-include libraries using SSE2 on x86 arch
320- updated URL
321
322* Wed May 09 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1.4-6vl2
323- rebuilt with new toolchain
324
325* Sat Feb 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.1.4-6vl1
326- new upstream release
327  * Mon Apr 18 2005 Thomas Woerner <twoerner@redhat.com> 4.1.4-6
328  - fixed __setfpucw call in mpfr-test.h
329  * Sun Sep 26 2004 Florian La Roche <Florian.LaRoche@redhat.de>
330  - disable ppc64 patch, now fixed upstream
331  * Wed Mar 31 2004 Thomas Woerner <twoerner@redhat.com> 4.1.2-14
332  - dropped RPATH (#118506)
333- exclude libraries using SSE2 in default settings.
334
335* Fri Mar 12 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 4.1.2-13vl1
336- modified for Vine
337
338* Mon Jan 20 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl3
339- added Obsoletes: gmp4(-devel)
340
341* Wed Jan 15 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl2
342- rebuilt against new toolchain
343
344* Fri May 31 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org>
345- modified for Vine
346
347* Sat May 25 2002 Florian La Roche <Florian.LaRoche@redhat.de>
348- update to version 4.1
349- patch s390 gmp-mparam.h to match other archs.
350
351* Thu May 23 2002 Tim Powers <timp@redhat.com>
352- automated rebuild
353
354* Mon Mar 11 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-3
355- Use standard %%configure macro and edit %%{_tmppath}
356
357* Tue Feb 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-2
358- Rebuild
359
360* Tue Jan 22 2002 Florian La Roche <Florian.LaRoche@redhat.de>
361- update to 4.0.1
362- bzip2 src
363
364* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
365- automated rebuild
366
367* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
368- Bump release + rebuild.
369
370* Mon Feb 05 2001 Philipp Knirsch <pknirsch@redhat.de>
371- Fixed bugzilla bug #25515 where GMP wouldn't work on IA64 as IA64 is not
372correctly identified as a 64 bit platform.
373
374* Mon Dec 18 2000 Preston Brown <pbrown@redhat.com>
375- include bsd mp library
376
377* Tue Oct 17 2000 Florian La Roche <Florian.LaRoche@redhat.de>
378- update to 3.1.1
379
380* Sun Sep  3 2000 Florian La Roche <Florian.LaRoche@redhat.com>
381- update to 3.1
382
383* Sat Aug 19 2000 Preston Brown <pbrown@redhat.com>
384- devel subpackage depends on main package so that .so symlink is OK.
385
386* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
387- automatic rebuild
388
389* Sat Jun  3 2000 Nalin Dahyabhai <nalin@redhat.com>
390- switch to the configure and makeinstall macros
391- FHS-compliance fixing
392- move docs to non-devel package
393
394* Fri Apr 28 2000 Bill Nottingham <notting@redhat.com>
395- libtoolize for ia64
396
397* Fri Apr 28 2000 Florian La Roche <Florian.LaRoche@redhat.com>
398- update to 3.0.1
399
400* Thu Apr 27 2000 Jakub Jelinek <jakub@redhat.com>
401- sparc64 fixes for 3.0
402
403* Wed Apr 26 2000 Florian La Roche <Florian.LaRoche@redhat.com>
404- update to 3.0
405
406* Mon Feb 14 2000 Matt Wilson <msw@redhat.com>
407- #include <string.h> in files that use string functions
408
409* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
410- fix description and summary
411
412* Mon Dec 06 1999 Michael K. Johnson <johnsonm@redhat.com>
413- s/GPL/LGPL/
414- build as non-root (#7604)
415
416* Mon Sep 06 1999 Jakub Jelinek <jj@ultra.linux.cz>
417- merge in some debian gmp fixes
418- Ulrich Drepper's __gmp_scale2 fix
419- my mpf_set_q fix
420- sparc64 fixes
421
422* Wed Apr 28 1999 Cristian Gafton <gafton@redhat.com>
423- add sparc patch for PIC handling
424
425* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
426- auto rebuild in the new build environment (release 8)
427
428* Thu Feb 11 1999 Michael Johnson <johnsonm@redhat.com>
429- include the private header file gmp-mparam.h because several
430  apps seem to assume that they are building against the gmp
431  source tree and require it.  Sigh.
432
433* Tue Jan 12 1999 Michael K. Johnson <johnsonm@redhat.com>
434- libtoolize to work on arm
435
436* Thu Sep 10 1998 Cristian Gafton <gafton@redhat.com>
437- yet another touch of the spec file
438
439* Wed Sep  2 1998 Michael Fulbright <msf@redhat.com>
440- looked over before inclusion in RH 5.2
441
442* Sun May 24 1998 Dick Porter <dick@cymru.net>
443- Patch Makefile.in, not Makefile
444- Don't specify i586, let configure decide the arch
445
446* Sat Jan 24 1998 Marc Ewing <marc@redhat.com>
447- started with package from Toshio Kuratomi <toshiok@cats.ucsc.edu>
448- cleaned up file list
449- fixed up install-info support
450
Note: See TracBrowser for help on using the repository browser.