source: rtems/scripts/gccnewlib/gccnewlib_c_only.spec.in @ 42ec72d

4.104.114.84.9
Last change on this file since 42ec72d was 42ec72d, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 27, 2000 at 11:49:44 PM

Removed gnat and made final cleanup.

  • 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, 1
42
43%description
44RTEMS is an open source operating system for embedded systems.
45
46This is gcc's and newlib C Library's sources with patches for RTEMS.
47
48 The original sources are not included in the source RPM.
49 If we included them, then the source RPMs for each target
50 would duplicate MBs of source unnecessarily.  This is
51 a duplication of over 30 MBs of source for each of
52 the more than 10 targets it is possible to build.
53
54 You can get them yourself from the Internet and copy them to
55 your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
56 Or you can try the ftp options of rpm :-)
57
58%package -n rtems-base-gcc
59Summary:      base package for rtems gcc and newlib C Library
60Group: rtems
61
62%description -n rtems-base-gcc
63
64RTEMS is an open source operating system for embedded systems.
65
66This is the files for gcc and newlib that are shared by all targets.
67
68%package -n @target_alias@-gcc
69Summary:      rtems gcc and newlib C Library for @target_alias@
70Group: rtems
71Requires: @target_alias@-binutils rtems-base-gcc
72
73%description -n @target_alias@-gcc
74RTEMS is an open source operating system for embedded systems.
75
76This is gcc and newlib C Library for @target_alias@.
77
78%prep
79# untar the sources inside @target_alias@-gcc-newlib
80%setup -c -n @target_alias@-gcc-newlib -a 0 -a 1
81
82%patch0 -p0
83%patch1 -p0
84
85  # Copy the C library into gcc's source tree
86  ln -s ../newlib-@newlib_version@/newlib gcc-@gcc_version@
87  test -d build || mkdir build
88
89%build
90  cd build
91  ../gcc-@gcc_version@/configure --target=@target_alias@ \
92    --with-gnu-as --with-gnu-ld --with-newlib --verbose \
93    --prefix=/opt/rtems '--enable-languages=c,c++'
94
95  make all
96  make info
97
98%install
99  cd build
100  # Bug in gcc-2.95.1: It doesn't build this installation directory
101  # If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc
102  ../gcc-@gcc_version@/mkinstalldirs \
103    $RPM_BUILD_ROOT/opt/rtems/@target_alias@/bin
104
105  make prefix=$RPM_BUILD_ROOT/opt/rtems install
106  cd @target_alias@/newlib
107  make prefix=$RPM_BUILD_ROOT/opt/rtems install-info
108
109  # cd back to build/
110  cd ../..
111
112  # gzip info files
113  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info 2>/dev/null
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
117  rm -f dirs ;
118  echo "%dir /opt/rtems/lib" >> dirs ;
119  echo "%dir /opt/rtems/lib/gcc-lib" >> dirs ;
120  echo "%dir /opt/rtems/lib/gcc-lib/@target_alias@" >> dirs ;
121
122  # Collect multilib subdirectories
123  TGTDIR="$RPM_BUILD_ROOT/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@"
124  find $TGTDIR \
125    \( -type d -a ! -path "$TGTDIR/include*" \) -print | \
126    sed -e "s,^$RPM_BUILD_ROOT,%dir ,g" >> dirs
127
128  # Collect files to go into different packages
129  cp dirs files.gcc
130
131  f=`find $TGTDIR ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
132  for i in $f; do
133    case $i in
134    # *chill*) echo "$i" >> files.chill ;;
135    # *f771) ;;
136    # *cc1obj) ;;
137    # *libobjc*) echo "$i" >> files.objc ;;
138    # *include/objc*) ;;
139    # *jc1) ;;
140    # *jvgenmain) ;;
141    *) echo "$i" >> files.gcc ;;
142    esac
143  done
144
145
146
147%files -n rtems-base-gcc
148%dir /opt/rtems/info
149# %doc /opt/rtems/info/dir
150%doc /opt/rtems/info/cpp.info*
151%doc /opt/rtems/info/gcc.info*
152%doc /opt/rtems/info/libc.info*
153%doc /opt/rtems/info/libm.info*
154
155%dir /opt/rtems/bin
156/opt/rtems/bin/cpp@exe_ext@
157/opt/rtems/bin/gcov@exe_ext@
158
159%dir /opt/rtems/man
160%dir /opt/rtems/man/man1
161%doc /opt/rtems/man/man1/cccp.1
162
163%dir /opt/rtems/include
164/opt/rtems/include/g++-3
165
166%files -n @target_alias@-gcc -f build/files.gcc
167
168%doc /opt/rtems/man/man1/@target_alias@-gcc.1
169%doc /opt/rtems/man/man1/@target_alias@-g++.1
170
171/opt/rtems/bin/@target_alias@-c++@exe_ext@
172/opt/rtems/bin/@target_alias@-g++@exe_ext@
173/opt/rtems/bin/@target_alias@-gcc@exe_ext@
174/opt/rtems/bin/@target_alias@-protoize@exe_ext@
175/opt/rtems/bin/@target_alias@-unprotoize@exe_ext@
176
177%dir /opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/include
178
179/opt/rtems/@target_alias@
180
181%post
182  if test -d $RPM_INSTALL_PREFIX/rtems/info;
183  then
184    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
185    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
186    test -n "$f" && for i in $f; do
187      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
188    done
189  fi
190
191%postun
192  if test -d $RPM_INSTALL_PREFIX/rtems/info;
193  then
194    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
195    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
196    test -n "$f" && for i in $f; do
197      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
198    done
199  fi
200
201
Note: See TracBrowser for help on using the repository browser.