New native version of GnuTLS.
[fedora-mingw.git] / binutils / mingw32-binutils.spec
1 %define binutils_version 2.18.50
2 %define mingw32_binutils_version 20080109-2
3 %define mingw32_binutils_rpmvers %{expand:%(echo %{mingw32_binutils_version} | tr - _)} 
4
5 Name:           mingw32-binutils
6 Version:        %{binutils_version}_%{mingw32_binutils_rpmvers}
7 Release:        8%{?dist}
8 Summary:        MinGW Windows binutils
9
10 License:        GPLv2+ and LGPLv2+ and GPLv3+ and LGPLv3+
11 Group:          Development/Libraries
12 URL:            http://www.mingw.org/
13 Source0:        http://dl.sourceforge.net/sourceforge/mingw/binutils-%{binutils_version}-%{mingw32_binutils_version}-src.tar.gz
14 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
15
16 BuildRequires:  flex
17 BuildRequires:  bison
18 BuildRequires:  texinfo
19 BuildRequires:  mingw32-filesystem >= 26
20
21 Requires:       mingw32-filesystem >= 26
22
23 Provides:       mingw-binutils = %{version}-%{release}
24 Obsoletes:      mingw-binutils < 2.18.50_20080109_2-8
25
26
27 %description
28 MinGW Windows binutils (utilities like 'strip', 'as', 'ld') which
29 understand Windows executables and DLLs.
30
31
32 %prep
33 %setup -q -n binutils-%{binutils_version}
34
35
36 %build
37 mkdir -p build
38 cd build
39 CFLAGS="$RPM_OPT_FLAGS" \
40 ../configure \
41   --build=%_build --host=%_host \
42   --target=%{_mingw32_target} \
43   --verbose --disable-nls \
44   --without-included-gettext \
45   --disable-win32-registry \
46   --disable-werror \
47   --with-sysroot=%{_mingw32_sysroot} \
48   --prefix=%{_prefix} --bindir=%{_bindir} \
49   --includedir=%{_includedir} --libdir=%{_libdir} \
50   --mandir=%{_mandir} --infodir=%{_infodir}
51
52 make all
53
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57
58 cd build
59 make DESTDIR=$RPM_BUILD_ROOT install
60
61 # These files conflict with ordinary binutils.
62 rm -rf $RPM_BUILD_ROOT%{_infodir}
63 rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
64
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69
70 %files
71 %defattr(-,root,root)
72 %{_mandir}/man1/*
73 %{_bindir}/i686-pc-mingw32-*
74 %{_prefix}/i686-pc-mingw32/bin
75 %{_prefix}/i686-pc-mingw32/lib/ldscripts
76
77
78 %changelog
79 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-8
80 - Rename mingw -> mingw32.
81 - BR mingw32-filesystem >= 26.
82
83 * Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-7
84 - Use mingw-filesystem.
85
86 * Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-5
87 - Initial RPM release, largely based on earlier work from several sources.