source: rtems/scripts/gccnewlib/gccnewlib.spec.in @ 6e608c43

4.104.114.84.95
Last change on this file since 6e608c43 was 6e608c43, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 20, 1999 at 8:23:16 PM

Moved stuff to rtems subdirectory and made sure the system still
functioned.

Merged Ralf's changes into gccnewlib.spec.in.

  • Property mode set to 100644
File size: 3.9 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-newlib
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:    /tmp
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# gzip info files
78  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info 2>/dev/null
79  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-? 2>/dev/null
80  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-?? 2>/dev/null
81 
82  if test -d "$RPM_BUILD_ROOT/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@"; \
83  then
84    find "$RPM_BUILD_ROOT/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@" -type d | \
85      sed -e "s,^$RPM_BUILD_ROOT,%dir ,g" > files.gcc-lib
86    find "$RPM_BUILD_ROOT/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@" -type f | \
87      sed -e "s,^$RPM_BUILD_ROOT,,g" >> files.gcc-lib
88  fi
89
90%post
91  if test -d $RPM_INSTALL_PREFIX/rtems/info;
92  then
93    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
94    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
95    test -n "$f" && for i in $f; do
96      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
97    done
98  fi
99
100%postun
101  if test -d $RPM_INSTALL_PREFIX/rtems/info;
102  then
103    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
104    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
105    test -n "$f" && for i in $f; do
106      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
107    done
108  fi
109
110%files -f files.g++ -f files.gcc-lib
111%docdir /opt/rtems/info
112%doc /opt/rtems/info/dir
113%doc /opt/rtems/info/chill.info*
114%doc /opt/rtems/info/cpp.info*
115%doc /opt/rtems/info/gcc.info*
116%doc /opt/rtems/info/g77.info*
117%doc /opt/rtems/info/libc.info*
118%doc /opt/rtems/info/libm.info*
119
120%docdir /opt/rtems/man
121%docdir /opt/rtems/man/man1
122%doc /opt/rtems/man/man1/cccp.1
123%doc /opt/rtems/man/man1/@target_alias@-gcc.1
124%doc /opt/rtems/man/man1/@target_alias@-g++.1
125%doc /opt/rtems/man/man1/@target_alias@-g77.1
126
127%dir /opt/rtems/bin
128/opt/rtems/bin/cpp
129/opt/rtems/bin/@target_alias@-c++
130/opt/rtems/bin/@target_alias@-g++
131/opt/rtems/bin/@target_alias@-gcc
132/opt/rtems/bin/@target_alias@-gcj
133
134%dir /opt/rtems/lib
135/opt/rtems/lib/libiberty*
136%dir /opt/rtems/lib/include
137
138%dir /opt/rtems/lib/gcc-lib
139%dir /opt/rtems/lib/gcc-lib/@target_alias@
140# /opt/rtems/@target_alias@/include
141# /opt/rtems/@target_alias@/sys-include
142/opt/rtems/@target_alias@/lib
143
Note: See TracBrowser for help on using the repository browser.