source: rtems/contrib/crossrpms/netbsd5.0.2/i386/i386-pc-netbsdelf5.0.2-binutils.spec @ 88687468

4.104.115
Last change on this file since 88687468 was 88687468, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/19/10 at 03:55:06

Bump *_RPMREL.

  • Property mode set to 100644
File size: 4.6 KB
Line 
1#
2# Please send bugfixes or comments to
3#       http://www.rtems.org/bugzilla
4#
5
6
7%ifos cygwin cygwin32 mingw mingw32
8%define _exeext .exe
9%define debug_package           %{nil}
10%define _libdir                 %{_exec_prefix}/lib
11%else
12%define _exeext %{nil}
13%endif
14
15%ifos cygwin cygwin32
16%define optflags -O3 -pipe -march=i486 -funroll-loops
17%endif
18
19%ifos mingw mingw32
20%if %{defined _mingw32_cflags}
21%define optflags %{_mingw32_cflags}
22%else
23%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
24%endif
25%endif
26
27%if "%{_build}" != "%{_host}"
28%define _host_rpmprefix %{_host}-
29%else
30%define _host_rpmprefix %{nil}
31%endif
32
33%define binutils_pkgvers 2.20.1
34%define binutils_version 2.20.1
35%define binutils_rpmvers %{expand:%(echo "2.20.1" | tr - _ )}
36
37Name:           i386-pc-netbsdelf5.0.2-binutils
38Summary:        Binutils for target i386-pc-netbsdelf5.0.2
39Group:          Development/Tools
40Version:        %{binutils_rpmvers}
41Release:        0.20100419.0%{?dist}
42License:        GPL/LGPL
43URL:            http://sources.redhat.com/binutils
44BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
45
46BuildRequires:  %{_host_rpmprefix}gcc
47
48%if "%{binutils_version}" >= "2.18"
49# Bug in bfd: Doesn't build without texinfo installed
50BuildRequires:  texinfo >= 4.2
51%else
52%endif
53BuildRequires:  flex
54BuildRequires:  bison
55
56Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
57
58%description
59Cross binutils for target i386-pc-netbsdelf5.0.2
60%prep
61%setup -q -c -T -n %{name}-%{version}
62
63%setup -q -D -T -n %{name}-%{version} -a0
64cd binutils-%{binutils_pkgvers}
65%{?PATCH0:%patch0 -p1}
66cd ..
67
68%build
69  mkdir -p build
70  cd build
71%if "%{_build}" != "%{_host}"
72  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
73%endif
74  CFLAGS="$RPM_OPT_FLAGS" \
75  ../binutils-%{binutils_pkgvers}/configure \
76    --build=%_build --host=%_host \
77    --target=i386-pc-netbsdelf5.0.2 \
78    --verbose --disable-nls \
79    --without-included-gettext \
80    --disable-win32-registry \
81    --disable-werror \
82    --with-sysroot=%{_prefix}/i386-pc-netbsdelf5.0.2/sys-root \
83    --prefix=%{_prefix} --bindir=%{_bindir} \
84    --exec-prefix=%{_exec_prefix} \
85    --includedir=%{_includedir} --libdir=%{_libdir} \
86    --mandir=%{_mandir} --infodir=%{_infodir}
87
88  make %{?_smp_mflags} all
89  cd ..
90
91%install
92  rm -rf $RPM_BUILD_ROOT
93
94  cd build
95  make DESTDIR=$RPM_BUILD_ROOT install
96
97
98# Conflict with a native binutils' infos
99  rm -rf $RPM_BUILD_ROOT%{_infodir}
100
101# We don't ship host files
102  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
103
104# manpages without corresponding tools
105  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-pc-netbsdelf5.0.2-dlltool%{_exeext}; then
106    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-pc-netbsdelf5.0.2-dlltool*
107  fi
108  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-pc-netbsdelf5.0.2-nlmconv%{_exeext}; then
109    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-pc-netbsdelf5.0.2-nlmconv*
110  fi
111  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-pc-netbsdelf5.0.2-windres%{_exeext}; then
112    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-pc-netbsdelf5.0.2-windres*
113  fi
114  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-pc-netbsdelf5.0.2-windmc%{_exeext}; then
115    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-pc-netbsdelf5.0.2-windmc*
116  fi
117
118  cd ..
119
120# Extract %%__os_install_post into os_install_post~
121cat << \EOF > os_install_post~
122%__os_install_post
123EOF
124
125# Generate customized brp-*scripts
126cat os_install_post~ | while read a x y; do
127case $a in
128# Prevent brp-strip* from trying to handle foreign binaries
129*/brp-strip*)
130  b=$(basename $a)
131  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
132  chmod a+x $b
133  ;;
134esac
135done
136
137sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
138< os_install_post~ > os_install_post
139%define __os_install_post . ./os_install_post
140
141%clean
142  rm -rf $RPM_BUILD_ROOT
143
144# ==============================================================
145# i386-pc-netbsdelf5.0.2-binutils
146# ==============================================================
147# %package -n i386-pc-netbsdelf5.0.2-binutils
148# Summary:      rtems binutils for i386-pc-netbsdelf5.0.2
149# Group: Development/Tools
150# %if %build_infos
151# Requires: binutils-common
152# %endif
153
154%description -n i386-pc-netbsdelf5.0.2-binutils
155GNU binutils targetting i386-pc-netbsdelf5.0.2.
156
157%files -n i386-pc-netbsdelf5.0.2-binutils
158%defattr(-,root,root)
159
160%{_mandir}/man1/i386-pc-netbsdelf5.0.2-*.1*
161
162%{_bindir}/i386-pc-netbsdelf5.0.2-*
163
164%dir %{_exec_prefix}/i386-pc-netbsdelf5.0.2
165%dir %{_exec_prefix}/i386-pc-netbsdelf5.0.2/bin
166%{_exec_prefix}/i386-pc-netbsdelf5.0.2/bin/*
167
168%dir %{_exec_prefix}/i386-pc-netbsdelf5.0.2/lib
169%{_exec_prefix}/i386-pc-netbsdelf5.0.2/lib/ldscripts
170
Note: See TracBrowser for help on using the repository browser.