source: rtems/scripts/binutils/binutils.add @ 5537653

4.104.114.84.95
Last change on this file since 5537653 was 5537653, checked in by Ralf Corsepius <ralf.corsepius@…>, on Apr 25, 2005 at 12:33:38 PM

2005-04-25 Ralf Corsepius <ralf.corsepius@…>

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