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 Apr 12, 2005 at 6:14:08 AM

Add support for rpmbuild --with sources.

  • Property mode set to 100644
File size: 2.6 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
12Prefix:         %{_prefix}
13BuildPreReq:    /sbin/install-info
14BuildPreReq:    texinfo >= 4.2
15BuildPreReq:    flex
16
17Version:        %{binutils_version}
18Source0:        ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{binutils_version}@binutils_suffix@
19@PATCH1@
20
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#
32%{?!_with_sources:NoSource:      0}
33
34# %description
35#
36# RTEMS is an open source operating system for embedded systems.
37#
38# This is binutils sources with patches for RTEMS.
39
40%prep
41%setup -c -n %{name}-%{version}
42@PATCH2@
43  test -d build || mkdir build
44
45%build
46  cd build
47  ../binutils-%{binutils_version}/configure \
48    --build=%_build --host=%_host \
49    --target=%{binutils_target} \
50    --verbose --disable-nls \
51    --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir}
52
53  make all
54  make info
55
56
57%install
58  cd build
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
67# A bug in binutils: binutils does not install share/locale
68# however it uses it
69  ../binutils-%{binutils_version}/mkinstalldirs \
70    $RPM_BUILD_ROOT%{_prefix}/share/locale
71
72# gzip info files
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
80
81# We assume that info/dir exists when building the RPMs
82  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
83  f=`find $RPM_BUILD_ROOT%{_prefix}/info -name '*.info.gz'`
84  test x"$f" != x"" && for i in $f; do
85    /sbin/install-info $i $RPM_BUILD_ROOT%{_infodir}/dir
86  done
87
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.