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