source: rtems/scripts/binutils/binutils.add @ 4279a35

4.104.114.84.95
Last change on this file since 4279a35 was 4279a35, checked in by Ralf Corsepius <ralf.corsepius@…>, on Apr 20, 2005 at 8:59:45 AM

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

  • binutils/base-binutils.add, binutils/binutils.add, binutils/target-binutils.add: Introduce %{_includedir}, %{_libdir}, %{_bindir}. Remove superfluous %doc. Misc. fixes.
  • 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
12BuildPreReq:    /sbin/install-info
13BuildPreReq:    texinfo >= 4.2
14BuildPreReq:    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  ../binutils-%{binutils_version}/configure \
51    --build=%_build --host=%_host \
52    --target=%{binutils_target} \
53    --verbose --disable-nls \
54    --prefix=%{_prefix} --bindir=%{_bindir} \
55    --includedir=%{_includedir} --libdir=%{_libdir} \
56    --mandir=%{_mandir} --infodir=%{_infodir} \
57
58  make all
59  make info
60
61
62%install
63  rm -rf $RPM_BUILD_ROOT
64
65  cd build
66  make prefix=$RPM_BUILD_ROOT%{_prefix} \
67    bindir=$RPM_BUILD_ROOT%{_bindir} \
68    includedir=$RPM_BUILD_ROOT%{_includedir} \
69    libdir=$RPM_BUILD_ROOT%{_libdir} \
70    infodir=$RPM_BUILD_ROOT%{_infodir} \
71    mandir=$RPM_BUILD_ROOT%{_mandir} \
72    install
73  make prefix=$RPM_BUILD_ROOT%{_prefix} \
74    bindir=$RPM_BUILD_ROOT%{_bindir} \
75    includedir=$RPM_BUILD_ROOT%{_includedir} \
76    libdir=$RPM_BUILD_ROOT%{_libdir} \
77    infodir=$RPM_BUILD_ROOT%{_infodir} \
78    mandir=$RPM_BUILD_ROOT%{_mandir} \
79    install-info
80
81# A bug in binutils: binutils does not install share/locale
82# however it uses it
83  mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
84
85%if "%{binutils_version}" < "2.9.5"
86  rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
87%endif
88
89# gzip info files
90  ls $RPM_BUILD_ROOT%{_infodir}/*.info \
91    $RPM_BUILD_ROOT%{_infodir}/*.info-? \
92    $RPM_BUILD_ROOT%{_infodir}/*.info-?? 2>/dev/null \
93  | while read a; do \
94    gzip -9qf $a 2>/dev/null; \
95  done
96
97# We assume that info/dir exists when building the RPMs
98  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
99  f=`find $RPM_BUILD_ROOT%{_infodir} -name '*.info.gz'`
100  test x"$f" != x"" && for i in $f; do
101    /sbin/install-info $i $RPM_BUILD_ROOT%{_infodir}/dir
102  done
103
104# gzip man pages
105  gzip -9qf $RPM_BUILD_ROOT%{_mandir}/man?/*.? 2>/dev/null
106
107# We don't ship host files
108  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
Note: See TracBrowser for help on using the repository browser.