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

Revision 12062, 13.4 KB checked in by tomop, 5 years ago (diff)

Merge branch 'tomop'

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: 6.1.2
20Release: 1%{?_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
25Patch2: gmp-6.0.0-debuginfo.patch
26License: LGPLv3+ or GPL2+
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%patch2 -p1 -b .debuginfo
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%license COPYING COPYING.LIB
235%doc NEWS README
236%{_libdir}/libgmp.so.*
237%{_libdir}/libgmpxx.so.*
238%if %{SSE2}
239%{_libdir}/sse2/*
240%endif
241
242%files devel
243%defattr(-,root,root,-)
244%{_libdir}/libgmp.so
245%{_libdir}/libgmpxx.so
246#{_libdir}/libmpfr.a
247%{_includedir}/*.h
248%{_infodir}/gmp.info*
249#{_infodir}/mpfr.info*
250
251%files static
252%defattr(-,root,root,-)
253%doc README
254%{_libdir}/libgmp.a
255%{_libdir}/libgmpxx.a
256
257# compat32
258%if %{build_compat32}
259%files -n compat32-%{name}
260%defattr(-,root,root,-)
261%{_libdir}/libgmp.so.*
262%{_libdir}/libgmpxx.so.*
263%if %{SSE2}
264%{_libdir}/sse2/*
265%endif
266
267%files -n compat32-%{name}-devel
268%defattr(-,root,root,-)
269%{_libdir}/libgmp.so
270%{_libdir}/libgmpxx.so
271#{_libdir}/libmpfr.a
272
273%files -n compat32-%{name}-static
274%defattr(-,root,root,-)
275%doc README
276%{_libdir}/libgmp.a
277%{_libdir}/libgmpxx.a
278%endif
279
280%changelog
281* Sun May 05 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.1.2-1
282- new upstream release.
283- updated Source2 and Source3.
284
285* Sat Jul 2 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.1.1-1
286- new upstream release.
287- dropped Patch0.
288- imported Patch2 from rawhide.
289- updated Source2 and Source3.
290
291* Sat May 07 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 6.1.0-1
292- new upstream release
293
294* Tue Jan 14 2014 NAKAMURA Kenta <kenta@vinelinux.org> 5.1.3-2
295- rebuilt with the current environment
296
297* Sun Nov 03 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.1.3-1
298- new upstream release
299- changed file archive type to xz
300- replaced Patch0 to Fedora rawhide's Patch
301- deleted unrecognized option: --enable-mpbsd
302
303* Tue Apr 19 2011 NAKAMURA Kenta <kenta@vinelinux.org> 4.3.2-1
304- new upstream release
305
306* Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 4.3.1-2
307- rebuilt with rpm-4.8.1-3
308
309* Sat Nov 28 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.1-1
310- new upstream release
311- split static libraries to subpackage
312
313* Sun Jun 28 2009 NAKAMURA Kenta <kenta@vinelinux.org> 4.2.2-5
314- added compat32 package for x86_64 arch support
315- run autoreconf to get autotools right
316
317* Mon May 19 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-4
318- applied new versioning policy
319- added Patch3 from upstream
320
321* Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl2
322- remove --enable-mpfr
323  (mpfr has been splitted since gmp 4.2)
324
325* Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl1
326- new upstream release
327  * Mon Sep 24 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-3
328  - fix libgmpxx.so link
329  * Thu Sep 20 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-2
330  - fix check tag
331  * Thu Nov  2 2006 Thomas Woerner <twoerner@redhat.com> 4.1.4-10
332  - fixed arch order in gmp.h and gmp-mparam.h wrapper for all architectures
333- re-include libraries using SSE2 on x86 arch
334- updated URL
335
336* Wed May 09 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1.4-6vl2
337- rebuilt with new toolchain
338
339* Sat Feb 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.1.4-6vl1
340- new upstream release
341  * Mon Apr 18 2005 Thomas Woerner <twoerner@redhat.com> 4.1.4-6
342  - fixed __setfpucw call in mpfr-test.h
343  * Sun Sep 26 2004 Florian La Roche <Florian.LaRoche@redhat.de>
344  - disable ppc64 patch, now fixed upstream
345  * Wed Mar 31 2004 Thomas Woerner <twoerner@redhat.com> 4.1.2-14
346  - dropped RPATH (#118506)
347- exclude libraries using SSE2 in default settings.
348
349* Fri Mar 12 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 4.1.2-13vl1
350- modified for Vine
351
352* Mon Jan 20 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl3
353- added Obsoletes: gmp4(-devel)
354
355* Wed Jan 15 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl2
356- rebuilt against new toolchain
357
358* Fri May 31 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org>
359- modified for Vine
360
361* Sat May 25 2002 Florian La Roche <Florian.LaRoche@redhat.de>
362- update to version 4.1
363- patch s390 gmp-mparam.h to match other archs.
364
365* Thu May 23 2002 Tim Powers <timp@redhat.com>
366- automated rebuild
367
368* Mon Mar 11 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-3
369- Use standard %%configure macro and edit %%{_tmppath}
370
371* Tue Feb 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-2
372- Rebuild
373
374* Tue Jan 22 2002 Florian La Roche <Florian.LaRoche@redhat.de>
375- update to 4.0.1
376- bzip2 src
377
378* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
379- automated rebuild
380
381* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
382- Bump release + rebuild.
383
384* Mon Feb 05 2001 Philipp Knirsch <pknirsch@redhat.de>
385- Fixed bugzilla bug #25515 where GMP wouldn't work on IA64 as IA64 is not
386correctly identified as a 64 bit platform.
387
388* Mon Dec 18 2000 Preston Brown <pbrown@redhat.com>
389- include bsd mp library
390
391* Tue Oct 17 2000 Florian La Roche <Florian.LaRoche@redhat.de>
392- update to 3.1.1
393
394* Sun Sep  3 2000 Florian La Roche <Florian.LaRoche@redhat.com>
395- update to 3.1
396
397* Sat Aug 19 2000 Preston Brown <pbrown@redhat.com>
398- devel subpackage depends on main package so that .so symlink is OK.
399
400* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
401- automatic rebuild
402
403* Sat Jun  3 2000 Nalin Dahyabhai <nalin@redhat.com>
404- switch to the configure and makeinstall macros
405- FHS-compliance fixing
406- move docs to non-devel package
407
408* Fri Apr 28 2000 Bill Nottingham <notting@redhat.com>
409- libtoolize for ia64
410
411* Fri Apr 28 2000 Florian La Roche <Florian.LaRoche@redhat.com>
412- update to 3.0.1
413
414* Thu Apr 27 2000 Jakub Jelinek <jakub@redhat.com>
415- sparc64 fixes for 3.0
416
417* Wed Apr 26 2000 Florian La Roche <Florian.LaRoche@redhat.com>
418- update to 3.0
419
420* Mon Feb 14 2000 Matt Wilson <msw@redhat.com>
421- #include <string.h> in files that use string functions
422
423* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
424- fix description and summary
425
426* Mon Dec 06 1999 Michael K. Johnson <johnsonm@redhat.com>
427- s/GPL/LGPL/
428- build as non-root (#7604)
429
430* Mon Sep 06 1999 Jakub Jelinek <jj@ultra.linux.cz>
431- merge in some debian gmp fixes
432- Ulrich Drepper's __gmp_scale2 fix
433- my mpf_set_q fix
434- sparc64 fixes
435
436* Wed Apr 28 1999 Cristian Gafton <gafton@redhat.com>
437- add sparc patch for PIC handling
438
439* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
440- auto rebuild in the new build environment (release 8)
441
442* Thu Feb 11 1999 Michael Johnson <johnsonm@redhat.com>
443- include the private header file gmp-mparam.h because several
444  apps seem to assume that they are building against the gmp
445  source tree and require it.  Sigh.
446
447* Tue Jan 12 1999 Michael K. Johnson <johnsonm@redhat.com>
448- libtoolize to work on arm
449
450* Thu Sep 10 1998 Cristian Gafton <gafton@redhat.com>
451- yet another touch of the spec file
452
453* Wed Sep  2 1998 Michael Fulbright <msf@redhat.com>
454- looked over before inclusion in RH 5.2
455
456* Sun May 24 1998 Dick Porter <dick@cymru.net>
457- Patch Makefile.in, not Makefile
458- Don't specify i586, let configure decide the arch
459
460* Sat Jan 24 1998 Marc Ewing <marc@redhat.com>
461- started with package from Toshio Kuratomi <toshiok@cats.ucsc.edu>
462- cleaned up file list
463- fixed up install-info support
464
Note: See TracBrowser for help on using the repository browser.