source: rtems/scripts-ada/gnatnewlib/gnatnewlib.spec.in @ 0610a988

4.104.114.84.95
Last change on this file since 0610a988 was 0610a988, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 26, 2000 at 8:50:23 PM

First attempt at debugging.

  • Property mode set to 100644
File size: 8.7 KB
Line 
1#
2# spec file for building gcc 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@-gnat-newlib
12Summary:      gnat, gcc, and newlib C Library for @target_alias@.
13Group:        rtems
14Release:      @Release@
15Copyright:    1999 OARCorp
16
17Provides:       rtems-base-gnat @target_alias@-gnat
18Requires:       @target_alias@-binutils
19
20Autoreqprov:    on
21Packager:       corsepiu@faw.uni-ulm.de and joel@OARcorp.com
22
23Version:        gnat@gnat_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
26Source2:        ftp://cs.nyu.edu/pub/gnat/gnat-@gnat_version@.tar.gz
27Patch0:         gcc-@gcc_version@-gnatrtems-@gcc_patch_version@.diff
28Patch1:         newlib-@newlib_version@-rtems-@newlib_patch_version@.diff
29Buildroot:      /tmp
30
31#
32# The original sources are not included in the source RPM.
33# If we included them, then the source RPMs for each target
34# would duplicate MBs of source unnecessarily.  This is
35# a duplication of over 30 MBs of source for each of
36# the more than 10 targets it is possible to build.
37#
38# You can get them yourself from the Internet and copy them to
39# your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
40# Or you can try the ftp options of rpm :-)
41#
42NoSource:      0, 1, 2
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-gnat
60Summary:      base package for rtems gnat, gcc, and newlib C Library
61Group: rtems
62
63%description -n rtems-base-gnat
64
65RTEMS is an open source operating system for embedded systems.
66
67This is the files for gnat, gcc, and newlib that are shared by all targets.
68
69%package -n @target_alias@-gnat
70Summary:      rtems gnat, gcc, and newlib C Library for @target_alias@
71Group: rtems
72Requires: @target_alias@-binutils rtems-base-gcc
73
74%description -n @target_alias@-gnat
75RTEMS is an open source operating system for embedded systems.
76
77This is gnat, gcc, and newlib C Library for @target_alias@.
78
79
80%prep
81# untar the sources inside @target_alias@-gcc-newlib
82%setup -c -n @target_alias@-gcc-newlib -a 0 -a 1 -a 2
83
84%patch0 -p0
85%patch1 -p0
86
87  # Copy the C library into gcc's source tree
88  ln -s ../newlib-@newlib_version@/newlib gcc-@gcc_version@
89  test -d build || mkdir build
90
91  cp -r ../gnat-@gnat_version@-src/src/ada gcc-@gcc_version@
92
93%patch2 -p0
94
95  touch gcc-@gcc_version@/ada/treeprs.ads
96  touch gcc-@gcc_version@/ada/a-[es]info.h
97  touch gcc-@gcc_version@/ada/nmake.ad[bs]
98
99%build
100  cd build
101  ../gcc-@gcc_version@/configure --target=@target_alias@ \
102    --with-gnu-as --with-gnu-ld --with-newlib --verbose \
103    --prefix=/opt/gnatrtems
104
105  # for now we are building all the languages
106  #  '--enable-languages=c,c++'
107
108  make all
109  make info
110
111#  Since gcc now finds the RTEMS limits.h, this should not be needed
112#  cd gcc
113#    rm -f stmp-multilib
114#    find . -name "*.a" -print | xargs -e rm -f
115#
116#    make all
117#  cd ..
118
119%install
120  cd build
121  # Bug in gcc-2.95.1: It doesn't build this installation directory
122  # If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc
123  ../gcc-@gcc_version@/mkinstalldirs \
124    $RPM_BUILD_ROOT/opt/gnatrtems/@target_alias@/bin
125
126  make prefix=$RPM_BUILD_ROOT/opt/gnatrtems install
127  cd @target_alias@/newlib
128  make prefix=$RPM_BUILD_ROOT/opt/gnatrtems install-info
129
130  # cd back to build/
131  cd ../..
132
133  # gzip info files
134  gzip -f $RPM_BUILD_ROOT/opt/gnatrtems/info/*.info 2>/dev/null
135  gzip -f $RPM_BUILD_ROOT/opt/gnatrtems/info/*.info-? 2>/dev/null
136  gzip -f $RPM_BUILD_ROOT/opt/gnatrtems/info/*.info-?? 2>/dev/null
137
138  rm -f dirs ;
139  echo "%dir /opt/gnatrtems/lib" >> dirs ;
140  echo "%dir /opt/gnatrtems/lib/gcc-lib" >> dirs ;
141  echo "%dir /opt/gnatrtems/lib/gcc-lib/@target_alias@" >> dirs ;
142
143  # Collect multilib subdirectories
144  TGTDIR="$RPM_BUILD_ROOT/opt/gnatrtems/lib/gcc-lib/@target_alias@/@gcc_version@"
145  find $TGTDIR \
146    \( -type d -a ! -path "$TGTDIR/include*" \) -print | \
147    sed -e "s,^$RPM_BUILD_ROOT,%dir ,g" >> dirs
148
149  # Collect files to go into different packages
150  cp dirs files.chill
151  cp dirs files.gcc
152  cp dirs files.g77
153  cp dirs files.objc
154  cp dirs files.gcj
155
156  f=`find $TGTDIR ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
157  for i in $f; do
158    case $i in
159    *chill*) echo "$i" >> files.chill ;;
160    *f771) ;;
161    *cc1obj) ;;
162    *libobjc*) echo "$i" >> files.objc ;;
163    *include/objc*) ;;
164    *jc1) ;;
165    *jvgenmain) ;;
166    *) echo "$i" >> files.gcc ;;
167    esac
168  done
169
170%files -n @target_alias@-gcc -f build/files.gcc
171%dir /opt/gnatrtems/info
172%doc /opt/gnatrtems/info/dir
173%doc /opt/gnatrtems/info/cpp.info*
174%doc /opt/gnatrtems/info/gcc.info*
175%doc /opt/gnatrtems/info/libc.info*
176%doc /opt/gnatrtems/info/libm.info*
177
178%dir /opt/gnatrtems/man
179%dir /opt/gnatrtems/man/man1
180%doc /opt/gnatrtems/man/man1/cccp.1
181%doc /opt/gnatrtems/man/man1/@target_alias@-gcc.1
182%doc /opt/gnatrtems/man/man1/@target_alias@-g++.1
183
184%dir /opt/gnatrtems/bin
185/opt/gnatrtems/bin/cpp@exe_ext@
186/opt/gnatrtems/bin/gcov@exe_ext@
187/opt/gnatrtems/bin/@target_alias@-c++@exe_ext@
188/opt/gnatrtems/bin/@target_alias@-g++@exe_ext@
189/opt/gnatrtems/bin/@target_alias@-gcc@exe_ext@
190/opt/gnatrtems/bin/@target_alias@-protoize@exe_ext@
191/opt/gnatrtems/bin/@target_alias@-unprotoize@exe_ext@
192
193%dir /opt/gnatrtems/lib/gcc-lib/@target_alias@/@gcc_version@/include
194
195%dir /opt/gnatrtems/include
196/opt/gnatrtems/include/g++-3
197/opt/gnatrtems/@target_alias@
198
199%post -n @target_alias@-gcc
200  if test -d $RPM_INSTALL_PREFIX/rtems/info;
201  then
202    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
203    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
204    test -n "$f" && for i in $f; do
205      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
206    done
207  fi
208
209%postun -n @target_alias@-gcc
210  if test -d $RPM_INSTALL_PREFIX/rtems/info;
211  then
212    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
213    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
214    test -n "$f" && for i in $f; do
215      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
216    done
217  fi
218
219
220%files -n @target_alias@-chill -f build/files.chill
221%dir /opt/gnatrtems/bin
222/opt/gnatrtems/bin/@target_alias@-chill@exe_ext@
223
224%dir /opt/gnatrtems/info
225%doc /opt/gnatrtems/info/dir
226%doc /opt/gnatrtems/info/chill.info*
227
228%post -n @target_alias@-chill
229  if test -d $RPM_INSTALL_PREFIX/rtems/info;
230  then
231    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
232    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
233    test -n "$f" && for i in $f; do
234      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
235    done
236  fi
237
238%postun -n @target_alias@-chill
239  if test -d $RPM_INSTALL_PREFIX/rtems/info;
240  then
241    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
242    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
243    test -n "$f" && for i in $f; do
244      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
245    done
246  fi
247
248
249%files -n @target_alias@-gcj -f build/files.gcj
250%dir /opt/gnatrtems/bin
251/opt/gnatrtems/bin/jcf-dump@exe_ext@
252/opt/gnatrtems/bin/jv-scan@exe_ext@
253/opt/gnatrtems/bin/gcjh@exe_ext@
254/opt/gnatrtems/bin/@target_alias@-gcj@exe_ext@
255
256/opt/gnatrtems/lib/gcc-lib/@target_alias@/@gcc_version@/jc1@exe_ext@
257/opt/gnatrtems/lib/gcc-lib/@target_alias@/@gcc_version@/jvgenmain@exe_ext@
258
259
260%files -n @target_alias@-g77 -f build/files.g77
261%dir /opt/gnatrtems/bin
262/opt/gnatrtems/bin/@target_alias@-g77@exe_ext@
263
264%dir /opt/gnatrtems/info
265%doc /opt/gnatrtems/info/g77.info*
266
267%dir /opt/gnatrtems/man
268%dir /opt/gnatrtems/man/man1
269%doc /opt/gnatrtems/man/man1/@target_alias@-g77.1
270
271/opt/gnatrtems/lib/gcc-lib/@target_alias@/@gcc_version@/f771@exe_ext@
272
273%post -n @target_alias@-g77
274  if test -d $RPM_INSTALL_PREFIX/rtems/info;
275  then
276    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
277    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
278    test -n "$f" && for i in $f; do
279      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
280    done
281  fi
282
283%postun -n @target_alias@-g77
284  if test -d $RPM_INSTALL_PREFIX/rtems/info;
285  then
286    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
287    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
288    test -n "$f" && for i in $f; do
289      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
290    done
291  fi
292
293
294%files -n @target_alias@-objc -f build/files.objc
295/opt/gnatrtems/lib/gcc-lib/@target_alias@/@gcc_version@/cc1obj@exe_ext@
296/opt/gnatrtems/lib/gcc-lib/@target_alias@/@gcc_version@/include/objc
Note: See TracBrowser for help on using the repository browser.