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 04/25/05 at 12:33:38

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

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[5c47f47]1
[087a6c86]2%define binutils_version     @binutils_version@
3%define binutils_target      @target_alias@
[5c47f47]4
[9a769860]5Name:         %{rpmprefix}%{binutils_target}-binutils
[087a6c86]6Summary:      binutils for target %{binutils_target}
7Group:        %{rpmgroup}
[df49c60]8Release:      @Release@
9License:      GPL/LGPL
10
[f7d3f2b]11Packager:       ralf.corsepius@rtems.org and joel@OARcorp.com
[5537653]12BuildRequires:  /sbin/install-info
13BuildRequires:  texinfo >= 4.2
14BuildRequires:  flex
[df49c60]15
[5c47f47]16Version:        %{binutils_version}
[f7d3f2b]17Source0:        ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{binutils_version}@binutils_suffix@
[df1f734]18@PATCH1@
19
[df49c60]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#
[5c68bf8]31%{?!_with_sources:NoSource:      0}
[df49c60]32
[9a769860]33# %description
34#
35# RTEMS is an open source operating system for embedded systems.
36#
37# This is binutils sources with patches for RTEMS.
[df49c60]38
39%prep
[f50f0cd]40%setup -c -T -n %{name}-%{version} -a0
[b64edb5b]41
42cd binutils-%{version}
43%{?PATCH0:%patch0 -p1}
44cd ..
45
[b17dd93]46  mkdir -p build
[df49c60]47
48%build
[b96a7b1]49  cd build
[b898358c]50  CFLAGS="$RPM_OPT_FLAGS" \
[5c47f47]51  ../binutils-%{binutils_version}/configure \
[7da8c10]52    --build=%_build --host=%_host \
[087a6c86]53    --target=%{binutils_target} \
[1dec74de]54    --verbose --disable-nls \
[4279a35]55    --prefix=%{_prefix} --bindir=%{_bindir} \
56    --includedir=%{_includedir} --libdir=%{_libdir} \
57    --mandir=%{_mandir} --infodir=%{_infodir} \
[df49c60]58
59  make all
60  make info
61
62
63%install
[f85f2f0]64  rm -rf $RPM_BUILD_ROOT
65
[df49c60]66  cd build
[1dec74de]67  make prefix=$RPM_BUILD_ROOT%{_prefix} \
[4279a35]68    bindir=$RPM_BUILD_ROOT%{_bindir} \
69    includedir=$RPM_BUILD_ROOT%{_includedir} \
70    libdir=$RPM_BUILD_ROOT%{_libdir} \
[1dec74de]71    infodir=$RPM_BUILD_ROOT%{_infodir} \
[4279a35]72    mandir=$RPM_BUILD_ROOT%{_mandir} \
[1dec74de]73    install
74  make prefix=$RPM_BUILD_ROOT%{_prefix} \
[4279a35]75    bindir=$RPM_BUILD_ROOT%{_bindir} \
76    includedir=$RPM_BUILD_ROOT%{_includedir} \
77    libdir=$RPM_BUILD_ROOT%{_libdir} \
[1dec74de]78    infodir=$RPM_BUILD_ROOT%{_infodir} \
[4279a35]79    mandir=$RPM_BUILD_ROOT%{_mandir} \
[1dec74de]80    install-info
[4279a35]81
[df49c60]82# A bug in binutils: binutils does not install share/locale
83# however it uses it
[4279a35]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
[df49c60]89
90# gzip info files
[9a769860]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
[df49c60]97
98# We assume that info/dir exists when building the RPMs
[1dec74de]99  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
[4279a35]100  f=`find $RPM_BUILD_ROOT%{_infodir} -name '*.info.gz'`
[df49c60]101  test x"$f" != x"" && for i in $f; do
[1dec74de]102    /sbin/install-info $i $RPM_BUILD_ROOT%{_infodir}/dir
[df49c60]103  done
104
[1dec74de]105# gzip man pages
106  gzip -9qf $RPM_BUILD_ROOT%{_mandir}/man?/*.? 2>/dev/null
107
108# We don't ship host files
[4279a35]109  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
Note: See TracBrowser for help on using the repository browser.