]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - gmp/gmp.nm
Add a -debuginfo for every package that is not noarch.
[people/ms/ipfire-3.x.git] / gmp / gmp.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = gmp
7 version = 5.0.2
8 release = 1
9
10 compat_version = 4.3.2
11
12 groups = System/Libraries
13 url = http://gmplib.org/
14 license = LGPLv3+
15 summary = A GNU arbitrary precision library.
16
17 description
18 The gmp package contains GNU MP, a library for arbitrary precision
19 arithmetic, signed integers operations, rational numbers and floating
20 point numbers. GNU MP is designed for speed, for both small and very
21 large operands. GNU MP is fast because it uses fullwords as the basic
22 arithmetic type, it uses fast algorithms, it carefully optimizes
23 assembly code for many CPUs' most common inner loops, and it generally
24 emphasizes speed over simplicity/elegance in its operations.
25 end
26
27 source_dl += ftp://ftp.gmplib.org/pub/%{thisapp}/ ftp://ftp.gmplib.org/pub/%{name}-%{compat_version}/
28 sources = %{thisapp}.tar.bz2 %{name}-%{compat_version}.tar.bz2
29
30 build
31 requires
32 gcc-c++
33 m4
34 end
35
36 # Build different versions of gmp to enhance the speed
37 # of the OS.
38 build_versions = base
39
40 export ABI = standard
41
42 if "%{DISTRO_ARCH}" == "x86_64"
43 ABI = 64
44 end
45
46 if "%{DISTRO_ARCH}" == "i686"
47 # Build sse2 enabled version of gmp.
48 build_versions += sse2
49
50 ABI = 32
51 end
52
53 configure_options += \
54 --prefix=/usr \
55 --enable-cxx \
56 --enable-mpbsd \
57 --disable-static
58
59 prepare_cmds
60 for version in %{build_versions}; do
61 mkdir build-${version}
62
63 cd build-${version}
64 ln -svf ../configure .
65 cd ..
66 done
67 end
68
69 build_one
70 CFLAGS="${CFLAGS}" \
71 CXXFLAGS="${CXXFLAGS}" \
72 ./configure \
73 %{configure_options}
74
75 # Kill RPATHs.
76 sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
77 -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
78 -e 's|-lstdc++ -lm|-lstdc++|' \
79 -i libtool
80
81 export LD_LIBRARY_PATH=$(pwd)/.libs
82 make %{PARALLELISMFLAGS} \
83 CFLAGS="${CFLAGS}" \
84 CXXFLAGS="${CXXFLAGS}"
85 end
86
87 build
88 for version in %{build_versions}; do
89 cd build-${version}
90
91 CFLAGS="%{CFLAGS}"
92 CXXFLAGS="%{CXXFLAGS}"
93 if [ "${version}" = "sse2" ]; then
94 # Enable sse2.
95 CFLAGS="${CFLAGS} -march=pentium4"
96 CXXFLAGS="${CXXFLAGS} -march=pentium4"
97 fi
98
99 %{build_one}
100
101 cd ..
102 done
103
104 # Build compat version of library.
105 cd %{DIR_SRC}/%{name}-%{compat_version}
106 %{build_one}
107 end
108
109 test
110 for version in %{build_versions}; do
111 cd build-${version}
112
113 export LD_LIBRARY_PATH=$(pwd)/.libs
114 make check
115
116 cd ..
117 done
118
119 # Check compat version of library.
120 cd %{DIR_SRC}/%{name}-%{compat_version}
121
122 export LD_LIBRARY_PATH=$(pwd)/.libs
123 make check
124 end
125
126 install
127 for version in %{build_versions}; do
128 cd build-${version}
129
130 if [ "${version}" = "sse2" ]; then
131 # Manually install sse2 libs.
132 mkdir -pv %{BUILDROOT}/usr/lib/sse2
133
134 install -m 755 .libs/libgmp.so.*.* %{BUILDROOT}/usr/lib/sse2
135 cp -a .libs/libgmp.so.[^.]* %{BUILDROOT}/usr/lib/sse2
136 chmod 755 %{BUILDROOT}/usr/lib/sse2/libgmp.so.[^.]*
137
138 install -m 755 .libs/libgmpxx.so.*.* %{BUILDROOT}/usr/lib/sse2
139 cp -a .libs/libgmpxx.so.? %{BUILDROOT}/usr/lib/sse2
140 chmod 755 %{BUILDROOT}/usr/lib/sse2/libgmpxx.so.?
141
142 install -m 755 .libs/libmp.so.*.* %{BUILDROOT}/usr/lib/sse2
143 cp -a .libs/libmp.so.? %{BUILDROOT}/usr/lib/sse2
144 chmod 755 %{BUILDROOT}/usr/lib/sse2/libmp.so.?
145 else
146 make install DESTDIR="%{BUILDROOT}"
147 fi
148
149 cd ..
150 done
151
152 # Install compat version of library.
153 cd %{DIR_SRC}/%{name}-%{compat_version}
154 install -m 644 .libs/libgmp.so.3.5.2 %{BUILDROOT}/usr/lib/
155 ln -svf libgmp.so.3.5.2 %{BUILDROOT}/usr/lib/libgmp.so.3
156 end
157 end
158
159 packages
160 package %{name}
161
162 package %{name}-devel
163 template DEVEL
164 end
165
166 package %{name}-compat
167 summary = Compatibility version of %{thisapp} (%{compat_version}).
168
169 files
170 /usr/lib/libgmp.so.3*
171 end
172 end
173
174 package %{name}-debuginfo
175 template DEBUGINFO
176 end
177 end