source: rtems/scripts/binutils/binutils.add @ 5c68bf8

4.104.114.84.95
Last change on this file since 5c68bf8 was 5c68bf8, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/12/05 at 06:14:08

Add support for rpmbuild --with sources.

  • Property mode set to 100644
File size: 2.6 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
[b96a7b1]12Prefix:         %{_prefix}
[e4eb1be]13BuildPreReq:    /sbin/install-info
[d5dd9b9]14BuildPreReq:    texinfo >= 4.2
[92166f37]15BuildPreReq:    flex
[df49c60]16
[5c47f47]17Version:        %{binutils_version}
[f7d3f2b]18Source0:        ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{binutils_version}@binutils_suffix@
[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#
[5c68bf8]32%{?!_with_sources:NoSource:      0}
[df49c60]33
[9a769860]34# %description
35#
36# RTEMS is an open source operating system for embedded systems.
37#
38# This is binutils sources with patches for RTEMS.
[df49c60]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} \
[1dec74de]50    --verbose --disable-nls \
51    --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir}
[df49c60]52
53  make all
54  make info
55
56
57%install
58  cd build
[1dec74de]59  make prefix=$RPM_BUILD_ROOT%{_prefix} \
60    mandir=$RPM_BUILD_ROOT%{_mandir} \
61    infodir=$RPM_BUILD_ROOT%{_infodir} \
62    install
63  make prefix=$RPM_BUILD_ROOT%{_prefix} \
64    mandir=$RPM_BUILD_ROOT%{_mandir} \
65    infodir=$RPM_BUILD_ROOT%{_infodir} \
66    install-info
[df49c60]67# A bug in binutils: binutils does not install share/locale
68# however it uses it
[5c47f47]69  ../binutils-%{binutils_version}/mkinstalldirs \
[b96a7b1]70    $RPM_BUILD_ROOT%{_prefix}/share/locale
[df49c60]71
72# gzip info files
[9a769860]73  # gzip info files
74  ls $RPM_BUILD_ROOT%{_infodir}/*.info \
75    $RPM_BUILD_ROOT%{_infodir}/*.info-? \
76    $RPM_BUILD_ROOT%{_infodir}/*.info-?? 2>/dev/null \
77  | while read a; do \
78    gzip -9qf $a 2>/dev/null; \
79  done
[df49c60]80
81# We assume that info/dir exists when building the RPMs
[1dec74de]82  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
[b96a7b1]83  f=`find $RPM_BUILD_ROOT%{_prefix}/info -name '*.info.gz'`
[df49c60]84  test x"$f" != x"" && for i in $f; do
[1dec74de]85    /sbin/install-info $i $RPM_BUILD_ROOT%{_infodir}/dir
[df49c60]86  done
87
[1dec74de]88# gzip man pages
89  gzip -9qf $RPM_BUILD_ROOT%{_mandir}/man?/*.? 2>/dev/null
90
91# We don't ship host files
92  rm -f ${RPM_BUILD_ROOT}%{_prefix}/lib/libiberty*
Note: See TracBrowser for help on using the repository browser.