]> git.pld-linux.org Git - packages/crossavr-binutils.git/blob - crossavr-binutils.spec
- add gcc 4.4.0 patch
[packages/crossavr-binutils.git] / crossavr-binutils.spec
1 Summary:        Cross AVR GNU binary utility development utilities - binutils
2 Summary(es.UTF-8):      Utilitarios para desarrollo de binarios de la GNU - AVR binutils
3 Summary(fr.UTF-8):      Utilitaires de développement binaire de GNU - AVR binutils
4 Summary(pl.UTF-8):      Skrośne narzędzia programistyczne GNU dla AVR - binutils
5 Summary(pt_BR.UTF-8):   Utilitários para desenvolvimento de binários da GNU - AVR binutils
6 Summary(tr.UTF-8):      GNU geliştirme araçları - AVR binutils
7 Name:           crossavr-binutils
8 Version:        2.19.1
9 Release:        1
10 License:        GPL
11 Group:          Development/Tools
12 Source0:        ftp://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2
13 # Source0-md5:  09a8c5821a2dfdbb20665bc0bd680791
14 Patch0:         %{name}-avr-size.patch
15 Patch1:         %{name}-avr-coff.patch
16 Patch2:         %{name}-new-sections.patch
17 Patch3:         %{name}-data-origin.patch
18 Patch4:         %{name}-xmega.patch
19 Patch5:         %{name}-xmega2.patch
20 Patch6:         %{name}-atmega32u6.patch
21 Patch7:         %{name}-gcc44.patch
22 URL:            http://sources.redhat.com/binutils/
23 BuildRequires:  automake
24 BuildRequires:  bash
25 BuildRequires:  bison
26 BuildRequires:  flex
27 BuildRequires:  gettext-devel
28 BuildRequires:  texinfo
29 %ifarch sparc sparc32
30 BuildRequires:  sparc32
31 %endif
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %define         target          avr
35 %define         arch            %{_prefix}/%{target}
36
37 %description
38 Binutils is a collection of binary utilities, including:
39 - ar - create, modify and extract from archives,
40 - nm - lists symbols from object files,
41 - objcopy - copy and translate object files,
42 - objdump - display information from object files,
43 - ranlib - generate an index for the contents of an archive,
44 - size - list the section sizes of an object or archive file,
45 - strings - list printable strings from files,
46 - strip - discard symbols,
47 - c++filt - a filter for demangling encoded C++ symbols,
48 - addr2line - convert addresses to file and line,
49 - nlmconv - convert object code into an NLM.
50
51 This package contains the cross version for Atmel AVR.
52
53 %description -l pl.UTF-8
54 Pakiet binutils zawiera zestaw narzędzi umożliwiających kompilację
55 programów. Znajdują się tutaj między innymi assembler, konsolidator
56 (linker), a także inne narzędzia do manipulowania binarnymi plikami
57 programów i bibliotek.
58
59 Ten pakiet zawiera wersję skrośną generującą kod dla Atmel AVR.
60
61 %prep
62 %setup -q -n binutils-%{version}
63 %patch0 -p0
64 %patch1 -p0
65 %patch2 -p0
66 %patch3 -p0
67 %patch4 -p0
68 %patch5 -p0
69 %patch6 -p0
70 %patch7 -p1
71
72 %build
73 cp /usr/share/automake/config.sub .
74
75 # ldscripts won't be generated properly if SHELL is not bash...
76 CFLAGS="%{rpmcflags}" \
77 LDFLAGS="%{rpmldflags}" \
78 CONFIG_SHELL="/bin/bash" \
79 %ifarch sparc
80 sparc32 \
81 %endif
82 ./configure \
83         --disable-shared \
84         --prefix=%{_prefix} \
85         --libdir=%{_libdir} \
86         --mandir=%{_mandir} \
87         --infodir=%{_infodir} \
88         --host=%{_target_platform} \
89         --build=%{_target_platform} \
90         --target=%{target}
91
92 # We have to regenerate headers after patching.
93 %{__make} configure-host \
94         tooldir=%{_prefix} \
95         EXEEXT=""
96
97 %{__make} -C bfd headers \
98         tooldir=%{_prefix} \
99         EXEEXT=""
100
101 %{__make} all \
102         tooldir=%{_prefix} \
103         EXEEXT=""
104
105 %install
106 rm -rf $RPM_BUILD_ROOT
107 install -d $RPM_BUILD_ROOT%{_prefix}
108
109 %{__make} install \
110         prefix=$RPM_BUILD_ROOT%{_prefix} \
111         mandir=$RPM_BUILD_ROOT%{_mandir} \
112         infodir=$RPM_BUILD_ROOT%{_infodir} \
113         libdir=$RPM_BUILD_ROOT%{_libdir}
114 cd bfd
115 %{__make} install_libbfd DESTDIR=$RPM_BUILD_ROOT
116 cd ..
117 cd opcodes      
118 %{__make} install_libopcodes DESTDIR=$RPM_BUILD_ROOT
119 cd ..
120
121 # remove these man pages unless we cross-build for win*/netware platforms.
122 # however, this should be done in Makefiles.
123 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{*dlltool,*nlmconv,*windres}.1
124
125 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/*.mo
126 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
127 rm -rf $RPM_BUILD_ROOT%{_infodir}
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %files
133 %defattr(644,root,root,755)
134 %doc README
135 %attr(755,root,root) %{_bindir}/%{target}-*
136 %dir %{arch}
137 %dir %{arch}/bin
138 %attr(755,root,root) %{arch}/bin/*
139 %dir %{arch}/lib
140 %dir %{arch}/lib/*
141 %{arch}/lib/*/*
142 %{_mandir}/man?/%{target}-*
This page took 0.037768 seconds and 3 git commands to generate.