source: rtems/contrib/crossrpms/rtems4.9/powerpc/rtems-4.9-powerpc-rtems4.9-gcc.spec @ 9852009

4.9
Last change on this file since 9852009 was 9852009, checked in by Ralf Corsepius <ralf.corsepius@…>, on Sep 10, 2008 at 7:43:40 PM

Regenerate.

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