summaryrefslogtreecommitdiffstats
path: root/cygwin-binutils.spec
blob: ef682dc26e11da6e36a0b507854aeb4470767002 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
%define cygrel 2

Name:           cygwin-binutils
Version:        2.22.51
Release:        2%{?dist}
Summary:        Cygwin binutils

License:        GPLv2+ and LGPLv2+ and GPLv3+ and LGPLv3+
Group:          Development/Libraries
URL:            http://www.gnu.org/software/binutils/
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Source0:        ftp://sourceware.org/pub/cygwin/release/binutils/binutils-%{version}-%{cygrel}-src.tar.bz2
Patch0:         w32api-sysroot.patch

BuildRequires:  flex
BuildRequires:  bison
BuildRequires:  texinfo
BuildRequires:  cygwin-filesystem

# NB: This must be left in.
Requires:       cygwin-filesystem


%description
Cygwin binutils (utilities like 'strip', 'as', 'ld') which
understand Cygwin PE executables and DLLs.


%prep
%setup -q -n binutils-%{version}-%{cygrel}
%patch0 -p1


%build
mkdir -p build
cd build
CFLAGS="$RPM_OPT_FLAGS" \
../configure \
  --build=%_build --host=%_host \
  --target=%{_cygwin_target} \
  --verbose --disable-nls \
  --without-included-gettext \
  --disable-win32-registry \
  --disable-werror \
  --with-sysroot=%{_cygwin_sysroot} \
  --prefix=%{_prefix} --bindir=%{_bindir} \
  --includedir=%{_includedir} --libdir=%{_libdir} \
  --mandir=%{_mandir} --infodir=%{_infodir}

make all


%install
rm -rf $RPM_BUILD_ROOT

cd build
make DESTDIR=$RPM_BUILD_ROOT install

# These files conflict with ordinary binutils.
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%{_mandir}/man1/*
%{_bindir}/i686-pc-cygwin-*
%{_prefix}/i686-pc-cygwin/bin
%{_prefix}/i686-pc-cygwin/lib/ldscripts


%changelog
* Tue Mar 27 2012 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 2.22.51-2
- Fix --enable-auto-image-base for latest Cygwin releases.

* Sun Oct 23 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 2.22.51-1
- Version bump to match Cygwin distro.

* Sun Jul 31 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 2.21.53-1
- Version bump to match Cygwin distro.

* Sun Jul 10 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 2.21.1-1
- Version bump.

* Thu May 26 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 2.21-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Mar 14 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 2.21-2
- Accomodate w32api libs in sys-root/usr/lib/w32api.

* Wed Feb 16 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 2.21-1
- Initial RPM release, largely based on mingw32-binutils.