Build static subpackages (Erik van Pienbroek)
[fedora-mingw.git] / mingw64-binutils / mingw64-binutils.spec
1 Name:           mingw64-binutils
2 Version:        2.19.1
3 Release:        4%{?dist}
4 Summary:        MinGW Windows binutils
5
6 License:        GPLv2+ and LGPLv2+ and GPLv3+ and LGPLv3+
7 Group:          Development/Libraries
8
9 URL:            http://www.gnu.org/software/binutils/
10 Source0:        http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2
11
12 # Possible patch added after 2.19.1:
13 # http://sourceware.org/ml/binutils/2009-02/msg00090.html
14
15 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
16
17 BuildRequires:  flex
18 BuildRequires:  bison
19 BuildRequires:  texinfo
20 BuildRequires:  mingw64-filesystem >= 6
21
22 # NB: This must be left in.
23 Requires:       mingw64-filesystem >= 6
24
25
26 %description
27 MinGW Windows binutils (utilities like 'strip', 'as', 'ld') which
28 understand Windows executables and DLLs.
29
30
31 %prep
32 %setup -q -n binutils-%{version}
33
34
35 %build
36 mkdir -p build
37 cd build
38 CFLAGS="$RPM_OPT_FLAGS" \
39 ../configure \
40   --build=%_build --host=%_host \
41   --target=%{_mingw64_target} \
42   --verbose --disable-nls \
43   --without-included-gettext \
44   --disable-win32-registry \
45   --disable-werror \
46   --with-sysroot=%{_mingw64_sysroot} \
47   --prefix=%{_prefix} --bindir=%{_bindir} \
48   --includedir=%{_includedir} --libdir=%{_libdir} \
49   --mandir=%{_mandir} --infodir=%{_infodir}
50
51 make %{?_smp_mflags} all
52
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56
57 cd build
58 make DESTDIR=$RPM_BUILD_ROOT install
59
60 # These files conflict with ordinary binutils.
61 rm -rf $RPM_BUILD_ROOT%{_infodir}
62 rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
63
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68
69 %files
70 %defattr(-,root,root)
71 %{_mandir}/man1/*
72 %{_bindir}/x86_64-pc-mingw32-*
73 %{_prefix}/x86_64-pc-mingw32/bin
74 %{_prefix}/x86_64-pc-mingw32/lib/ldscripts
75
76
77 %changelog
78 * Wed Feb 11 2009 Richard W.M. Jones <rjones@redhat.com> - 2.19.1-4
79 - Started mingw64 development.
80
81 * Tue Feb 10 2009 Richard W.M. Jones <rjones@redhat.com> - 2.19.1-1
82 - New upstream version 2.19.1.
83
84 * Mon Dec 15 2008 Richard W.M. Jones <rjones@redhat.com> - 2.19-1
85 - New upstream version 2.19.
86
87 * Sat Nov 29 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-10
88 - Must runtime-require mingw32-filesystem.
89
90 * Fri Nov 21 2008 Levente Farkas <lfarkas@lfarkas.org> - 2.18.50_20080109_2-9
91 - BR mingw32-filesystem >= 38
92
93 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-8
94 - Rename mingw -> mingw32.
95 - BR mingw32-filesystem >= 26.
96
97 * Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-7
98 - Use mingw-filesystem.
99
100 * Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-5
101 - Initial RPM release, largely based on earlier work from several sources.