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