source: rtems/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-gcc.spec @ e1b4795

4.104.115
Last change on this file since e1b4795 was e1b4795, checked in by Ralf Corsepius <ralf.corsepius@…>, on Oct 1, 2009 at 3:25:28 AM

Bump GCC_RPMREL.

  • Property mode set to 100644
File size: 18.4 KB
Line 
1#
2# Please send bugfixes or comments to
3#       http://www.rtems.org/bugzilla
4#
5
6%define _prefix                 /opt/rtems-4.10
7%define _exec_prefix            %{_prefix}
8%define _bindir                 %{_exec_prefix}/bin
9%define _sbindir                %{_exec_prefix}/sbin
10%define _libexecdir             %{_exec_prefix}/libexec
11%define _datarootdir            %{_prefix}/share
12%define _datadir                %{_datarootdir}
13%define _sysconfdir             %{_prefix}/etc
14%define _sharedstatedir         %{_prefix}/com
15%define _localstatedir          %{_prefix}/var
16%define _includedir             %{_prefix}/include
17%define _libdir                 %{_exec_prefix}/%{_lib}
18%define _mandir                 %{_datarootdir}/man
19%define _infodir                %{_datarootdir}/info
20%define _localedir              %{_datarootdir}/locale
21
22%ifos cygwin cygwin32 mingw mingw32
23%define _exeext .exe
24%define debug_package           %{nil}
25%define _libdir                 %{_exec_prefix}/lib
26%else
27%define _exeext %{nil}
28%endif
29
30%ifos cygwin cygwin32
31%define optflags -O3 -pipe -march=i486 -funroll-loops
32%endif
33
34%ifos mingw mingw32
35%if %{defined _mingw32_cflags}
36%define optflags %{_mingw32_cflags}
37%else
38%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
39%endif
40%endif
41
42%if "%{_build}" != "%{_host}"
43%define _host_rpmprefix %{_host}-
44%else
45%define _host_rpmprefix %{nil}
46%endif
47
48
49%define gcc_pkgvers 4.4.1
50%define gcc_version 4.4.1
51%define gcc_rpmvers %{expand:%(echo "4.4.1" | tr - _ )}
52
53%define newlib_pkgvers          1.17.0
54%define newlib_version          1.17.0
55
56Name:           rtems-4.10-avr-rtems4.10-gcc
57Summary:        avr-rtems4.10 gcc
58
59Group:          Development/Tools
60Version:        %{gcc_rpmvers}
61Release:        18%{?dist}
62License:        GPL
63URL:            http://gcc.gnu.org
64BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
65
66%define _use_internal_dependency_generator 0
67
68BuildRequires:  %{_host_rpmprefix}gcc
69
70%if "%{gcc_version}" >= "4.3.0"
71%define _gmp_minvers            4.1
72%else
73%if "%{gcc_version}" >= "4.2.0"
74%endif
75%endif
76
77%if %{defined _gmp_minvers}
78BuildRequires: gmp-devel >= %{_gmp_minvers}
79%if "%{_build}" != "%{_host}"
80BuildRequires:  %{_host_rpmprefix}gmp-devel >= %{_gmp_minvers}
81%endif
82%endif
83
84
85%if "%{gcc_version}" >= "4.4.0"
86%define _mpfr_minvers   2.3.2
87%define mpfr_version    2.4.1
88%else
89%if "%{gcc_version}" >= "4.3.0"
90%define _mpfr_minvers   2.3.1
91%define mpfr_version    2.3.2
92%else
93%if "%{gcc_version}" >= "4.2.0"
94%endif
95%endif
96%endif
97
98%if %{defined _mpfr_minvers}
99# FIXME: This is an ugly cludge
100%{?fc10:%global mpfr_provided 2.3.2}
101%{?fc11:%global mpfr_provided 2.4.1}
102%{?suse10_3:%global mpfr_provided 2.2.1}
103%{?suse11_0:%global mpfr_provided 2.3.1}
104%{?suse11_1:%global mpfr_provided 2.3.2}
105%{?cygwin:%global mpfr_provided 2.4.1}
106%{?mingw32:%global mpfr_provided %{nil}}
107
108%if %{defined mpfr_provided}
109%if "%{mpfr_provided}" < "%{_mpfr_minvers}"
110%define _build_mpfr 1
111%else
112%if "%{_build}" != "%{_host}"
113BuildRequires:  %{_host_rpmprefix}mpfr-devel >= %{_mpfr_minvers}
114%else
115BuildRequires: mpfr-devel >= %{_mpfr_minvers}
116%endif
117%endif
118%else
119%define _build_mpfr 1
120%endif
121
122%endif
123
124%if "%{_build}" != "%{_host}"
125BuildRequires:  rtems-4.10-avr-rtems4.10-gcc = %{gcc_rpmvers}
126%endif
127
128%if "%{gcc_version}" >= "4.2.0"
129BuildRequires:  flex bison
130%endif
131
132
133BuildRequires:  texinfo >= 4.2
134BuildRequires:  rtems-4.10-avr-rtems4.10-binutils
135
136Requires:       rtems-4.10-gcc-common
137Requires:       rtems-4.10-avr-rtems4.10-binutils
138Requires:       rtems-4.10-avr-rtems4.10-gcc-libgcc = %{gcc_rpmvers}-%{release}
139Requires:       rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-58%{?dist}
140
141
142%define _gcclibdir %{_prefix}/lib
143
144%if "%{gcc_version}" == "4.4.1"
145Source0:        ftp://ftp.gnu.org/pub/gnu/gcc/%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
146Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gcc-core-%{gcc_pkgvers}-rtems4.10-20090820.diff
147%endif
148%{?_without_sources:NoSource:   0}
149
150%if "%{newlib_version}" == "1.17.0"
151Source50:       ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
152Patch50:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/newlib-1.17.0-rtems4.10-20090922.diff
153%endif
154%{?_without_sources:NoSource:   50}
155
156%if "%{gcc_version}" >= "4.3.0"
157Source60:    http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2
158%endif
159
160%description
161Cross gcc for avr-rtems4.10.
162
163%prep
164%setup -c -T -n %{name}-%{version}
165
166%setup -q -T -D -n %{name}-%{version} -a0
167%{?PATCH0:%patch0 -p0}
168
169
170
171
172
173
174%setup -q -T -D -n %{name}-%{version} -a50
175cd newlib-%{newlib_version}
176%{?PATCH50:%patch50 -p1}
177cd ..
178  # Copy the C library into gcc's source tree
179  ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
180
181%if 0%{?_build_mpfr}
182%setup -q -T -D -n %{name}-%{version} -a60
183%{?PATCH60:%patch60 -p1}
184  # Build mpfr one-tree style
185  ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
186%endif
187
188%if "%{gcc_version}" < "4.1.0"
189  sed -e 's/\(version_string.* = \"[^\"]*\)/\1 (RTEMS gcc-%{gcc_version}\/newlib-%{newlib_version}-%release)/' \
190  gcc-%{gcc_pkgvers}/gcc/version.c > gcc-%{gcc_pkgvers}/gcc/version.c~
191%else
192  sed -e 's/^#define VERSUFFIX.*$/#define VERSUFFIX \" (RTEMS gcc-%{gcc_version}\/newlib-%{newlib_version}-%{release})\"/' \
193    gcc-%{gcc_pkgvers}/gcc/version.c > gcc-%{gcc_pkgvers}/gcc/version.c~
194%endif
195  mv gcc-%{gcc_pkgvers}/gcc/version.c~ gcc-%{gcc_pkgvers}/gcc/version.c
196
197
198  # Fix timestamps
199  cd gcc-%{gcc_pkgvers}
200  contrib/gcc_update --touch
201  cd ..
202%build
203  mkdir -p build
204
205  cd build
206
207  languages="c"
208  export PATH="%{_bindir}:${PATH}"
209%if "%{_build}" != "%{_host}"
210  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
211  CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
212%else
213# gcc is not ready to be compiled with -std=gnu99
214  CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
215%endif
216  ../gcc-%{gcc_pkgvers}/configure \
217    --prefix=%{_prefix} \
218    --bindir=%{_bindir} \
219    --exec_prefix=%{_exec_prefix} \
220    --includedir=%{_includedir} \
221    --libdir=%{_gcclibdir} \
222    --libexecdir=%{_libexecdir} \
223    --mandir=%{_mandir} \
224    --infodir=%{_infodir} \
225    --datadir=%{_datadir} \
226    --build=%_build --host=%_host \
227    --target=avr-rtems4.10 \
228    --disable-libstdcxx-pch \
229    --with-gnu-as --with-gnu-ld --verbose \
230    --with-newlib \
231    --with-system-zlib \
232    --disable-nls --without-included-gettext \
233    --disable-win32-registry \
234    --enable-version-specific-runtime-libs \
235    --enable-threads \
236    --enable-newlib-io-c99-formats \
237    --enable-languages="$languages" $optargs
238
239%if "%_host" != "%_build"
240  # Bug in gcc-3.2.1:
241  # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
242  mkdir -p gcc/include
243  cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
244%endif
245
246  make %{?_smp_mflags} all
247  make info
248  cd ..
249
250%install
251  export PATH="%{_bindir}:${PATH}"
252  rm -rf $RPM_BUILD_ROOT
253
254  cd build
255
256  make DESTDIR=$RPM_BUILD_ROOT install
257  cd ..
258
259  cd build/avr-rtems4.10/newlib
260  make DESTDIR=$RPM_BUILD_ROOT install-info
261  cd ../../..
262
263%if "%{gcc_version}" <= "4.1.2"
264# Misplaced header file
265  if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
266    mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
267      $RPM_BUILD_ROOT%{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}/include/
268  fi
269%endif
270
271  # host library
272%if "%{gcc_version}" >= "4.2.0"
273  # libiberty doesn't honor --libdir, but always installs to a
274  # magically guessed _libdir
275  rm -f  ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
276%else
277  # libiberty installs to --libdir=...
278  rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
279%endif
280
281  # We use the version from binutils
282  rm -f $RPM_BUILD_ROOT%{_bindir}/avr-rtems4.10-c++filt%{_exeext}
283
284
285  # We don't ship info/dir
286  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
287  touch $RPM_BUILD_ROOT%{_infodir}/dir
288
289  # Bug in gcc-3.4.0pre
290  rm -f $RPM_BUILD_ROOT%{_bindir}/avr-rtems4.10-avr-rtems4.10-gcjh%{_exeext}
291
292  # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
293  # the fixinclude-install-tools
294  rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}/install-tools
295  rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/avr-rtems4.10/%{gcc_version}/install-tools
296
297  # Bug in gcc > 4.1.0: Installs an unused, empty directory
298  if test -d ${RPM_BUILD_ROOT}%{_prefix}/avr-rtems4.10/include/bits; then
299    rmdir ${RPM_BUILD_ROOT}%{_prefix}/avr-rtems4.10/include/bits
300  fi
301
302  # Collect multilib subdirectories
303  multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
304
305  echo "%defattr(-,root,root,-)" > build/files.newlib
306  TGTDIR="%{_exec_prefix}/avr-rtems4.10/lib"
307  for i in $multilibs; do
308    case $i in
309    \.) echo "%dir ${TGTDIR}" >> build/files.newlib
310      ;;
311    *)  echo "%dir ${TGTDIR}/$i" >> build/files.newlib
312      ;;
313    esac
314  done
315
316  rm -f dirs ;
317  echo "%defattr(-,root,root,-)" >> dirs
318  TGTDIR="%{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}"
319  for i in $multilibs; do
320    case $i in
321    \.) ;; # ignore, handled elsewhere
322    *)  echo "%dir ${TGTDIR}/$i" >> dirs
323      ;;
324    esac
325  done
326
327  # Collect files to go into different packages
328  cp dirs build/files.gcc
329  cp dirs build/files.gfortran
330  cp dirs build/files.objc
331  cp dirs build/files.gcj
332  cp dirs build/files.g++
333
334  TGTDIR="%{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}"
335  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
336  for i in $f; do
337    case $i in
338    *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
339    *f771) ;;
340    *f951) ;;
341    *cc1) ;;
342    *cc1obj) ;;
343    *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
344    *collect2) ;;
345    *libobjc*) echo "$i" >> build/files.objc ;;
346    *include/objc*) ;;
347    *include/g++*);;
348    *include/c++*);;
349    *include-fixed/*);;
350    *finclude/*);;
351    *adainclude*);;
352    *adalib*);;
353    *gnat1);;
354    *jc1) ;;
355    *jvgenmain) ;;
356    */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
357    */libstdc++.*) echo "$i" >> build/files.g++ ;;
358    */libsupc++.*) echo "$i" >> build/files.g++ ;;
359    *) echo "$i" >> build/files.gcc ;;
360    esac
361  done
362
363  TGTDIR="%{_exec_prefix}/avr-rtems4.10/lib"
364  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
365  for i in $f; do
366    case $i in
367    *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
368    *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
369# all other files belong to newlib
370    *) echo "$i" >> build/files.newlib ;;
371    esac
372  done
373# Extract %%__os_install_post into os_install_post~
374cat << \EOF > os_install_post~
375%__os_install_post
376EOF
377
378# Generate customized brp-*scripts
379cat os_install_post~ | while read a x y; do
380case $a in
381# Prevent brp-strip* from trying to handle foreign binaries
382*/brp-strip*)
383  b=$(basename $a)
384  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
385  chmod a+x $b
386  ;;
387# Fix up brp-compress to handle %%_prefix != /usr
388*/brp-compress*)
389  b=$(basename $a)
390  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
391  chmod a+x $b
392  ;;
393esac
394done
395
396sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
397  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
398< os_install_post~ > os_install_post
399%define __os_install_post . ./os_install_post
400
401
402cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
403#!/bin/sh
404grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/avr-rtems4.10/(lib|include|sys-root)' \
405  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/avr-rtems4.10/'} | %__find_provides
406EOF
407chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
408%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
409
410cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
411#!/bin/sh
412grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/avr-rtems4.10/(lib|include|sys-root)' \
413  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/avr-rtems4.10/'} | %__find_requires
414EOF
415chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
416%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
417
418%ifnarch noarch
419# Extract %%__debug_install_post into debug_install_post~
420cat << \EOF > debug_install_post~
421%__debug_install_post
422EOF
423
424# Generate customized debug_install_post script
425cat debug_install_post~ | while read a x y; do
426case $a in
427# Prevent find-debuginfo.sh* from trying to handle foreign binaries
428*/find-debuginfo.sh)
429  b=$(basename $a)
430  sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
431  chmod a+x $b
432  ;;
433esac
434done
435
436sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
437< debug_install_post~ > debug_install_post
438%define __debug_install_post . ./debug_install_post
439
440%endif
441
442%clean
443  rm -rf $RPM_BUILD_ROOT
444
445# ==============================================================
446# rtems-4.10-avr-rtems4.10-gcc
447# ==============================================================
448# %package -n rtems-4.10-avr-rtems4.10-gcc
449# Summary:        GNU cc compiler for avr-rtems4.10
450# Group:          Development/Tools
451# Version:        %{gcc_rpmvers}
452# Requires:       rtems-4.10-avr-rtems4.10-binutils
453# Requires:       rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-58%{?dist}
454# License:      GPL
455
456# %if %build_infos
457# Requires:      rtems-4.10-gcc-common
458# %endif
459
460%description -n rtems-4.10-avr-rtems4.10-gcc
461GNU cc compiler for avr-rtems4.10.
462
463# ==============================================================
464# rtems-4.10-avr-rtems4.10-gcc-libgcc
465# ==============================================================
466%package -n rtems-4.10-avr-rtems4.10-gcc-libgcc
467Summary:        libgcc for avr-rtems4.10-gcc
468Group:          Development/Tools
469Version:        %{gcc_rpmvers}
470%{?_with_noarch_subpackages:BuildArch: noarch}
471Requires:       rtems-4.10-avr-rtems4.10-newlib = %{newlib_version}-58%{?dist}
472License:        GPL
473
474%description -n rtems-4.10-avr-rtems4.10-gcc-libgcc
475libgcc avr-rtems4.10-gcc.
476
477
478%files -n rtems-4.10-avr-rtems4.10-gcc
479%defattr(-,root,root)
480%dir %{_prefix}
481
482%dir %{_mandir}
483%dir %{_mandir}/man1
484%{_mandir}/man1/avr-rtems4.10-gcc.1*
485%{_mandir}/man1/avr-rtems4.10-cpp.1*
486%{_mandir}/man1/avr-rtems4.10-gcov.1*
487
488%dir %{_bindir}
489%{_bindir}/avr-rtems4.10-cpp%{_exeext}
490%{_bindir}/avr-rtems4.10-gcc%{_exeext}
491%{_bindir}/avr-rtems4.10-gcc-%{gcc_version}%{_exeext}
492%{_bindir}/avr-rtems4.10-gcov%{_exeext}
493%{_bindir}/avr-rtems4.10-gccbug
494
495%dir %{_libexecdir}
496%dir %{_libexecdir}/gcc
497%dir %{_libexecdir}/gcc/avr-rtems4.10
498%dir %{_libexecdir}/gcc/avr-rtems4.10/%{gcc_version}
499%{_libexecdir}/gcc/avr-rtems4.10/%{gcc_version}/cc1%{_exeext}
500%{_libexecdir}/gcc/avr-rtems4.10/%{gcc_version}/collect2%{_exeext}
501
502
503%files -n rtems-4.10-avr-rtems4.10-gcc-libgcc -f build/files.gcc
504%defattr(-,root,root)
505%dir %{_prefix}
506%dir %{_gcclibdir}
507%dir %{_gcclibdir}/gcc
508%dir %{_gcclibdir}/gcc/avr-rtems4.10
509%dir %{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}
510%dir %{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}/include
511
512%if "%{gcc_version}" > "4.0.3"
513%if "avr-rtems4.10" != "bfin-rtems4.10"
514%if "avr-rtems4.10" != "avr-rtems4.10"
515%dir %{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}/include/ssp
516%endif
517%endif
518%endif
519
520%if "%{gcc_version}" >= "4.3.0"
521%{_gcclibdir}/gcc/avr-rtems4.10/%{gcc_version}/include-fixed
522%endif
523
524# ==============================================================
525# rtems-4.10-gcc-common
526# ==============================================================
527%package -n rtems-4.10-gcc-common
528Summary:        Base package for rtems gcc and newlib C Library
529Group:          Development/Tools
530Version:        %{gcc_rpmvers}
531%{?_with_noarch_subpackages:BuildArch: noarch}
532License:        GPL
533
534Requires(post):         /sbin/install-info
535Requires(preun):        /sbin/install-info
536
537%description -n rtems-4.10-gcc-common
538GCC files that are shared by all targets.
539
540%files -n rtems-4.10-gcc-common
541%defattr(-,root,root)
542%dir %{_prefix}
543%dir %{_prefix}/share
544
545%dir %{_infodir}
546%ghost %{_infodir}/dir
547%{_infodir}/cpp.info*
548%{_infodir}/cppinternals.info*
549%{_infodir}/gcc.info*
550%{_infodir}/gccint.info*
551%{_infodir}/gccinstall.info*
552
553%dir %{_mandir}
554%dir %{_mandir}/man7
555%{_mandir}/man7/fsf-funding.7*
556%{_mandir}/man7/gfdl.7*
557%{_mandir}/man7/gpl.7*
558
559%post -n rtems-4.10-gcc-common
560  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
561  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
562  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
563  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
564  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
565
566%preun -n rtems-4.10-gcc-common
567if [ $1 -eq 0 ]; then
568  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
569  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
570  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
571  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
572  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
573fi
574
575
576
577
578# ==============================================================
579# rtems-4.10-avr-rtems4.10-newlib
580# ==============================================================
581%package -n rtems-4.10-avr-rtems4.10-newlib
582Summary:        C Library (newlib) for avr-rtems4.10
583Group:          Development/Tools
584License:        Distributable
585Version:        %{newlib_version}
586Release:        58%{?dist}
587%{?_with_noarch_subpackages:BuildArch: noarch}
588
589Requires:       rtems-4.10-newlib-common
590
591%description -n rtems-4.10-avr-rtems4.10-newlib
592Newlib C Library for avr-rtems4.10.
593
594%files -n rtems-4.10-avr-rtems4.10-newlib -f build/files.newlib
595%defattr(-,root,root)
596%dir %{_exec_prefix}
597%dir %{_exec_prefix}/avr-rtems4.10
598%{_exec_prefix}/avr-rtems4.10/include
599
600# ==============================================================
601# rtems-4.10-newlib-common
602# ==============================================================
603%package -n rtems-4.10-newlib-common
604Summary:        Base package for RTEMS newlib C Library
605Group:          Development/Tools
606Version:        %{newlib_version}
607Release:        58%{?dist}
608%{?_with_noarch_subpackages:BuildArch: noarch}
609License:        Distributable
610
611Requires(post):         /sbin/install-info
612Requires(preun):        /sbin/install-info
613
614%description -n rtems-4.10-newlib-common
615newlib files that are shared by all targets.
616
617%files -n rtems-4.10-newlib-common
618%defattr(-,root,root)
619%dir %{_prefix}
620%dir %{_prefix}/share
621
622%dir %{_infodir}
623%ghost %{_infodir}/dir
624%{_infodir}/libc.info*
625%{_infodir}/libm.info*
626
627%post -n rtems-4.10-newlib-common
628  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
629  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
630
631%preun -n rtems-4.10-newlib-common
632if [ $1 -eq 0 ]; then
633  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
634  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
635fi
636
Note: See TracBrowser for help on using the repository browser.