1 | |
---|
2 | %define binutils_version @binutils_version@ |
---|
3 | %define binutils_target @target_alias@ |
---|
4 | |
---|
5 | Name: %{rpmprefix}%{binutils_target}-binutils |
---|
6 | Summary: binutils for target %{binutils_target} |
---|
7 | Group: %{rpmgroup} |
---|
8 | Release: @Release@ |
---|
9 | License: GPL/LGPL |
---|
10 | |
---|
11 | Autoreqprov: on |
---|
12 | Packager: ralf_corsepius@rtems.org and joel@OARcorp.com |
---|
13 | Prefix: %{_prefix} |
---|
14 | BuildPreReq: /sbin/install-info |
---|
15 | BuildPreReq: texinfo >= 4.2 |
---|
16 | BuildPreReq: flex |
---|
17 | |
---|
18 | Version: %{binutils_version} |
---|
19 | Source0: ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{binutils_version}.tar.bz2 |
---|
20 | @PATCH1@ |
---|
21 | |
---|
22 | # |
---|
23 | # The original sources are not included in the source RPM. |
---|
24 | # If we included them, then the source RPMs for each target |
---|
25 | # would duplicate MBs of source unnecessarily. This is |
---|
26 | # a duplication of over 30 MBs of source for each of |
---|
27 | # the more than 10 targets it is possible to build. |
---|
28 | # |
---|
29 | # You can get them yourself from the Internet and copy them to |
---|
30 | # your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR). |
---|
31 | # Or you can try the ftp options of rpm :-) |
---|
32 | # |
---|
33 | NoSource: 0 |
---|
34 | |
---|
35 | # %description |
---|
36 | # |
---|
37 | # RTEMS is an open source operating system for embedded systems. |
---|
38 | # |
---|
39 | # This is binutils sources with patches for RTEMS. |
---|
40 | |
---|
41 | %prep |
---|
42 | %setup -c -n %{name}-%{version} |
---|
43 | @PATCH2@ |
---|
44 | test -d build || mkdir build |
---|
45 | |
---|
46 | %build |
---|
47 | cd build |
---|
48 | ../binutils-%{binutils_version}/configure \ |
---|
49 | --build=%_build --host=%_host \ |
---|
50 | --target=%{binutils_target} \ |
---|
51 | --verbose --disable-nls \ |
---|
52 | --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} |
---|
53 | |
---|
54 | make all |
---|
55 | make info |
---|
56 | |
---|
57 | |
---|
58 | %install |
---|
59 | cd build |
---|
60 | make prefix=$RPM_BUILD_ROOT%{_prefix} \ |
---|
61 | mandir=$RPM_BUILD_ROOT%{_mandir} \ |
---|
62 | infodir=$RPM_BUILD_ROOT%{_infodir} \ |
---|
63 | install |
---|
64 | make prefix=$RPM_BUILD_ROOT%{_prefix} \ |
---|
65 | mandir=$RPM_BUILD_ROOT%{_mandir} \ |
---|
66 | infodir=$RPM_BUILD_ROOT%{_infodir} \ |
---|
67 | install-info |
---|
68 | # A bug in binutils: binutils does not install share/locale |
---|
69 | # however it uses it |
---|
70 | ../binutils-%{binutils_version}/mkinstalldirs \ |
---|
71 | $RPM_BUILD_ROOT%{_prefix}/share/locale |
---|
72 | |
---|
73 | # gzip info files |
---|
74 | # gzip info files |
---|
75 | ls $RPM_BUILD_ROOT%{_infodir}/*.info \ |
---|
76 | $RPM_BUILD_ROOT%{_infodir}/*.info-? \ |
---|
77 | $RPM_BUILD_ROOT%{_infodir}/*.info-?? 2>/dev/null \ |
---|
78 | | while read a; do \ |
---|
79 | gzip -9qf $a 2>/dev/null; \ |
---|
80 | done |
---|
81 | |
---|
82 | # We assume that info/dir exists when building the RPMs |
---|
83 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
---|
84 | f=`find $RPM_BUILD_ROOT%{_prefix}/info -name '*.info.gz'` |
---|
85 | test x"$f" != x"" && for i in $f; do |
---|
86 | /sbin/install-info $i $RPM_BUILD_ROOT%{_infodir}/dir |
---|
87 | done |
---|
88 | |
---|
89 | # gzip man pages |
---|
90 | gzip -9qf $RPM_BUILD_ROOT%{_mandir}/man?/*.? 2>/dev/null |
---|
91 | |
---|
92 | # We don't ship host files |
---|
93 | rm -f ${RPM_BUILD_ROOT}%{_prefix}/lib/libiberty* |
---|