]> git.pld-linux.org Git - packages/crossavr-gcc.git/blob - crossavr-gcc.spec
- updated to 4.2.4
[packages/crossavr-gcc.git] / crossavr-gcc.spec
1 #
2 # Conditional build:
3 %bcond_with     bootstrap       # for bootstraping
4 #
5 Summary:        Cross AVR GNU binary utility development utilities - gcc
6 Summary(es.UTF-8):      Utilitarios para desarrollo de binarios de la GNU - AVR gcc
7 Summary(fr.UTF-8):      Utilitaires de développement binaire de GNU - AVR gcc
8 Summary(pl.UTF-8):      Skrośne narzędzia programistyczne GNU dla AVR - gcc
9 Summary(pt_BR.UTF-8):   Utilitários para desenvolvimento de binários da GNU - AVR gcc
10 Summary(tr.UTF-8):      GNU geliştirme araçları - AVR gcc
11 Name:           crossavr-gcc
12 Version:        4.2.4
13 Release:        1
14 Patch0:         %{name}-0b-constants.patch
15 Patch1:         %{name}-attribute_alias.patch
16 Patch2:         %{name}-bug25672.patch
17 Patch3:         %{name}-dwarf.patch
18 Patch4:         %{name}-libiberty-Makefile.in.patch
19 Patch5:         %{name}-zz-atmega256x.patch
20 Epoch:          1
21 License:        GPL
22 Group:          Development/Languages
23 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
24 # Source0-md5:  d79f553e7916ea21c556329eacfeaa16
25 BuildRequires:  /bin/bash
26 BuildRequires:  autoconf
27 BuildRequires:  bison
28 BuildRequires:  crossavr-binutils
29 BuildRequires:  flex
30 Requires:       crossavr-binutils >= 2.15.91.0.2
31 %{!?with_boostrap:Requires:     crossavr-libc}
32 Requires:       gcc-dirs
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define         target          avr
36 %define         arch            %{_prefix}/%{target}
37 %define         gccarch         %{_libdir}/gcc/%{target}
38 %define         gcclib          %{_libdir}/gcc/%{target}/%{version}
39 %define         _noautostrip    .*%{gcclib}.*/libgc.*\\.a
40
41 %description
42 This package contains a cross-gcc which allows the creation of
43 binaries to be run on Atmel AVR on other machines.
44
45 %description -l de.UTF-8
46 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
47 anderem Rechner Code für Atmel AVR zu generieren.
48
49 %description -l pl.UTF-8
50 Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
51 maszynach binariów do uruchamiania na Atmel AVR.
52
53 %package c++
54 Summary:        C++ support for avr-gcc
55 Summary(pl.UTF-8):      Obsługa C++ dla avr-gcc
56 Group:          Development/Languages
57 Requires:       %{name} = %{epoch}:%{version}-%{release}
58
59 %description c++
60 This package adds C++ support to the GNU Compiler Collection for AVR.
61
62 %description c++ -l pl.UTF-8
63 Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
64
65 %prep
66 %setup -q -n gcc-%{version}
67 %patch0 -p0
68 %patch1 -p0
69 %patch2 -p0
70 %patch3 -p0
71 %patch4 -p0
72 %patch5 -p1
73
74 %build
75 rm -rf obj-%{target}
76 install -d obj-%{target}
77 cd obj-%{target}
78
79 CFLAGS="%{rpmcflags}" \
80 CXXFLAGS="%{rpmcflags}" \
81 TEXCONFIG=false \
82 ../configure \
83         --prefix=%{_prefix} \
84         --infodir=%{_infodir} \
85         --mandir=%{_mandir} \
86         --bindir=%{_bindir} \
87         --libdir=%{_libdir} \
88         --libexecdir=%{_libdir} \
89         --disable-shared \
90         --disable-libssp \
91         --enable-languages="c,c++" \
92         --with-dwarf2 \
93         --with-gnu-as \
94         --with-gnu-ld \
95         --with-system-zlib \
96         --with-multilib \
97         --without-x \
98         --build=%{_target_platform} \
99         --host=%{_target_platform} \
100         --target=%{target}
101
102 %{__make} CFLAGS_FOR_TARGET="-Os"
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106
107 %{__make} -C obj-%{target} install \
108         DESTDIR=$RPM_BUILD_ROOT
109
110 # don't want it here
111 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
112 rm -rf $RPM_BUILD_ROOT%{_infodir}
113 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
114 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
115 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
116 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
117 rm -f $RPM_BUILD_ROOT%{gcclib}/include/fixed
118 rm -f $RPM_BUILD_ROOT%{gcclib}/include/README
119 rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
120
121 %if 0%{!?debug:1}
122 # strip target libraries
123 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a
124 %endif
125
126 %clean
127 rm -rf $RPM_BUILD_ROOT
128
129 %files
130 %defattr(644,root,root,755)
131 %attr(755,root,root) %{_bindir}/%{target}-gcc*
132 %attr(755,root,root) %{_bindir}/%{target}-cpp
133 %attr(755,root,root) %{_bindir}/%{target}-gcov
134 %dir %{gccarch}
135 %dir %{gcclib}
136 %attr(755,root,root) %{gcclib}/cc1
137 %attr(755,root,root) %{gcclib}/collect2
138 %{gcclib}/libg*.a
139 %{gcclib}/%{target}*
140 %dir %{gcclib}/include
141 %{gcclib}/include/*.h
142 %{_mandir}/man1/%{target}-cpp.1*
143 %{_mandir}/man1/%{target}-gcc.1*
144 %{_mandir}/man1/%{target}-gcov.1*
145
146 %files c++
147 %defattr(644,root,root,755)
148 %attr(755,root,root) %{_bindir}/%{target}-g++
149 %attr(755,root,root) %{_bindir}/%{target}-c++
150 %attr(755,root,root) %{gcclib}/cc1plus
151 %{_mandir}/man1/%{target}-g++.1*
This page took 0.08733 seconds and 3 git commands to generate.