]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - gmp/gmp.nm
Add a -debuginfo for every package that is not noarch.
[people/ms/ipfire-3.x.git] / gmp / gmp.nm
CommitLineData
58608bd4 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
58608bd4
MT
4###############################################################################
5
802ea3af 6name = gmp
482cb9d2
MT
7version = 5.0.2
8release = 1
9
10compat_version = 4.3.2
58608bd4 11
802ea3af
MT
12groups = System/Libraries
13url = http://gmplib.org/
14license = LGPLv3+
15summary = A GNU arbitrary precision library.
58608bd4 16
802ea3af 17description
482cb9d2
MT
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
58608bd4 24 emphasizes speed over simplicity/elegance in its operations.
802ea3af 25end
58608bd4 26
482cb9d2
MT
27source_dl += ftp://ftp.gmplib.org/pub/%{thisapp}/ ftp://ftp.gmplib.org/pub/%{name}-%{compat_version}/
28sources = %{thisapp}.tar.bz2 %{name}-%{compat_version}.tar.bz2
64dc7375 29
802ea3af
MT
30build
31 requires
32 gcc-c++
33 m4
34 end
64dc7375 35
01841414
MT
36 # Build different versions of gmp to enhance the speed
37 # of the OS.
38 build_versions = base
39
40 export ABI = standard
ed91fe31
MT
41
42 if "%{DISTRO_ARCH}" == "x86_64"
43 ABI = 64
44 end
58608bd4 45
ed91fe31 46 if "%{DISTRO_ARCH}" == "i686"
01841414
MT
47 # Build sse2 enabled version of gmp.
48 build_versions += sse2
49
ed91fe31
MT
50 ABI = 32
51 end
52
01841414
MT
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
482cb9d2
MT
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
ed91fe31 87 build
01841414
MT
88 for version in %{build_versions}; do
89 cd build-${version}
90
91 CFLAGS="%{CFLAGS}"
482cb9d2 92 CXXFLAGS="%{CXXFLAGS}"
01841414
MT
93 if [ "${version}" = "sse2" ]; then
94 # Enable sse2.
95 CFLAGS="${CFLAGS} -march=pentium4"
96 CXXFLAGS="${CXXFLAGS} -march=pentium4"
97 fi
98
482cb9d2 99 %{build_one}
01841414
MT
100
101 cd ..
102 done
482cb9d2
MT
103
104 # Build compat version of library.
105 cd %{DIR_SRC}/%{name}-%{compat_version}
106 %{build_one}
802ea3af
MT
107 end
108
109 test
01841414
MT
110 for version in %{build_versions}; do
111 cd build-${version}
112
482cb9d2 113 export LD_LIBRARY_PATH=$(pwd)/.libs
01841414
MT
114 make check
115
116 cd ..
117 done
482cb9d2
MT
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
01841414
MT
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
482cb9d2
MT
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
802ea3af
MT
156 end
157end
158
159packages
160 package %{name}
01841414 161
802ea3af
MT
162 package %{name}-devel
163 template DEVEL
164 end
482cb9d2
MT
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
1f9bc2f0
MT
173
174 package %{name}-debuginfo
175 template DEBUGINFO
176 end
802ea3af 177end