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