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

4.104.114.84.95
Last change on this file since eb9604d3 was eb9604d3, checked in by Ralf Corsepius <ralf.corsepius@…>, on 09/03/05 at 04:32:32

Remove dlltool, nlmconv, windres man pages.

  • Property mode set to 100644
File size: 3.2 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
11BuildRequires:  /sbin/install-info
12BuildRequires:  texinfo >= 4.2
13BuildRequires:  flex
14
15Version:        %{binutils_version}
16Source0:        ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{binutils_version}@binutils_suffix@
17@PATCH1@
18
19Source98:       brp-rtems-strip.in
20Source99:       brp-rtems-compress.in
21
22%define __os_install_post ./brp-rtems-compress && ./brp-rtems-strip
23
24#
25# The original sources are not included in the source RPM.
26# If we included them, then the source RPMs for each target
27# would duplicate MBs of source unnecessarily.  This is
28# a duplication of over 30 MBs of source for each of
29# the more than 10 targets it is possible to build.
30#
31# You can get them yourself from the Internet and copy them to
32# your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
33# Or you can try the ftp options of rpm :-)
34#
35%{?!_with_sources:NoSource:      0}
36
37# %description
38#
39# RTEMS is an open source operating system for embedded systems.
40#
41# This is binutils sources with patches for RTEMS.
42
43%prep
44%setup -c -T -n %{name}-%{version} -a0
45
46sed 's,@BRPSTRIPPATH@,.%_bindir .%_prefix/%binutils_target/bin,' \
47  %SOURCE98 > brp-rtems-strip
48chmod +x brp-rtems-strip
49
50sed 's,@BRPCOMPRESSPATH@,.%_mandir/man* .%_infodir,' \
51  %SOURCE99 > brp-rtems-compress
52chmod +x brp-rtems-compress
53
54cd binutils-%{version}
55%{?PATCH0:%patch0 -p1}
56cd ..
57
58  mkdir -p build
59
60%build
61  cd build
62  CFLAGS="$RPM_OPT_FLAGS" \
63  ../binutils-%{binutils_version}/configure \
64    --build=%_build --host=%_host \
65    --target=%{binutils_target} \
66    --verbose --disable-nls \
67    --prefix=%{_prefix} --bindir=%{_bindir} \
68    --includedir=%{_includedir} --libdir=%{_libdir} \
69    --mandir=%{_mandir} --infodir=%{_infodir} \
70
71  make all
72  make info
73
74
75%install
76  rm -rf $RPM_BUILD_ROOT
77
78  cd build
79  make prefix=$RPM_BUILD_ROOT%{_prefix} \
80    bindir=$RPM_BUILD_ROOT%{_bindir} \
81    includedir=$RPM_BUILD_ROOT%{_includedir} \
82    libdir=$RPM_BUILD_ROOT%{_libdir} \
83    infodir=$RPM_BUILD_ROOT%{_infodir} \
84    mandir=$RPM_BUILD_ROOT%{_mandir} \
85    install
86  make prefix=$RPM_BUILD_ROOT%{_prefix} \
87    bindir=$RPM_BUILD_ROOT%{_bindir} \
88    includedir=$RPM_BUILD_ROOT%{_includedir} \
89    libdir=$RPM_BUILD_ROOT%{_libdir} \
90    infodir=$RPM_BUILD_ROOT%{_infodir} \
91    mandir=$RPM_BUILD_ROOT%{_mandir} \
92    install-info
93
94# A bug in binutils: binutils does not install share/locale
95# however it uses it
96  mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
97
98%if "%{binutils_version}" < "2.9.5"
99  rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
100%endif
101
102  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
103  touch $RPM_BUILD_ROOT%{_infodir}/dir
104
105%if "%{_prefix}" == "/usr"
106# Conflict with a native binutils' infos
107  rm -rf $RPM_BUILD_ROOT%{_infodir}
108%endif
109 
110# We don't ship host files
111  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
112
113# manpages without corresponding tools
114  rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/%{binutils_target}-dlltool*
115  rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/%{binutils_target}-nlmconv*
116  rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/%{binutils_target}-windres*
117
118  cd ..
Note: See TracBrowser for help on using the repository browser.