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