]> git.pld-linux.org Git - packages/crossmingw32-binutils.git/blob - crossmingw32-binutils.spec
- almost rewritten, split into 3 packages
[packages/crossmingw32-binutils.git] / crossmingw32-binutils.spec
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
5 %define version 990111
6 Version:        %{version}
7 Release:        3
8 License:        GPL
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
14 BuildRequires:  flex
15 BuildRequires:  bison
16 BuildRequires:  /bin/bash
17 Requires:       crossmingw32-platform
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define target i386-mingw32
21 %define target_platform i386-pc-mingw32
22 %define _prefix /usr
23 %define arch %{_prefix}/%{target}
24
25 %description
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.
31
32 This package contains cross targeted binutils.
33
34 %prep
35
36 %setup -q -T -c -a0
37 (cd binutils-%{binversion}
38 %patch -p1
39 )
40
41 %build
42
43 rm -rf $RPM_BUILD_ROOT
44
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}
49
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" \
53 ./configure \
54         --prefix=%{_prefix} \
55         --libdir=%{_libdir} \
56         --mandir=%{_mandir} \
57         --infodir=%{_infodir} \
58         --target=%{target}
59
60 %{__make} tooldir=%{_prefix} EXEEXT="" all
61 )
62
63 %install
64
65 rm -rf $RPM_BUILD_ROOT
66 (cd binutils-%{binversion}
67
68 %{__make} install \
69         prefix=$RPM_BUILD_ROOT%{_prefix} \
70         mandir=$RPM_BUILD_ROOT%{_mandir} \
71         infodir=$RPM_BUILD_ROOT%{_infodir} \
72         libdir=$RPM_BUILD_ROOT%{_libdir}
73
74 )
75
76 # binutils 2.10 sets exeext to ".exe"
77
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\$//`
80 done
81
82 # check if rpm automation handles this correctly:
83 #gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-*
84 #strip $RPM_BUILD_ROOT%{_bindir}/%{target}-*
85
86 %files
87 %defattr(644,root,root,755)
88 %attr(755,root,root) %{arch}/bin/*
89 %{arch}/lib
90 %attr(755,root,root) %{_bindir}/%{target}-*
91 %{_mandir}/man1/%{target}-*
92
93 %clean
94
95 rm -rf $RPM_BUILD_ROOT
This page took 0.167241 seconds and 4 git commands to generate.