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