source: rtems/scripts/gccnewlib/gccnewlib.spec.in @ f4a5803e

4.104.114.84.95
Last change on this file since f4a5803e was f4a5803e, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 21, 1999 at 5:21:05 PM

Now can specify rpm_build_root via setup.

Changed package name so generated RPM would have a nicer name.

  • Property mode set to 100644
File size: 4.8 KB
Line 
1#
2# spec file for package 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
12Release:      @Release@
13Copyright:    1999 OARCorp
14Group:        unsorted
15Provides:     @target_alias@-gcc-newlib
16Requires:     @target_alias@-binutils
17
18Autoreqprov:  on
19Packager:     corsepiu@faw.uni-ulm.de and joel@OARcorp.com
20
21Version:      @gcc_version@newlib@newlib_version@
22Summary:      rtems gcc and newlib C Library for target @target_alias@
23Source0:        gcc-@gcc_version@.tar.gz
24Source1:        newlib-@newlib_version@.tar.gz
25Patch0:         gcc-@gcc_version@-rtems-@gcc_patch_version@.diff
26Patch1:         newlib-@newlib_version@-rtems-@newlib_patch_version@.diff
27
28Buildroot:      @rpm_build_root@
29# Patch:
30%description
31RTEMS is an open source operating system for embedded systems.
32
33This is gcc and newlib C Library for @target_alias@.
34
35Authors:
36--------
37    Joel Sherrill (joel@oarcorp.com)
38    ...
39
40%prep
41echo RPM_BUILD_ROOT=${RPM_BUILD_ROOT}
42# untar the sources inside @target_alias@-gcc-newlib -@Version@
43%setup -c -n @target_alias@-gcc-newlib -a 0 -a 1
44
45%patch0 -p0
46%patch1 -p0
47
48  # Now link the C library into the source tree
49  ln -s ../newlib-1.8.2/newlib gcc-@gcc_version@
50
51%build
52  test -d build || mkdir build
53  cd build
54  ../gcc-@gcc_version@/configure --target=@target_alias@ \
55    --with-gnu-as --with-gnu-ld --with-newlib --verbose \
56    --prefix=/opt/rtems
57
58  # for now we are building all the languages
59  #  '--enable-languages=c c++'
60
61  make all
62  make info
63
64#  Since gcc now finds the RTEMS limits.h, this should not be needed
65#  cd gcc
66#    rm -f stmp-multilib
67#    find . -name "*.a" -print | xargs -e rm -f
68#
69#    make all
70#  cd ..
71
72%install
73  cd build
74  make prefix=$RPM_BUILD_ROOT/opt/rtems install
75  cd @target_alias@/newlib
76  make prefix=$RPM_BUILD_ROOT/opt/rtems install-info
77
78  # cd back to build/
79  cd ../..
80
81  # gzip info files
82  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info 2>/dev/null
83  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-? 2>/dev/null
84  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-?? 2>/dev/null
85
86  rm -f files
87
88  # collect c++ headers
89  if test -d $RPM_BUILD_ROOT/opt/rtems/include/g++-3; then
90    find $RPM_BUILD_ROOT/opt/rtems/include/g++-3 \
91      -type d | \
92      sed -e "s,^$RPM_BUILD_ROOT,%dir ,g" >> files
93    find $RPM_BUILD_ROOT/opt/rtems/include/g++-3 \
94      \( -type f -o -type l \) | \
95      sed -e "s,^$RPM_BUILD_ROOT,,g" >> files
96  fi
97
98  # collect target gcc-lib
99  if test -d "$RPM_BUILD_ROOT/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@"; \
100  then
101    find "$RPM_BUILD_ROOT/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@" \
102      -type d | sed -e "s,^$RPM_BUILD_ROOT,%dir ,g" >> files
103    find "$RPM_BUILD_ROOT/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@" \
104      \( -type f -o -type l \) \
105      | sed -e "s,^$RPM_BUILD_ROOT,,g" >> files
106  fi
107
108  # collect target files
109  if test -d "$RPM_BUILD_ROOT/opt/rtems/@target_alias@"; \
110  then
111    find "$RPM_BUILD_ROOT/opt/rtems/@target_alias@" \
112      -type d | \
113      sed -e "s,^$RPM_BUILD_ROOT,%dir ,g" >> files
114    find "$RPM_BUILD_ROOT/opt/rtems/@target_alias@" \
115      \( -type f -o -type l \) | \
116      sed -e "s,^$RPM_BUILD_ROOT,,g" >> files
117  fi
118
119%post
120  if test -d $RPM_INSTALL_PREFIX/rtems/info;
121  then
122    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
123    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
124    test -n "$f" && for i in $f; do
125      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
126    done
127  fi
128
129%postun
130  if test -d $RPM_INSTALL_PREFIX/rtems/info;
131  then
132    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
133    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
134    test -n "$f" && for i in $f; do
135      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
136    done
137  fi
138
139%files -f build/files
140%docdir /opt/rtems/info
141%doc /opt/rtems/info/dir
142%doc /opt/rtems/info/chill.info*
143%doc /opt/rtems/info/cpp.info*
144%doc /opt/rtems/info/gcc.info*
145%doc /opt/rtems/info/g77.info*
146%doc /opt/rtems/info/libc.info*
147%doc /opt/rtems/info/libm.info*
148
149%docdir /opt/rtems/man
150%docdir /opt/rtems/man/man1
151%doc /opt/rtems/man/man1/cccp.1
152%doc /opt/rtems/man/man1/@target_alias@-gcc.1
153%doc /opt/rtems/man/man1/@target_alias@-g++.1
154%doc /opt/rtems/man/man1/@target_alias@-g77.1
155
156%dir /opt/rtems/bin
157/opt/rtems/bin/cpp
158/opt/rtems/bin/jv-scan
159/opt/rtems/bin/gcov
160/opt/rtems/bin/jcf-dump
161/opt/rtems/bin/gcjh
162/opt/rtems/bin/@target_alias@-c++
163/opt/rtems/bin/@target_alias@-g++
164/opt/rtems/bin/@target_alias@-gcc
165/opt/rtems/bin/@target_alias@-gcj
166/opt/rtems/bin/@target_alias@-chill
167/opt/rtems/bin/@target_alias@-g77
168/opt/rtems/bin/@target_alias@-protoize
169/opt/rtems/bin/@target_alias@-unprotoize
170
171%dir /opt/rtems/lib
172/opt/rtems/lib/libiberty*
173%dir /opt/rtems/include
174
175%dir /opt/rtems/lib/gcc-lib
176%dir /opt/rtems/lib/gcc-lib/@target_alias@
177
Note: See TracBrowser for help on using the repository browser.