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

Revision 521, 13.0 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

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