Blob Blame History Raw
%define target avr

Name:           %{target}-binutils
Version:        2.17
Release:        3%{?dist}
Summary:        Cross Compiling GNU binutils targeted at %{target}
Group:          Development/Tools
License:        GPL
URL:            http://www.gnu.org/software/binutils/
Source0:        ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{version}.tar.bz2
Source1:        README.fedora
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)

%description
This is a Cross Compiling version of GNU binutils, which can be used to
assemble and link binaries for the %{target} platform, instead of for the
native %{_arch} platform.


%prep
%setup -q -c
cp %{SOURCE1} .


%build
mkdir -p build
pushd build
CFLAGS="$RPM_OPT_FLAGS" ../binutils-%{version}/configure --prefix=%{_prefix} \
  --libdir=%{_libdir} --mandir=%{_mandir} --infodir=%{_infodir} \
  --target=%{target} --disable-werror --disable-nls
make %{?_smp_mflags}
popd build


%install
rm -rf $RPM_BUILD_ROOT
pushd build
make install DESTDIR=$RPM_BUILD_ROOT
popd build
# these are for win targets only
rm $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-{dlltool,nlmconv,windres}.1
# we don't want these as we are a cross version
rm -r $RPM_BUILD_ROOT%{_infodir}
rm    $RPM_BUILD_ROOT%{_libdir}/libiberty.a


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc binutils-%{version}/COPYING binutils-%{version}/COPYING.LIB
%doc binutils-%{version}/README README.fedora
%{_prefix}/%{target}
%{_bindir}/%{target}-*
%{_mandir}/man1/%{target}-*.1.gz


%changelog
* Sat Apr  7 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.17-3
- Use mkdir -p instead of mkdir, to fix rpmbuild --short-circuit (bz 234750)

* Fri Apr  6 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.17-2
- Several specfile improvements / fixes (bz 234750)

* Sun Apr  1 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.17-1
- Revert to GNU 2.17 release as using GNU releases are better for non linux
  targets
- Add --disable-nls, to disable translations, so that we don't use the native
  PO files, as using the PO files of the (different version) native binutils,
  can lead to all kinda problems when translating formatstrings.
- Don't use %%configure but DIY, to avoid unwanted side effects of %%configure

* Sun Apr  1 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.17.50.0.12-1
- Bump to 2.17.50.0.12, to sync with rawhide / Fedora 7
- "Dynamicly Generate" README.fedora so that macros can be used

* Thu Mar 29 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.17.50.0.9-1
- Bump to 2.17.50.0.9
- Use %%configure instead of ./configure
- Various fixups

* Wed Mar 28 2007 Koos Termeulen koostermeulen@gmail.com 2.17-1
- New version and some changes after unofficial review by Hans de Goede

* Wed Mar 21 2007 Koos Termeulen koostermeulen@gmail.com 2.16.1-1
- Initial release