File m68k-amigaos-binutils.spec of Package m68k-amigaos-binutils
%define Name binutils
%define Version 2.9.1
Name : m68k-amigaos-%{Name}
Version : %{Version}
Release : amixdev.1.<CI_CNT>.<B_CNT>
Summary : A GNU collection of binary utilities for m68k-amigaos
Group : Development/Tools
License : GPL
URL : http://sources.redhat.com/binutils/
Source0 : ftp://ftp.gnu.org/gnu/%{Name}/%{Name}-%{Version}.tar.gz
Patch0 : 0001-gg-19980823.patch
Patch1 : 0002-cahirwpz.patch
Patch2 : 0003-Imported-config.guess-and-config.sub-from-the-binuti.patch
BuildRoot : %{_tmppath}/%{name}-%{version}-build
BuildRequires : flex, bison, texinfo
%if 0%{?suse_version} == 1110
# SLE 11 does not like files in /usr/m68k-amigaos
#!BuildIgnore : post-build-checks
%endif
%description
Binutils is a collection of binary utilities, including ar (for creating,
modifying and extracting from archives), nm (for listing symbols from
object files), objcopy (for copying and translating object files),
objdump (for displaying information from object files), ranlib (for
generating an index for the contents of an archive), size (for listing
the section sizes of an object or archive file), strings (for listing
printable strings from files), strip (for discarding symbols), c++filt
(a filter for demangling encoded C++ symbols), addr2line (for converting
addresses to file and line), and nlmconv (for converting object code into
an NLM).
Install binutils if you need to perform any of these types of actions on
binary files. Most programmers will want to install binutils.
This package is for M68k AmigaOS development. It is based on the github
cahirwpz/m68k-amigaos-toolchain repository.
%prep
%setup -q -n %{Name}-%{Version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
./configure --target=m68k-amigaos --program-prefix=m68k-amigaos- --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir}
make all
%install
rm -rf %{buildroot}
make prefix=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir} mandir=%{buildroot}%{_mandir} install
#Don't hard link the files
cd %{buildroot}%{_prefix}/m68k-amigaos/bin
rm -f ar; ln -s %{_prefix}/bin/m68k-amigaos-ar ar
rm -f as; ln -s %{_prefix}/bin/m68k-amigaos-as as
rm -f ld; ln -s %{_prefix}/bin/m68k-amigaos-ld ld
rm -f nm; ln -s %{_prefix}/bin/m68k-amigaos-nm nm
rm -f ranlib; ln -s %{_prefix}/bin/m68k-amigaos-ranlib ranlib
rm -f strip; ln -s %{_prefix}/bin/m68k-amigaos-strip strip
# Currently only pack bin and man pages
rm -fr %{buildroot}%{_libdir} %{buildroot}/usr/include %{buildroot}/usr/info
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc README COPYING COPYING.LIB
%{_bindir}/*
%{_mandir}/man1/*
%{_prefix}/m68k-amigaos
%{_prefix}/m68k-amigaos/*
%changelog