OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [scripts/] [binutils/] [binutils.add] - Blame information for rev 1778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
#
2
# spec file for binutils package targetting rtems
3
#
4
# Copyright  (c)  1999,2000,2002 OARCorp, Huntsville, AL
5
#
6
# please send bugfixes or comments to joel@OARcorp.com
7
#
8
 
9
%define _prefix @prefix@
10
 
11
Vendor:       OAR Corporation
12
Distribution: Linux
13
Name:         @target_alias@-binutils-collection
14
Summary:      binutils for target @target_alias@
15
Group:        rtems
16
Release:      @Release@
17
License:      GPL/LGPL
18
 
19
Autoreqprov:    off
20
Packager:       corsepiu@faw.uni-ulm.de and joel@OARcorp.com
21
Prefix:         %{_prefix}
22
BuildRoot:      %{_tmppath}/@target_alias@-binutils
23
 
24
Version:        @binutils_version@
25
Source0:        ftp://ftp.gnu.org/pub/gnu/binutils/binutils-@binutils_version@.tar.bz2
26
@PATCH1@
27
 
28
#
29
# The original sources are not included in the source RPM.
30
# If we included them, then the source RPMs for each target
31
# would duplicate MBs of source unnecessarily.  This is
32
# a duplication of over 30 MBs of source for each of
33
# the more than 10 targets it is possible to build.
34
#
35
# You can get them yourself from the Internet and copy them to
36
# your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
37
# Or you can try the ftp options of rpm :-)
38
#
39
NoSource:      0
40
 
41
%description
42
 
43
RTEMS is an open source operating system for embedded systems.
44
 
45
This is binutils sources with patches for RTEMS.
46
 
47
%prep
48
# untar the sources inside @target_alias@-binutils
49
%setup -c -n @target_alias@-binutils
50
@PATCH2@
51
  test -d build || mkdir build
52
 
53
%build
54
# HACK: This should be %{target} != %{build}, but SuSE's rpm screws it.
55
%if "%{_target_os}" != "%{_build_os}"
56
  CONFIGURE_ARGS="--build=%{_build} --host=%{_target}"
57
%endif
58
 
59
  cd build
60
  ../binutils-@binutils_version@/configure ${CONFIGURE_ARGS} --target=@target_alias@ \
61
    --verbose --prefix=%{_prefix}
62
 
63
  make all
64
  make info
65
 
66
 
67
%install
68
  cd build
69
  make prefix=$RPM_BUILD_ROOT%{_prefix} install
70
  make prefix=$RPM_BUILD_ROOT%{_prefix} install-info
71
# A bug in binutils: binutils does not install share/locale
72
# however it uses it
73
  ../binutils-@binutils_version@/mkinstalldirs \
74
    $RPM_BUILD_ROOT%{_prefix}/share/locale
75
 
76
# gzip info files
77
  gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info 2>/dev/null
78
  gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-? 2>/dev/null
79
 
80
  if test -f $RPM_BUILD_ROOT%{_prefix}/info/configure.info.gz;
81
  then
82
# These are only present in binutils >= 2.9.5
83
    find $RPM_BUILD_ROOT%{_prefix}/info -name 'configure.*' | \
84
      sed -e "s,^$RPM_BUILD_ROOT,,g" > ../files
85
  else
86
    touch ../files
87
  fi
88
 
89
# We assume that info/dir exists when building the RPMs
90
  rm -f $RPM_BUILD_ROOT%{_prefix}/info/dir
91
  f=`find $RPM_BUILD_ROOT%{_prefix}/info -name '*.info.gz'`
92
  test x"$f" != x"" && for i in $f; do
93
    install-info $i $RPM_BUILD_ROOT%{_prefix}/info/dir
94
  done
95
 
96
%clean
97
# let rpm --clean remove BuildRoot iif using the default BuildRoot
98
  test "$RPM_BUILD_ROOT" = "%{_tmppath}/@target_alias@-binutils" && \
99
    rm -rf $RPM_BUILD_ROOT
100
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.