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