source: projects/specs/trunk/g/gmp43/gmp43-vl.spec @ 7960

Revision 7960, 13.3 KB checked in by kudoh, 10 years ago (diff)

--force-log

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