1 |
30 |
unneback |
#
|
2 |
|
|
# spec file for binutils package targetting rtems
|
3 |
|
|
#
|
4 |
|
|
# Copyright (c) 1999 OARCorp, Huntsville, AL
|
5 |
|
|
#
|
6 |
|
|
# please send bugfixes or comments to joel@OARcorp.com
|
7 |
|
|
#
|
8 |
|
|
|
9 |
|
|
Vendor: OAR Corporation
|
10 |
|
|
Distribution: Linux
|
11 |
|
|
Name: @target_alias@-gnat-binutils-collection
|
12 |
|
|
Summary: binutils for target @target_alias@
|
13 |
|
|
Group: gnatrtems
|
14 |
|
|
Release: @Release@
|
15 |
|
|
License: GPL/LGPL
|
16 |
|
|
|
17 |
|
|
Provides: rtems-base-gnat-binutils @target_alias@-gnat-binutils
|
18 |
|
|
|
19 |
|
|
Autoreqprov: on
|
20 |
|
|
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
|
21 |
|
|
Prefix: /opt
|
22 |
|
|
|
23 |
|
|
Version: @binutils_version@
|
24 |
|
|
Source0: ftp://ftp.gnu.org/pub/gnu/binutils/binutils-@binutils_version@.tar.gz
|
25 |
|
|
Patch0: binutils-@binutils_version@-rtems-@binutils_patch_version@.diff
|
26 |
|
|
#
|
27 |
|
|
# The original sources are not included in the source RPM.
|
28 |
|
|
# If we included them, then the source RPMs for each target
|
29 |
|
|
# would duplicate MBs of source unnecessarily. This is
|
30 |
|
|
# a duplication of over 30 MBs of source for each of
|
31 |
|
|
# the more than 10 targets it is possible to build.
|
32 |
|
|
#
|
33 |
|
|
# You can get them yourself from the Internet and copy them to
|
34 |
|
|
# your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
|
35 |
|
|
# Or you can try the ftp options of rpm :-)
|
36 |
|
|
#
|
37 |
|
|
NoSource: 0
|
38 |
|
|
|
39 |
|
|
%description
|
40 |
|
|
|
41 |
|
|
RTEMS is an open source operating system for embedded systems.
|
42 |
|
|
|
43 |
|
|
This is binutils sources with patches for RTEMS.
|
44 |
|
|
|
45 |
|
|
%package -n rtems-base-gnat-binutils
|
46 |
|
|
Summary: base package for rtems binutils
|
47 |
|
|
Group: rtems
|
48 |
|
|
|
49 |
|
|
%description -n rtems-base-gnat-binutils
|
50 |
|
|
|
51 |
|
|
RTEMS is an open source operating system for embedded systems.
|
52 |
|
|
|
53 |
|
|
This is the base for binutils regardless of target CPU.
|
54 |
|
|
|
55 |
|
|
%package -n @target_alias@-gnat-binutils
|
56 |
|
|
Summary: rtems binutils for @target_alias@
|
57 |
|
|
Group: rtems
|
58 |
|
|
Requires: rtems-base-gnat-binutils
|
59 |
|
|
|
60 |
|
|
%description -n @target_alias@-gnat-binutils
|
61 |
|
|
|
62 |
|
|
RTEMS is an open source operating system for embedded systems.
|
63 |
|
|
|
64 |
|
|
This is the GNU binutils for RTEMS targetting @target_alias@.
|
65 |
|
|
|
66 |
|
|
Authors:
|
67 |
|
|
--------
|
68 |
|
|
Joel Sherrill (joel@oarcorp.com)
|
69 |
|
|
...
|
70 |
|
|
|
71 |
|
|
%prep
|
72 |
|
|
# untar the sources inside @target_alias@-gnat-binutils
|
73 |
|
|
%setup -c -n @target_alias@-gnat-binutils -a 0
|
74 |
|
|
|
75 |
|
|
%patch0 -p0
|
76 |
|
|
test -d build || mkdir build
|
77 |
|
|
|
78 |
|
|
%build
|
79 |
|
|
cd build
|
80 |
|
|
../binutils-@binutils_version@/configure --target=@target_alias@ \
|
81 |
|
|
--verbose --prefix=/opt/gnatrtems
|
82 |
|
|
|
83 |
|
|
make all
|
84 |
|
|
make info
|
85 |
|
|
|
86 |
|
|
%install
|
87 |
|
|
cd build
|
88 |
|
|
make prefix=$RPM_BUILD_ROOT/opt/gnatrtems install
|
89 |
|
|
make prefix=$RPM_BUILD_ROOT/opt/gnatrtems install-info
|
90 |
|
|
# A bug in binutils: binutils does not install share/locale
|
91 |
|
|
# however it uses it
|
92 |
|
|
../binutils-@binutils_version@/mkinstalldirs \
|
93 |
|
|
$RPM_BUILD_ROOT/opt/gnatrtems/share/locale
|
94 |
|
|
|
95 |
|
|
# gzip info files
|
96 |
|
|
gzip -f $RPM_BUILD_ROOT/opt/gnatrtems/info/*.info 2>/dev/null
|
97 |
|
|
gzip -f $RPM_BUILD_ROOT/opt/gnatrtems/info/*.info-? 2>/dev/null
|
98 |
|
|
|
99 |
|
|
if test -f $RPM_BUILD_ROOT/opt/gnatrtems/info/configure.info.gz;
|
100 |
|
|
then
|
101 |
|
|
# These common files are only present in binutils >= 2.9.5
|
102 |
|
|
find $RPM_BUILD_ROOT/opt/gnatrtems/info -name 'configure.*' | \
|
103 |
|
|
sed -e "s,^$RPM_BUILD_ROOT,,g" > ../files
|
104 |
|
|
else
|
105 |
|
|
touch ../files
|
106 |
|
|
fi
|
107 |
|
|
# These target specific files are only present in binutils >= 2.9.5
|
108 |
|
|
if test -f /opt/gnatrtems/bin/@target_alias@-readelf@exe_ext@;
|
109 |
|
|
then
|
110 |
|
|
echo /opt/gnatrtems/bin/@target_alias@-readelf@exe_ext@ > ../files.target
|
111 |
|
|
else
|
112 |
|
|
touch ../files.target
|
113 |
|
|
fi
|
114 |
|
|
|
115 |
|
|
|
116 |
|
|
|
117 |
|
|
%post
|
118 |
|
|
if test -d $RPM_INSTALL_PREFIX/rtems/info;
|
119 |
|
|
then
|
120 |
|
|
rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
|
121 |
|
|
f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
|
122 |
|
|
test x"$f" != x"" && for i in $f; do
|
123 |
|
|
install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
|
124 |
|
|
done
|
125 |
|
|
fi
|
126 |
|
|
|
127 |
|
|
%postun
|
128 |
|
|
if test -d $RPM_INSTALL_PREFIX/rtems/info;
|
129 |
|
|
then
|
130 |
|
|
rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
|
131 |
|
|
f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
|
132 |
|
|
test x"$f" != x"" && for i in $f; do
|
133 |
|
|
install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
|
134 |
|
|
done
|
135 |
|
|
fi
|
136 |
|
|
|
137 |
|
|
%files -n rtems-base-gnat-binutils -f files
|
138 |
|
|
%dir /opt/gnatrtems/info
|
139 |
|
|
%doc /opt/gnatrtems/info/dir
|
140 |
|
|
%doc /opt/gnatrtems/info/as.info.gz
|
141 |
|
|
%doc /opt/gnatrtems/info/as.info-?.gz
|
142 |
|
|
%doc /opt/gnatrtems/info/bfd.info.gz
|
143 |
|
|
%doc /opt/gnatrtems/info/bfd.info-?.gz
|
144 |
|
|
%doc /opt/gnatrtems/info/binutils.info.gz
|
145 |
|
|
%doc /opt/gnatrtems/info/binutils.info-?.gz
|
146 |
|
|
%doc /opt/gnatrtems/info/ld.info.gz
|
147 |
|
|
%doc /opt/gnatrtems/info/ld.info-?.gz
|
148 |
|
|
%doc /opt/gnatrtems/info/gasp.info.gz
|
149 |
|
|
%doc /opt/gnatrtems/info/standards.info.gz
|
150 |
|
|
|
151 |
|
|
%dir /opt/gnatrtems/man
|
152 |
|
|
%dir /opt/gnatrtems/man/man1
|
153 |
|
|
|
154 |
|
|
%dir /opt/gnatrtems/include
|
155 |
|
|
/opt/gnatrtems/include/bfd.h
|
156 |
|
|
/opt/gnatrtems/include/ansidecl.h
|
157 |
|
|
/opt/gnatrtems/include/bfdlink.h
|
158 |
|
|
|
159 |
|
|
%dir /opt/gnatrtems/lib
|
160 |
|
|
/opt/gnatrtems/lib/libbfd*
|
161 |
|
|
/opt/gnatrtems/lib/libiberty*
|
162 |
|
|
/opt/gnatrtems/lib/libopcodes*
|
163 |
|
|
|
164 |
|
|
%dir /opt/gnatrtems/share
|
165 |
|
|
%dir /opt/gnatrtems/share/locale
|
166 |
|
|
|
167 |
|
|
%files -n @target_alias@-gnat-binutils -f files.target
|
168 |
|
|
%doc /opt/gnatrtems/man/man1/@target_alias@-*.1
|
169 |
|
|
|
170 |
|
|
%dir /opt/gnatrtems/bin
|
171 |
|
|
/opt/gnatrtems/bin/@target_alias@-addr2line@exe_ext@
|
172 |
|
|
/opt/gnatrtems/bin/@target_alias@-ar@exe_ext@
|
173 |
|
|
/opt/gnatrtems/bin/@target_alias@-as@exe_ext@
|
174 |
|
|
/opt/gnatrtems/bin/@target_alias@-c++filt@exe_ext@
|
175 |
|
|
/opt/gnatrtems/bin/@target_alias@-gasp@exe_ext@
|
176 |
|
|
/opt/gnatrtems/bin/@target_alias@-ld@exe_ext@
|
177 |
|
|
/opt/gnatrtems/bin/@target_alias@-nm@exe_ext@
|
178 |
|
|
/opt/gnatrtems/bin/@target_alias@-objcopy@exe_ext@
|
179 |
|
|
/opt/gnatrtems/bin/@target_alias@-objdump@exe_ext@
|
180 |
|
|
/opt/gnatrtems/bin/@target_alias@-ranlib@exe_ext@
|
181 |
|
|
# readelf is not in older binutils so get it from file list
|
182 |
|
|
# /opt/gnatrtems/bin/@target_alias@-readelf@exe_ext@
|
183 |
|
|
/opt/gnatrtems/bin/@target_alias@-size@exe_ext@
|
184 |
|
|
/opt/gnatrtems/bin/@target_alias@-strings@exe_ext@
|
185 |
|
|
/opt/gnatrtems/bin/@target_alias@-strip@exe_ext@
|
186 |
|
|
|
187 |
|
|
%dir /opt/gnatrtems/@target_alias@
|
188 |
|
|
%dir /opt/gnatrtems/@target_alias@/bin
|
189 |
|
|
/opt/gnatrtems/@target_alias@/bin/ar@exe_ext@
|
190 |
|
|
/opt/gnatrtems/@target_alias@/bin/as@exe_ext@
|
191 |
|
|
/opt/gnatrtems/@target_alias@/bin/ld@exe_ext@
|
192 |
|
|
/opt/gnatrtems/@target_alias@/bin/nm@exe_ext@
|
193 |
|
|
/opt/gnatrtems/@target_alias@/bin/ranlib@exe_ext@
|
194 |
|
|
/opt/gnatrtems/@target_alias@/bin/strip@exe_ext@
|
195 |
|
|
|
196 |
|
|
%dir /opt/gnatrtems/@target_alias@/lib
|
197 |
|
|
/opt/gnatrtems/@target_alias@/lib/ldscripts
|