]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with allarchs # enable all targets | |
4 | # define addtargets x,y,z # build with additional targets x,y,z (e.g. x86_64-linux) | |
5 | # http://sourceware.org/ml/binutils/2008-03/msg00162.html | |
6 | %bcond_without pax # without PaX flags (for upstream bugreports) | |
7 | %bcond_without default_ld # default ld instead of gold | |
8 | %bcond_without tests | |
9 | # | |
10 | Summary: GNU Binary Utility Development Utilities | |
11 | Summary(de.UTF-8): GNU Binary Utility Development Utilities | |
12 | Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU | |
13 | Summary(fr.UTF-8): Utilitaires de développement binaire de GNU | |
14 | Summary(pl.UTF-8): Narzędzia GNU dla programistów | |
15 | Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU | |
16 | Summary(ru.UTF-8): Набор инструментов GNU для построения исполняемых программ | |
17 | Summary(tr.UTF-8): GNU geliştirme araçları | |
18 | Summary(uk.UTF-8): Набір інструментів GNU для побудови виконуваних програм | |
19 | Name: binutils | |
20 | Version: 2.22.52.0.2 | |
21 | Release: 1 | |
22 | Epoch: 3 | |
23 | License: GPL v3+ | |
24 | Group: Development/Tools | |
25 | # http://git.kernel.org/?p=linux/kernel/git/hjl/binutils.git;a=summary | |
26 | # git archive --prefix=binutils-2.22.51.0.1/ -o binutils-2.22.51.0.1.tar remotes/origin/linux/release/2.22.51.0.1 | |
27 | Source0: http://www.kernel.org/pub/linux/devel/binutils/%{name}-%{version}.tar.bz2 | |
28 | # Source0-md5: 8f121aacee182912a71a610f73aff5da | |
29 | Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2 | |
30 | # Source1-md5: a717d9707ec77d82acb6ec9078c472d6 | |
31 | Patch0: %{name}-gasp.patch | |
32 | Patch1: %{name}-info.patch | |
33 | Patch2: %{name}-libtool-relink.patch | |
34 | Patch3: %{name}-pt_pax_flags.patch | |
35 | Patch5: %{name}-discarded.patch | |
36 | Patch6: %{name}-absolute-gnu_debuglink-path.patch | |
37 | Patch7: %{name}-libtool-m.patch | |
38 | Patch8: %{name}-build-id.patch | |
39 | Patch9: %{name}-tooldir.patch | |
40 | URL: http://sources.redhat.com/binutils/ | |
41 | BuildRequires: autoconf >= 2.64 | |
42 | BuildRequires: automake >= 1:1.11 | |
43 | BuildRequires: bison | |
44 | BuildRequires: flex | |
45 | BuildRequires: gettext-devel | |
46 | BuildRequires: libstdc++-devel >= 6:4.0-1 | |
47 | %{?with_tests:BuildRequires: libstdc++-static >= 6:4.0} | |
48 | BuildRequires: perl-tools-pod | |
49 | %ifarch sparc sparc32 | |
50 | BuildRequires: sparc32 | |
51 | %endif | |
52 | BuildRequires: texinfo >= 4.2 | |
53 | Conflicts: gcc-c++ < 5:3.3 | |
54 | Conflicts: modutils < 2.4.17 | |
55 | Obsoletes: binutils-gold | |
56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
57 | ||
58 | %description | |
59 | Binutils is a collection of binary utilities, including: | |
60 | - ar - create, modify and extract from archives, | |
61 | - nm - lists symbols from object files, | |
62 | - objcopy - copy and translate object files, | |
63 | - objdump - display information from object files, | |
64 | - ranlib - generate an index for the contents of an archive, | |
65 | - size - list the section sizes of an object or archive file, | |
66 | - strings - list printable strings from files, | |
67 | - strip - discard symbols, | |
68 | - addr2line - convert addresses to file and line, | |
69 | - nlmconv - convert object code into an NLM. | |
70 | ||
71 | %description -l es.UTF-8 | |
72 | Binutils es una colección de utilitarios necesarios para compilar | |
73 | programas. Incluye assembler y linker, así como varios otros programas | |
74 | para trabajar con formatos que se puedan ejecutar. | |
75 | ||
76 | %description -l pl.UTF-8 | |
77 | Pakiet binutils zawiera zestaw narzędzi umożliwiających kompilację | |
78 | programów. Znajdują się tutaj między innymi assembler, konsolidator | |
79 | (linker), a także inne narzędzia do manipulowania binarnymi plikami | |
80 | programów i bibliotek. | |
81 | ||
82 | %description -l pt_BR.UTF-8 | |
83 | binutils é uma coletânea de utilitários necessários para compilar | |
84 | programas. Inclui assembler e linker, assim como vários outros | |
85 | programas para trabalhar com formatos executáveis. | |
86 | ||
87 | %description -l ru.UTF-8 | |
88 | binutils - это набор инструментов, необходимых для компилляции | |
89 | программ. Включает ассемблер, компоновщик и набор других программ для | |
90 | работы с исполняемыми файлами разнообразных форматов. | |
91 | ||
92 | %description -l uk.UTF-8 | |
93 | binutils - це набір інструментів, необхідних для компіляції програм. | |
94 | Містить асемблер, компоновщик та інші програми, необхідні для роботи з | |
95 | виконуваними файлами різних форматів. | |
96 | ||
97 | %package libs | |
98 | Summary: GNU binutils shared libraries | |
99 | Summary(pl.UTF-8): Biblioteki współdzielone GNU binutils | |
100 | Group: Libraries | |
101 | Conflicts: binutils < 3:2.17.50.0.8-3 | |
102 | ||
103 | %description libs | |
104 | GNU binutils shared libraries (libbfd, libopcodes). | |
105 | ||
106 | %description libs -l pl.UTF-8 | |
107 | Biblioteki współdzielone GNU binutils (libbfd, libopcodes). | |
108 | ||
109 | %package devel | |
110 | Summary: Development files for GNU binutils libraries | |
111 | Summary(pl.UTF-8): Pliki programistyczne bibliotek GNU binutils | |
112 | Group: Development/Libraries | |
113 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} | |
114 | ||
115 | %description devel | |
116 | Development files for GNU binutils libraries (libbfd, libopcodes) and | |
117 | static libiberty library. | |
118 | ||
119 | %description devel -l pl.UTF-8 | |
120 | Pliki programistyczne bibliotek GNU binutils (libbfd, libopcodes) oraz | |
121 | statyczna biblioteka libiberty. | |
122 | ||
123 | %package static | |
124 | Summary: GNU binutils static libraries | |
125 | Summary(pl.UTF-8): Biblioteki statyczne do GNU binutils | |
126 | Group: Development/Libraries | |
127 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
128 | #Requires: zlib-static | |
129 | ||
130 | %description static | |
131 | Static GNU binutils libraries (libbfd, libopcodes). | |
132 | ||
133 | %description static -l pl.UTF-8 | |
134 | Biblioteki statyczne GNU binutils (libbfd, libopcodes). | |
135 | ||
136 | %package gasp | |
137 | Summary: GASP - old preprocessor for assembly programs | |
138 | Summary(pl.UTF-8): GASP - stary preprocesor dla programów w asemblerze | |
139 | Group: Development/Tools | |
140 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
141 | ||
142 | %description gasp | |
143 | GASP - old preprocessor for assembly programs. It's officially | |
144 | obsoleted, but it's still needed to build some packages. | |
145 | ||
146 | %description gasp -l pl.UTF-8 | |
147 | GASP - stary preprocesor dla programów w asemblerze. Jest oficjalnie | |
148 | uznany za przestarzały, ale jest nadal potrzebny do zbudowania | |
149 | niektórych pakietów. | |
150 | ||
151 | %prep | |
152 | %setup -q | |
153 | %patch0 -p1 | |
154 | %patch1 -p1 | |
155 | %patch2 -p1 | |
156 | %{?with_pax:%patch3 -p1} | |
157 | %patch5 -p1 | |
158 | %patch6 -p1 | |
159 | %patch7 -p1 | |
160 | %patch8 -p0 | |
161 | %patch9 -p1 | |
162 | ||
163 | # file contains hacks for ac 2.59 only | |
164 | %{__rm} config/override.m4 | |
165 | ||
166 | %build | |
167 | %{__aclocal} | |
168 | %{__autoconf} | |
169 | ||
170 | # non-standard regeneration (needed because of gasp patch) | |
171 | # AM_BINUTILS_WARNINGS in bfd/warning.m4, ZW_GNU_GETTEXT_SISTER_DIR in config/gettext-sister.m4 | |
172 | for dir in gas bfd; do | |
173 | cd $dir || exit 1 | |
174 | %{__aclocal} -I .. -I ../config -I ../bfd | |
175 | %{__automake} Makefile | |
176 | %{__automake} doc/Makefile | |
177 | %{__autoconf} | |
178 | cd .. | |
179 | done | |
180 | ||
181 | # More targets | |
182 | TARGETS= | |
183 | %ifarch ia64 | |
184 | TARGETS=i686-linux | |
185 | %endif | |
186 | # uhm? | |
187 | %ifarch %{ix86} | |
188 | TARGETS=x86_64-linux | |
189 | %endif | |
190 | %ifarch sparc | |
191 | TARGETS=sparc64-linux | |
192 | %endif | |
193 | %{?addtargets:TARGETS="%{addtargets}"} | |
194 | ||
195 | cp -f /usr/share/automake/config.* . | |
196 | CFLAGS="%{rpmcflags}"; export CFLAGS | |
197 | CXXFLAGS="%{rpmcxxflags}"; export CXXFLAGS | |
198 | CC="%{__cc}"; export CC | |
199 | CXX="%{__cxx}"; export CXX | |
200 | %ifarch sparc | |
201 | sparc32 \ | |
202 | %endif | |
203 | ./configure %{_target_platform} \ | |
204 | --disable-debug \ | |
205 | --disable-werror \ | |
206 | --enable-build-warnings=,-Wno-missing-prototypes \ | |
207 | --enable-shared \ | |
208 | --enable-lto \ | |
209 | --enable-plugins \ | |
210 | --prefix=%{_prefix} \ | |
211 | --libdir=%{_libdir} \ | |
212 | --infodir=%{_infodir} \ | |
213 | --mandir=%{_mandir} \ | |
214 | --with-tooldir=%{_prefix} \ | |
215 | %{!?with_allarchs:`[ -n "${TARGETS}" ] && echo "--enable-targets=${TARGETS}"`} \ | |
216 | %ifarch sparc | |
217 | --enable-64-bit-bfd \ | |
218 | %else | |
219 | %{?with_allarchs:--enable-64-bit-bfd} \ | |
220 | %endif | |
221 | %{?with_allarchs:--enable-targets=alpha-linux,arm-linux,cris-linux,hppa-linux,i386-linux,ia64-linux,x86_64-linux,m68k-linux,mips-linux,mips64-linux,mips64el-linux,mipsel-linux,ppc-linux,s390-linux,s390x-linux,sh-linux,sparc-linux,sparc64-linux,i386-linuxaout} \ | |
222 | %ifarch %{ix86} %{x8664} | |
223 | --enable-gold%{!?with_default_ld:=default} --enable-ld%{?with_default_ld:=default} \ | |
224 | %endif | |
225 | ||
226 | %{__make} | |
227 | ||
228 | %{?with_tests:%{__make} check} | |
229 | ||
230 | %install | |
231 | rm -rf $RPM_BUILD_ROOT | |
232 | ||
233 | %{__make} install \ | |
234 | DESTDIR=$RPM_BUILD_ROOT | |
235 | ||
236 | %{__rm} $RPM_BUILD_ROOT%{_infodir}/standards.info* | |
237 | ||
238 | # remove these man pages unless we cross-build for win*/netware platforms. | |
239 | # however, this should be done in Makefiles. | |
240 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{dlltool,nlmconv,windres}.1 | |
241 | ||
242 | bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir} | |
243 | ||
244 | install include/libiberty.h $RPM_BUILD_ROOT%{_includedir} | |
245 | install libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir} | |
246 | ||
247 | # remove evil -L pointing inside builder's home | |
248 | perl -pi -e 's@-L[^ ]*/pic @@g' $RPM_BUILD_ROOT%{_libdir}/libbfd.la | |
249 | ||
250 | [ -x $RPM_BUILD_ROOT%{_bindir}/ld.bfd ] || ln $RPM_BUILD_ROOT%{_bindir}/ld{,.bfd} | |
251 | ||
252 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir | |
253 | ||
254 | %find_lang bfd | |
255 | %find_lang binutils | |
256 | %find_lang gas | |
257 | %find_lang gprof | |
258 | touch ld.lang | |
259 | %find_lang ld | |
260 | %ifarch %{ix86} %{x8664} | |
261 | %find_lang gold | |
262 | %else | |
263 | :> gold.lang | |
264 | %endif | |
265 | %find_lang opcodes | |
266 | cat bfd.lang opcodes.lang > %{name}-libs.lang | |
267 | cat gas.lang gprof.lang ld.lang gold.lang >> %{name}.lang | |
268 | ||
269 | %clean | |
270 | rm -rf $RPM_BUILD_ROOT | |
271 | ||
272 | %post -p /sbin/postshell | |
273 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
274 | ||
275 | %postun -p /sbin/postshell | |
276 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
277 | ||
278 | %post libs -p /sbin/ldconfig | |
279 | %postun libs -p /sbin/ldconfig | |
280 | ||
281 | %post devel -p /sbin/postshell | |
282 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
283 | ||
284 | %postun devel -p /sbin/postshell | |
285 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
286 | ||
287 | %files -f %{name}.lang | |
288 | %defattr(644,root,root,755) | |
289 | %doc README | |
290 | %attr(755,root,root) %{_bindir}/addr2line | |
291 | %attr(755,root,root) %{_bindir}/ar | |
292 | %attr(755,root,root) %{_bindir}/as | |
293 | %attr(755,root,root) %{_bindir}/c++filt | |
294 | %attr(755,root,root) %{_bindir}/elfedit | |
295 | %attr(755,root,root) %{_bindir}/gprof | |
296 | %attr(755,root,root) %{_bindir}/ld | |
297 | %attr(755,root,root) %{_bindir}/ld.bfd | |
298 | %ifarch %{ix86} %{x8664} | |
299 | %attr(755,root,root) %{_bindir}/ld.gold | |
300 | %endif | |
301 | %attr(755,root,root) %{_bindir}/nm | |
302 | %attr(755,root,root) %{_bindir}/objcopy | |
303 | %attr(755,root,root) %{_bindir}/objdump | |
304 | %attr(755,root,root) %{_bindir}/ranlib | |
305 | %attr(755,root,root) %{_bindir}/readelf | |
306 | %attr(755,root,root) %{_bindir}/size | |
307 | %attr(755,root,root) %{_bindir}/strings | |
308 | %attr(755,root,root) %{_bindir}/strip | |
309 | %{_infodir}/as.info* | |
310 | %{_infodir}/binutils.info* | |
311 | %{_infodir}/configure.info* | |
312 | %{_infodir}/gprof.info* | |
313 | %{_infodir}/ld.info* | |
314 | %{_prefix}/lib/ldscripts | |
315 | %{_mandir}/man1/* | |
316 | %lang(cs) %{_mandir}/cs/man1/* | |
317 | %lang(de) %{_mandir}/de/man1/* | |
318 | %lang(es) %{_mandir}/es/man1/* | |
319 | %lang(fi) %{_mandir}/fi/man1/* | |
320 | %lang(fr) %{_mandir}/fr/man1/* | |
321 | %lang(hu) %{_mandir}/hu/man1/* | |
322 | %lang(ja) %{_mandir}/ja/man1/* | |
323 | %lang(pl) %{_mandir}/pl/man1/* | |
324 | ||
325 | %files libs -f %{name}-libs.lang | |
326 | %defattr(644,root,root,755) | |
327 | %attr(755,root,root) %{_libdir}/libbfd-*.so | |
328 | %attr(755,root,root) %{_libdir}/libopcodes-*.so | |
329 | ||
330 | %files devel | |
331 | %defattr(644,root,root,755) | |
332 | %attr(755,root,root) %{_libdir}/libbfd.so | |
333 | %attr(755,root,root) %{_libdir}/libopcodes.so | |
334 | %{_libdir}/libbfd.la | |
335 | %{_libdir}/libopcodes.la | |
336 | %{_libdir}/libiberty.a | |
337 | %{_includedir}/ansidecl.h | |
338 | %{_includedir}/bfd.h | |
339 | %{_includedir}/bfdlink.h | |
340 | %{_includedir}/dis-asm.h | |
341 | %{_includedir}/libiberty.h | |
342 | %{_includedir}/plugin-api.h | |
343 | %{_includedir}/symcat.h | |
344 | %{_infodir}/bfd.info* | |
345 | ||
346 | %files static | |
347 | %defattr(644,root,root,755) | |
348 | %{_libdir}/libbfd.a | |
349 | %{_libdir}/libopcodes.a | |
350 | ||
351 | %files gasp | |
352 | %defattr(644,root,root,755) | |
353 | %attr(755,root,root) %{_bindir}/gasp | |
354 | %{_infodir}/gasp.info* |