1 Summary: Mingw32 GNU Binary Utility Development Utilities - binutils
2 Name: crossmingw32-binutils
3 # could someone test this with new binutils?
4 %define binversion 2.10.0.18
9 Group: Development/Tools
10 Group(pl): Programowanie/Narzêdzia
11 ExclusiveArch: %{ix86}
12 Source0: ftp://ftp.gnu.org/pub/gnu/binutils-%{binversion}.tar.gz
13 Patch0: binutils-info.patch
16 BuildRequires: /bin/bash
17 Requires: crossmingw32-platform
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define target i386-mingw32
21 %define target_platform i386-pc-mingw32
23 %define arch %{_prefix}/%{target}
26 crossmingw32 is a complete cross-compiling development system for
27 building stand-alone Microsoft Windows applications under Linux using
28 the Mingw32 build libraries. This includes a binutils, gcc with g++
29 and objc, and libstdc++, all cross targeted to i386-mingw32, along
30 with supporting Win32 libraries in 'coff' format from free sources.
32 This package contains cross targeted binutils.
37 (cd binutils-%{binversion}
43 rm -rf $RPM_BUILD_ROOT
45 # Because of a bug in binutils-2.9.1, a cross libbfd.so* is not named
46 # lib<target>bfd.so*. To prevent confusion with native binutils, we
47 # forget about shared libraries right now, and do not install libbfd.a
48 (cd binutils-%{binversion}
50 # ldscripts won't be generated properly if SHELL is not bash...
51 %{?debug:CFLAGS="-g -O" LDFLAGS=""}%{!?debug:CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s"} \
52 CONFIG_SHELL="/bin/bash" \
57 --infodir=%{_infodir} \
60 %{__make} tooldir=%{_prefix} EXEEXT="" all
65 rm -rf $RPM_BUILD_ROOT
66 (cd binutils-%{binversion}
69 prefix=$RPM_BUILD_ROOT%{_prefix} \
70 mandir=$RPM_BUILD_ROOT%{_mandir} \
71 infodir=$RPM_BUILD_ROOT%{_infodir} \
72 libdir=$RPM_BUILD_ROOT%{_libdir}
76 # binutils 2.10 sets exeext to ".exe"
78 for fn in $RPM_BUILD_ROOT%{_bindir}/%target-*.exe $RPM_BUILD_ROOT%{arch}/bin/*.exe ; do
79 mv -f $fn `echo $fn | sed s/\.exe\$//`
82 # check if rpm automation handles this correctly:
83 #gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-*
84 #strip $RPM_BUILD_ROOT%{_bindir}/%{target}-*
87 %defattr(644,root,root,755)
88 %attr(755,root,root) %{arch}/bin/*
90 %attr(755,root,root) %{_bindir}/%{target}-*
91 %{_mandir}/man1/%{target}-*
95 rm -rf $RPM_BUILD_ROOT