1 | #
|
---|
2 | # Important for %{ix86}:
|
---|
3 | # This rpm has to be build on a CPU with sse2 support like Pentium 4 !
|
---|
4 | #
|
---|
5 |
|
---|
6 | Summary: A GNU arbitrary precision library
|
---|
7 | Name: gmp
|
---|
8 | Version: 5.0.2
|
---|
9 | Release: 2%{?dist}
|
---|
10 | URL: http://gmplib.org/
|
---|
11 |
|
---|
12 | Source0: ftp://ftp.gnu.org/pub/gnu/gmp/gmp-%{version}.tar.bz2
|
---|
13 | Patch0: gmp.diff
|
---|
14 |
|
---|
15 | License: LGPLv3+
|
---|
16 | Group: System Environment/Libraries
|
---|
17 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
---|
18 | #BuildRequires: autoconf automake libtool
|
---|
19 |
|
---|
20 | %description
|
---|
21 | The gmp package contains GNU MP, a library for arbitrary precision
|
---|
22 | arithmetic, signed integers operations, rational numbers and floating
|
---|
23 | point numbers. GNU MP is designed for speed, for both small and very
|
---|
24 | large operands. GNU MP is fast because it uses fullwords as the basic
|
---|
25 | arithmetic type, it uses fast algorithms, it carefully optimizes
|
---|
26 | assembly code for many CPUs' most common inner loops, and it generally
|
---|
27 | emphasizes speed over simplicity/elegance in its operations.
|
---|
28 |
|
---|
29 | Install the gmp package if you need a fast arbitrary precision
|
---|
30 | library.
|
---|
31 |
|
---|
32 | %package devel
|
---|
33 | Summary: Development tools for the GNU MP arbitrary precision library
|
---|
34 | Group: Development/Libraries
|
---|
35 | Requires: %{name} = %{version}-%{release}
|
---|
36 | #Requires(post): /sbin/install-info
|
---|
37 | #Requires(preun): /sbin/install-info
|
---|
38 |
|
---|
39 | %description devel
|
---|
40 | The libraries, header files and documentation for using the GNU MP
|
---|
41 | arbitrary precision library in applications.
|
---|
42 |
|
---|
43 | If you want to develop applications which will use the GNU MP library,
|
---|
44 | you'll need to install the gmp-devel package. You'll also need to
|
---|
45 | install the gmp package.
|
---|
46 |
|
---|
47 | %package static
|
---|
48 | Summary: Development tools for the GNU MP arbitrary precision library
|
---|
49 | Group: Development/Libraries
|
---|
50 | Requires: %{name}-devel = %{version}-%{release}
|
---|
51 |
|
---|
52 | %description static
|
---|
53 | The static libraries for using the GNU MP arbitrary precision library
|
---|
54 | in applications.
|
---|
55 |
|
---|
56 | %prep
|
---|
57 | %setup -q
|
---|
58 | %patch0 -p1 -b .os2~
|
---|
59 |
|
---|
60 | %build
|
---|
61 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
|
---|
62 | %configure \
|
---|
63 | --host=none-pc-os2-emx --build=none-pc-os2-emx \
|
---|
64 | --disable-shared --enable-static \
|
---|
65 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
|
---|
66 | make %{?_smp_mflags}
|
---|
67 |
|
---|
68 | %install
|
---|
69 | rm -rf $RPM_BUILD_ROOT
|
---|
70 | make install DESTDIR=$RPM_BUILD_ROOT
|
---|
71 |
|
---|
72 | cp -p gmp.dll $RPM_BUILD_ROOT%{_libdir}
|
---|
73 | cp -p .libs/gmp_s.a $RPM_BUILD_ROOT%{_libdir}
|
---|
74 |
|
---|
75 | install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_includedir}
|
---|
76 | rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
|
---|
77 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
---|
78 |
|
---|
79 | %clean
|
---|
80 | rm -rf $RPM_BUILD_ROOT
|
---|
81 |
|
---|
82 | %files
|
---|
83 | %defattr(-,root,root,-)
|
---|
84 | %doc COPYING COPYING.LIB NEWS README
|
---|
85 | %{_libdir}/*.dll
|
---|
86 |
|
---|
87 | %files devel
|
---|
88 | %defattr(-,root,root,-)
|
---|
89 | %{_libdir}/gmp.a
|
---|
90 | %{_includedir}/*.h
|
---|
91 | %{_infodir}/gmp.info*
|
---|
92 |
|
---|
93 | %files static
|
---|
94 | %defattr(-,root,root,-)
|
---|
95 | %{_libdir}/gmp_s.a
|
---|
96 |
|
---|
97 | %changelog
|
---|
98 | * Fri Dec 02 2011 yd
|
---|
99 | - build as dll
|
---|
100 |
|
---|
101 | * Thu Dec 01 2011 yd
|
---|
102 | - build as static lib
|
---|