Added binutils.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 7 Jul 2008 15:47:49 +0000 (16:47 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Mon, 7 Jul 2008 15:47:49 +0000 (16:47 +0100)
README
binutils/mingw-binutils.spec [new file with mode: 0644]

diff --git a/README b/README
index 43b8d9d..bf93f87 100644 (file)
--- a/README
+++ b/README
@@ -8,4 +8,6 @@ Other useful information:
 
  * https://fedoraproject.org/wiki/SIGs/MinGW
 
-- RWMJ 2008-07-07
+Build order & package notes:
+
+ * mingw-binutils
diff --git a/binutils/mingw-binutils.spec b/binutils/mingw-binutils.spec
new file mode 100644 (file)
index 0000000..639b606
--- /dev/null
@@ -0,0 +1,78 @@
+%define binutils_version 2.18.50
+%define mingw_binutils_version 20080109-2
+%define mingw_binutils_rpmvers %{expand:%(echo %{mingw_binutils_version} | tr - _)} 
+
+Name:           mingw-binutils
+Version:        %{binutils_version}_%{mingw_binutils_rpmvers}
+Release:        2%{?dist}
+Summary:        MinGW Windows binutils
+
+License:        GPLv2+ and LGPLv2+ and GPLv3+ and LGPLv3+
+Group:          Development/Libraries
+URL:            http://www.mingw.org/
+Source0:        http://dl.sourceforge.net/sourceforge/mingw/binutils-%{binutils_version}-%{mingw_binutils_version}-src.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:  flex
+BuildRequires:  bison
+BuildRequires:  texinfo
+
+
+%description
+MinGW Windows binutils (utilities like 'strip', 'as', 'ld') which
+understand Windows executables and DLLs.
+
+
+%prep
+%setup -q -n binutils-%{binutils_version}
+
+
+%build
+mkdir -p build
+cd build
+CFLAGS="$RPM_OPT_FLAGS" \
+../configure \
+  --build=%_build --host=%_host \
+  --target=i686-pc-mingw32 \
+  --verbose --disable-nls \
+  --without-included-gettext \
+  --disable-win32-registry \
+  --disable-werror \
+  --with-sysroot=%{_prefix}/i686-pc-mingw32/sys-root \
+  --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*
+
+# Install puts a second copy of all the executables under the MinGW
+# root (/usr/i686-pc-mingw/bin/*).  I'm not sure why it does this,
+# but it doesn't seem to be necessary.
+rm -rf $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/bin
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_mandir}/man1/*
+%{_bindir}/i686-pc-mingw32-*
+%{_prefix}/i686-pc-mingw32/lib/ldscripts
+
+
+%changelog
+* Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-2
+- Initial RPM release, largely based on earlier work from several sources.