source: rtems/scripts/gccnewlib/gccnewlib_c_only.spec.in @ 92ba0476

Last change on this file since 92ba0476 was 8812023, checked in by Joel Sherrill <joel.sherrill@…>, on 04/18/00 at 13:10:39

Patches rtems-rc-4.5.0-16-cvs.diff and rtems-rc-4.5.0-17-cvs.diff
from Ralf Corsepius <corsepiu@…> that address the following:

  • NoSource?: 0, 1 in rpm-specs does not work anymore under SuSE-6.4 (rpm-3.0.4), putting each NoSource?: onto a separate line however seems to work. Unfortunately, I don't know the actual cause for this, esp. if SuSE broke it or if rpm-specs specification has changed (i.e. Redhat broke it up).
  • Add *.spec to several .cvsignores (Prevents cvs from complaining about <target>*.spec within the source-tree).
  • Property mode set to 100644
File size: 5.7 KB
Line 
1#
2# spec file for building gcc (C Only) for rtems
3#
4# Copyright  (c)  1999  OARCorp, Huntsville, AL
5#
6# please send bugfixes or comments to joel@OARcorp.com
7#
8
9Vendor:       OAR Corporation
10Distribution: Linux
11Name:         @target_alias@-gcc-newlib
12Summary:      gcc and newlib C Library for @target_alias@.
13Group:        rtems
14Release:      @Release@
15Copyright:    1999 OARCorp
16
17Provides:       rtems-base-gcc @target_alias@-gcc
18Requires:       @target_alias@-binutils
19
20Autoreqprov:    on
21Packager:       corsepiu@faw.uni-ulm.de and joel@OARcorp.com
22
23Version:        gcc@gcc_version@newlib@newlib_version@
24Source0:        ftp://ftp.gnu.org/pub/gnu/gcc/gcc-@gcc_version@.tar.gz
25Source1:        ftp://sourceware.cygnus/com/pub/newlib/newlib-@newlib_version@.tar.gz
26Patch0:         gcc-@gcc_version@-rtems-@gcc_patch_version@.diff
27Patch1:         newlib-@newlib_version@-rtems-@newlib_patch_version@.diff
28Buildroot:      /tmp
29
30#
31# The original sources are not included in the source RPM.
32# If we included them, then the source RPMs for each target
33# would duplicate MBs of source unnecessarily.  This is
34# a duplication of over 30 MBs of source for each of
35# the more than 10 targets it is possible to build.
36#
37# You can get them yourself from the Internet and copy them to
38# your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
39# Or you can try the ftp options of rpm :-)
40#
41NoSource:       0
42NoSource:       1
43
44%description
45RTEMS is an open source operating system for embedded systems.
46
47This is gcc's and newlib C Library's sources with patches for RTEMS.
48
49 The original sources are not included in the source RPM.
50 If we included them, then the source RPMs for each target
51 would duplicate MBs of source unnecessarily.  This is
52 a duplication of over 30 MBs of source for each of
53 the more than 10 targets it is possible to build.
54
55 You can get them yourself from the Internet and copy them to
56 your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
57 Or you can try the ftp options of rpm :-)
58
59%package -n rtems-base-gcc
60Summary:      base package for rtems gcc and newlib C Library
61Group: rtems
62
63%description -n rtems-base-gcc
64
65RTEMS is an open source operating system for embedded systems.
66
67This is the files for gcc and newlib that are shared by all targets.
68
69%package -n @target_alias@-gcc
70Summary:      rtems gcc and newlib C Library for @target_alias@
71Group: rtems
72Requires: @target_alias@-binutils rtems-base-gcc
73
74%description -n @target_alias@-gcc
75RTEMS is an open source operating system for embedded systems.
76
77This is gcc and newlib C Library for @target_alias@.
78
79%prep
80# untar the sources inside @target_alias@-gcc-newlib
81%setup -c -n @target_alias@-gcc-newlib -a 0 -a 1
82
83%patch0 -p0
84%patch1 -p0
85
86  # Copy the C library into gcc's source tree
87  ln -s ../newlib-@newlib_version@/newlib gcc-@gcc_version@
88  test -d build || mkdir build
89
90%build
91  cd build
92  ../gcc-@gcc_version@/configure --target=@target_alias@ \
93    --with-gnu-as --with-gnu-ld --with-newlib --verbose \
94    --prefix=/opt/rtems '--enable-languages=c,c++'
95
96  make all
97  make info
98
99%install
100  cd build
101  # Bug in gcc-2.95.1: It doesn't build this installation directory
102  # If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc
103  ../gcc-@gcc_version@/mkinstalldirs \
104    $RPM_BUILD_ROOT/opt/rtems/@target_alias@/bin
105
106  make prefix=$RPM_BUILD_ROOT/opt/rtems install
107  cd @target_alias@/newlib
108  make prefix=$RPM_BUILD_ROOT/opt/rtems install-info
109
110  # cd back to build/
111  cd ../..
112
113  # gzip info files
114  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info 2>/dev/null
115  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-? 2>/dev/null
116  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-?? 2>/dev/null
117
118  rm -f dirs ;
119  echo "%dir /opt/rtems/lib" >> dirs ;
120  echo "%dir /opt/rtems/lib/gcc-lib" >> dirs ;
121  echo "%dir /opt/rtems/lib/gcc-lib/@target_alias@" >> dirs ;
122
123  # Collect multilib subdirectories
124  TGTDIR="$RPM_BUILD_ROOT/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@"
125  find $TGTDIR \
126    \( -type d -a ! -path "$TGTDIR/include*" \) -print | \
127    sed -e "s,^$RPM_BUILD_ROOT,%dir ,g" >> dirs
128
129  # Collect files to go into different packages
130  cp dirs files.gcc
131
132  f=`find $TGTDIR ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
133  for i in $f; do
134    case $i in
135    # *chill*) echo "$i" >> files.chill ;;
136    # *f771) ;;
137    # *cc1obj) ;;
138    # *libobjc*) echo "$i" >> files.objc ;;
139    # *include/objc*) ;;
140    # *jc1) ;;
141    # *jvgenmain) ;;
142    *) echo "$i" >> files.gcc ;;
143    esac
144  done
145
146
147
148%files -n rtems-base-gcc
149%dir /opt/rtems/info
150# %doc /opt/rtems/info/dir
151%doc /opt/rtems/info/cpp.info*
152%doc /opt/rtems/info/gcc.info*
153%doc /opt/rtems/info/libc.info*
154%doc /opt/rtems/info/libm.info*
155
156%dir /opt/rtems/bin
157/opt/rtems/bin/cpp@exe_ext@
158/opt/rtems/bin/gcov@exe_ext@
159
160%dir /opt/rtems/man
161%dir /opt/rtems/man/man1
162%doc /opt/rtems/man/man1/cccp.1
163
164%dir /opt/rtems/include
165/opt/rtems/include/g++-3
166
167%files -n @target_alias@-gcc -f build/files.gcc
168
169%doc /opt/rtems/man/man1/@target_alias@-gcc.1
170%doc /opt/rtems/man/man1/@target_alias@-g++.1
171
172/opt/rtems/bin/@target_alias@-c++@exe_ext@
173/opt/rtems/bin/@target_alias@-g++@exe_ext@
174/opt/rtems/bin/@target_alias@-gcc@exe_ext@
175/opt/rtems/bin/@target_alias@-protoize@exe_ext@
176/opt/rtems/bin/@target_alias@-unprotoize@exe_ext@
177
178%dir /opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/include
179
180/opt/rtems/@target_alias@
181
182%post
183  if test -d $RPM_INSTALL_PREFIX/rtems/info;
184  then
185    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
186    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
187    test -n "$f" && for i in $f; do
188      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
189    done
190  fi
191
192%postun
193  if test -d $RPM_INSTALL_PREFIX/rtems/info;
194  then
195    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
196    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
197    test -n "$f" && for i in $f; do
198      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
199    done
200  fi
201
202
Note: See TracBrowser for help on using the repository browser.