source: rtems/contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-binutils.spec @ c12ebd7

4.104.115
Last change on this file since c12ebd7 was c12ebd7, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/05/10 at 03:44:03

Regenerate.

  • Property mode set to 100644
File size: 4.5 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:           i586-pc-freebsd7.2-binutils
38Summary:        Binutils for target i586-pc-freebsd7.2
39Group:          Development/Tools
40Version:        %{binutils_rpmvers}
41Release:        0.20100305.1%{?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%if "i586-pc-freebsd7.2" == "i686-pc-cygwin"
53BuildRequires:  texinfo >= 4.2
54%endif
55%endif
56BuildRequires:  flex
57BuildRequires:  bison
58
59Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
60
61%description
62Cross binutils for target i586-pc-freebsd7.2
63%prep
64%setup -q -c -T -n %{name}-%{version}
65
66%setup -q -D -T -n %{name}-%{version} -a0
67cd binutils-%{binutils_pkgvers}
68%{?PATCH0:%patch0 -p1}
69cd ..
70
71%build
72  mkdir -p build
73  cd build
74%if "%{_build}" != "%{_host}"
75  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
76%endif
77  CFLAGS="$RPM_OPT_FLAGS" \
78  ../binutils-%{binutils_pkgvers}/configure \
79    --build=%_build --host=%_host \
80    --target=i586-pc-freebsd7.2 \
81    --verbose --disable-nls \
82    --without-included-gettext \
83    --disable-win32-registry \
84    --disable-werror \
85    --with-sysroot=%{_prefix}/i586-pc-freebsd7.2/sys-root \
86    --prefix=%{_prefix} --bindir=%{_bindir} \
87    --exec-prefix=%{_exec_prefix} \
88    --includedir=%{_includedir} --libdir=%{_libdir} \
89    --mandir=%{_mandir} --infodir=%{_infodir}
90
91  make %{?_smp_mflags} all
92  cd ..
93
94%install
95  rm -rf $RPM_BUILD_ROOT
96
97  cd build
98  make DESTDIR=$RPM_BUILD_ROOT install
99
100
101# Conflict with a native binutils' infos
102  rm -rf $RPM_BUILD_ROOT%{_infodir}
103
104# We don't ship host files
105  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
106
107# manpages without corresponding tools
108  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd7.2-dlltool%{_exeext}; then
109    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd7.2-dlltool*
110  fi
111  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd7.2-nlmconv%{_exeext}; then
112    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd7.2-nlmconv*
113  fi
114  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd7.2-windres%{_exeext}; then
115    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd7.2-windres*
116  fi
117  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd7.2-windmc%{_exeext}; then
118    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd7.2-windmc*
119  fi
120
121  cd ..
122
123# Extract %%__os_install_post into os_install_post~
124cat << \EOF > os_install_post~
125%__os_install_post
126EOF
127
128# Generate customized brp-*scripts
129cat os_install_post~ | while read a x y; do
130case $a in
131# Prevent brp-strip* from trying to handle foreign binaries
132*/brp-strip*)
133  b=$(basename $a)
134  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
135  chmod a+x $b
136  ;;
137esac
138done
139
140sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
141< os_install_post~ > os_install_post
142%define __os_install_post . ./os_install_post
143
144%clean
145  rm -rf $RPM_BUILD_ROOT
146
147# ==============================================================
148# i586-pc-freebsd7.2-binutils
149# ==============================================================
150# %package -n i586-pc-freebsd7.2-binutils
151# Summary:      rtems binutils for i586-pc-freebsd7.2
152# Group: Development/Tools
153# %if %build_infos
154# Requires: binutils-common
155# %endif
156
157%description -n i586-pc-freebsd7.2-binutils
158GNU binutils targetting i586-pc-freebsd7.2.
159
160%files -n i586-pc-freebsd7.2-binutils
161%defattr(-,root,root)
162
163%{_mandir}/man1/i586-pc-freebsd7.2-*.1*
164
165%{_bindir}/i586-pc-freebsd7.2-*
166
167%dir %{_exec_prefix}/i586-pc-freebsd7.2
168%dir %{_exec_prefix}/i586-pc-freebsd7.2/bin
169%{_exec_prefix}/i586-pc-freebsd7.2/bin/*
170
171%dir %{_exec_prefix}/i586-pc-freebsd7.2/lib
172%{_exec_prefix}/i586-pc-freebsd7.2/lib/ldscripts
173
Note: See TracBrowser for help on using the repository browser.