5 %bcond_with allarchs # enable all targets
6 # define addtargets x,y,z # build with additional targets x,y,z (e.g. x86_64-linux)
8 Summary: GNU Binary Utility Development Utilities
9 Summary(de.UTF-8): GNU Binary Utility Development Utilities
10 Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU
11 Summary(fr.UTF-8): Utilitaires de développement binaire de GNU
12 Summary(pl.UTF-8): Narzędzia GNU dla programistów
13 Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU
14 Summary(ru.UTF-8): Набор инструментов GNU для построения исполняемых программ
15 Summary(tr.UTF-8): GNU geliştirme araçları
16 Summary(uk.UTF-8): Набір інструментів GNU для побудови виконуваних програм
18 Version: 2.15.94.0.2.2
22 Group: Development/Tools
23 Source0: ftp://ftp.kernel.org/pub/linux/devel/binutils/%{name}-%{version}.tar.bz2
24 # Source0-md5: e9bcf84d9e6b5a2d840e76f22a3fce5f
25 Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
26 # Source1-md5: a717d9707ec77d82acb6ec9078c472d6
27 Patch0: %{name}-gasp.patch
28 Patch1: %{name}-info.patch
29 Patch2: %{name}-array-sects-compat.patch
30 Patch3: %{name}-libtool-relink.patch
31 Patch4: %{name}-pt_pax_flags.patch
32 Patch5: %{name}-mips-relocs.patch
33 Patch6: %{name}-arhdr.patch
34 Patch7: %{name}-ld-speedup.patch
35 Patch8: %{name}-readelf-overflows.patch
36 Patch9: %{name}-robustify.patch
37 Patch10: %{name}-robustify2.patch
38 Patch11: %{name}-robustify3.patch
39 Patch12: %{name}-robustify4.patch
40 Patch13: %{name}-robustify5.patch
41 Patch14: %{name}-robustify6.patch
42 #Patch15: %{name}-absolute-gnu_debuglink-path.patch
43 URL: http://sources.redhat.com/binutils/
44 BuildRequires: autoconf >= 2.59
45 BuildRequires: automake >= 1:1.8.2
48 BuildRequires: gettext-devel
49 BuildRequires: perl-tools-pod
51 BuildRequires: sparc32
53 BuildRequires: texinfo >= 4.2
54 Requires(post,postun): /sbin/ldconfig
55 Requires: %{name} = %{epoch}:%{version}-%{release}
56 Conflicts: gcc-c++ < 5:3.3
57 Conflicts: modutils < 2.4.17
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 %define _libdir /usr/lib
65 Binutils is a collection of binary utilities, including:
66 - ar - create, modify and extract from archives,
67 - nm - lists symbols from object files,
68 - objcopy - copy and translate object files,
69 - objdump - display information from object files,
70 - ranlib - generate an index for the contents of an archive,
71 - size - list the section sizes of an object or archive file,
72 - strings - list printable strings from files,
73 - strip - discard symbols,
74 - addr2line - convert addresses to file and line,
75 - nlmconv - convert object code into an NLM.
77 %description -l es.UTF-8
78 Binutils es una colección de utilitarios necesarios para compilar
79 programas. Incluye assembler y linker, así como varios otros programas
80 para trabajar con formatos que se puedan ejecutar.
82 %description -l pl.UTF-8
83 Pakiet binutils zawiera zestaw narzędzi umożliwiających kompilację
84 programów. Znajdują się tutaj między innymi assembler, konsolidator
85 (linker), a także inne narzędzia do manipulowania binarnymi plikami
86 programów i bibliotek.
88 %description -l pt_BR.UTF-8
89 binutils é uma coletânea de utilitários necessários para compilar
90 programas. Inclui assembler e linker, assim como vários outros
91 programas para trabalhar com formatos executáveis.
93 %description -l ru.UTF-8
94 binutils - это набор инструментов, необходимых для компилляции
95 программ. Включает ассемблер, компоновщик и набор других программ для
96 работы с исполняемыми файлами разнообразных форматов.
98 %description -l uk.UTF-8
99 binutils - це набір інструментів, необхідних для компіляції програм.
100 Містить асемблер, компоновщик та інші програми, необхідні для роботи з
101 виконуваними файлами різних форматів.
104 Summary: GNU binutils shared libraries
105 Summary(pl.UTF-8): Biblioteki współdzielone GNU binutils
107 Conflicts: binutils < 3:2.15.94.0.2.2-2.1
110 GNU binutils shared libraries (libbfd, libopcodes).
112 %description libs -l pl.UTF-8
113 Biblioteki współdzielone GNU binutils (libbfd, libopcodes).
116 Summary: Development files for GNU binutils libraries
117 Summary(pl.UTF-8): Pliki programistyczne bibliotek GNU binutils
118 Group: Development/Libraries
119 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
122 Development files for GNU binutils libraries (libbfd, libopcodes) and
123 static libiberty library.
125 %description devel -l pl.UTF-8
126 Pliki programistyczne bibliotek GNU binutils (libbfd, libopcodes) oraz
127 statyczna biblioteka libiberty.
130 Summary: GNU binutils static libraries
131 Summary(pl.UTF-8): Biblioteki statyczne do GNU binutils
132 Group: Development/Libraries
133 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
136 Static GNU binutils libraries (libbfd, libopcodes).
138 %description static -l pl.UTF-8
139 Biblioteki statyczne GNU binutils (libbfd, libopcodes).
142 Summary: GASP - old preprocessor for assembly programs
143 Summary(pl.UTF-8): GASP - stary preprocesor dla programów w asemblerze
144 Group: Development/Tools
145 Requires: %{name} = %{epoch}:%{version}-%{release}
148 GASP - old preprocessor for assembly programs. It's officially
149 obsoleted, but it's still needed to build some packages.
151 %description gasp -l pl.UTF-8
152 GASP - stary preprocesor dla programów w asemblerze. Jest oficjalnie
153 uznany za przestarzały, ale jest nadal potrzebny do zbudowania
178 # non-standard regeneration (needed because of gasp patch)
181 automake --cygnus Makefile
182 automake --cygnus doc/Makefile
196 TARGETS=sparc64-linux
198 %{?addtargets:TARGETS="%{addtargets}"}
200 cp -f /usr/share/automake/config.* .
201 CFLAGS="%{rpmcflags}"; export CFLAGS
202 CC="%{__cc}"; export CC
206 ./configure %{_target_platform} \
209 --prefix=%{_prefix} \
210 --libdir=%{_libdir} \
211 --infodir=%{_infodir} \
212 --mandir=%{_mandir} \
213 %{!?with_allarchs:`[ -n "${TARGETS}" ] && echo "--enable-targets=${TARGETS}"`} \
215 --enable-64-bit-bfd \
217 %{?with_allarchs:--enable-64-bit-bfd} \
219 %{?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}
221 %{__make} configure-bfd
222 %{__make} headers -C bfd
227 rm -rf $RPM_BUILD_ROOT
229 %{__make} install install-info \
230 prefix=$RPM_BUILD_ROOT%{_prefix} \
231 tooldir=$RPM_BUILD_ROOT%{_prefix} \
232 mandir=$RPM_BUILD_ROOT%{_mandir} \
233 infodir=$RPM_BUILD_ROOT%{_infodir} \
234 includedir=$RPM_BUILD_ROOT%{_includedir} \
235 libdir=$RPM_BUILD_ROOT%{_libdir}
237 rm -f $RPM_BUILD_ROOT%{_infodir}/standards.info*
239 # remove these man pages unless we cross-build for win*/netware platforms.
240 # however, this should be done in Makefiles.
241 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{dlltool,nlmconv,windres}.1
243 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
245 install include/libiberty.h $RPM_BUILD_ROOT%{_includedir}
246 install libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
248 # remove evil -L pointing inside builder's home
249 perl -pi -e 's@-L[^ ]*/pic @@g' $RPM_BUILD_ROOT%{_libdir}/libbfd.la
257 cat bfd.lang opcodes.lang > %{name}-libs.lang
258 cat gas.lang gprof.lang ld.lang >> %{name}.lang
260 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
263 rm -rf $RPM_BUILD_ROOT
265 %post -p /sbin/postshell
266 -/usr/sbin/fix-info-dir -c %{_infodir}
268 %postun -p /sbin/postshell
269 -/usr/sbin/fix-info-dir -c %{_infodir}
271 %post libs -p /sbin/ldconfig
272 %postun libs -p /sbin/ldconfig
274 %post devel -p /sbin/postshell
275 -/usr/sbin/fix-info-dir -c %{_infodir}
277 %postun devel -p /sbin/postshell
278 -/usr/sbin/fix-info-dir -c %{_infodir}
280 %files -f %{name}.lang
281 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_bindir}/[!g]*
284 %attr(755,root,root) %{_bindir}/g[!a]*
286 %{_prefix}/lib/ldscripts
288 %{_infodir}/binutils.info*
289 %{_infodir}/configure.info*
290 %{_infodir}/gprof.info*
293 %lang(cs) %{_mandir}/cs/man1/*
294 %lang(de) %{_mandir}/de/man1/*
295 %lang(es) %{_mandir}/es/man1/*
296 %lang(fi) %{_mandir}/fi/man1/*
297 %lang(fr) %{_mandir}/fr/man1/*
298 %lang(hu) %{_mandir}/hu/man1/*
299 %lang(ja) %{_mandir}/ja/man1/*
300 %lang(pl) %{_mandir}/pl/man1/*
302 %files libs -f %{name}-libs.lang
303 %defattr(644,root,root,755)
304 %attr(755,root,root) %{_libdir}/libbfd-*.so
305 %attr(755,root,root) %{_libdir}/libopcodes-*.so
308 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_libdir}/libbfd.so
310 %attr(755,root,root) %{_libdir}/libopcodes.so
312 %{_libdir}/libopcodes.la
313 %{_libdir}/libiberty.a
315 %{_infodir}/bfd.info*
318 %defattr(644,root,root,755)
320 %{_libdir}/libopcodes.a
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_bindir}/gasp
325 %{_infodir}/gasp.info*