source: spec/trunk/SPECS/binutils.spec@ 222

Last change on this file since 222 was 222, checked in by Yuri Dario, 14 years ago

spec: binutils build.

File size: 4.4 KB
Line 
1#disable lxlite strip
2%define __os_install_post %{nil}
3
4# rpmbuild parameters:
5# --define "binutils_target arm-linux-gnu" to create arm-linux-gnu-binutils.
6# --with debug: Build without optimizations and without splitting the debuginfo.
7# --without testsuite: Do not run the testsuite. Default is to run it.
8# --with testsuite: Run the testsuite. Default --with debug is not to run it.
9
10%bcond_with testsuite
11
12%if 0%{!?binutils_target:1}
13%define binutils_target %{_target_platform}
14%define isnative 1
15%define enable_shared 1
16%else
17%define cross %{binutils_target}-
18%define isnative 0
19%define enable_shared 0
20%endif
21
22Summary: A GNU collection of binary utilities
23Name: %{?cross}binutils%{?_with_debug:-debug}
24Version: 2.21
25Release: 1%{?dist}
26License: GPLv3+
27Group: Development/Tools
28URL: http://sources.redhat.com/binutils
29Source: binutils-2.21-os2-20101212.zip
30
31%define gold_arches %ix86 x86_64
32
33%ifarch %gold_arches
34%define build_gold both
35%else
36%define build_gold no
37%endif
38
39%if 0%{?_with_debug:1}
40# Define this if you want to skip the strip step and preserve debug info.
41# Useful for testing.
42%define __debug_install_post : > %{_builddir}/%{?buildsubdir}/debugfiles.list
43%define debug_package %{nil}
44%define run_testsuite 0%{?_with_testsuite:1}
45%else
46%define run_testsuite 0%{!?_without_testsuite:1}
47%endif
48
49#Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
50#BuildRequires: texinfo >= 4.0, gettext, flex, bison, zlib-devel
51
52# Required for: ld-bootstrap/bootstrap.exp bootstrap with --static
53# It should not be required for: ld-elf/elf.exp static {preinit,init,fini} array
54%if %{run_testsuite}
55#BuildRequires: dejagnu, zlib-static, glibc-static, sharutils
56%endif
57
58Conflicts: gcc-c++ < 4.0.0
59#Requires(post): /sbin/install-info
60#Requires(preun): /sbin/install-info
61%ifarch ia64
62Obsoletes: gnupro <= 1117-1
63%endif
64
65# The higher of these two numbers determines the default ld.
66%{!?ld_bfd_priority: %define ld_bfd_priority 50}
67%{!?ld_gold_priority:%define ld_gold_priority 30}
68
69%if "%{build_gold}" == "both"
70#Requires(post): coreutils
71#Requires(post): %{_sbindir}/alternatives
72#Requires(preun): %{_sbindir}/alternatives
73%endif
74
75# On ARM EABI systems, we do want -gnueabi to be part of the
76# target triple.
77%ifnarch %{arm}
78%define _gnu %{nil}
79%endif
80
81%description
82Binutils is a collection of binary utilities, including ar (for
83creating, modifying and extracting from archives), as (a family of GNU
84assemblers), gprof (for displaying call graph profile data), ld (the
85GNU linker), nm (for listing symbols from object files), objcopy (for
86copying and translating object files), objdump (for displaying
87information from object files), ranlib (for generating an index for
88the contents of an archive), readelf (for displaying detailed
89information about binary files), size (for listing the section sizes
90of an object or archive file), strings (for listing printable strings
91from files), strip (for discarding symbols), and addr2line (for
92converting addresses to file and line).
93
94%package devel
95Summary: BFD and opcodes dynamic libraries and header files
96Group: System Environment/Libraries
97#Conflicts: binutils < 2.17.50.0.3-4
98#Requires(post): /sbin/install-info
99#Requires(preun): /sbin/install-info
100Requires: zlib-devel
101
102%description devel
103This package contains the generic BFD and opcodes dynamic libraries and
104associated header files. Developers starting new projects are encouraged
105to consider using libelf instead of BFD.
106
107%package static
108Summary: BFD and opcodes static libraries
109Group: System Environment/Libraries
110#Requires(post): /sbin/install-info
111#Requires(preun): /sbin/install-info
112
113%description static
114This package contains BFD and opcodes static libraries. Developers
115starting new projects are strongly encouraged to consider using
116libelf instead of BFD.
117
118%prep
119%setup -q -c
120
121%build
122
123%install
124rm -rf %{buildroot}
125mkdir -p %{buildroot}%{_usr}
126cp -p -r "binutils/*" %{buildroot}%{_usr}
127
128rm %{buildroot}%{_libdir}/*.la
129rm %{buildroot}%{_usr}/readme.os2
130rm %{buildroot}%{_infodir}/dir
131
132%clean
133rm -rf %{buildroot}
134
135%post
136
137%preun
138
139%files
140%defattr(-,root,root,-)
141%doc binutils/readme.os2
142%{_bindir}/*
143%{_usr}/i386-pc-os2-emx/*
144%{_mandir}/man1/*
145%{_infodir}/[^b]*info*
146%{_infodir}/binutils*info*
147
148%files devel
149%defattr(-,root,root,-)
150%{_includedir}/*
151%{_infodir}/bfd*info*
152
153%files static
154%defattr(-,root,root,-)
155%{_libdir}/*.a
156
157%changelog
Note: See TracBrowser for help on using the repository browser.