File cross-m68k-amiga-gcc.spec of Package cross-m68k-amiga-gcc
#
# spec file for package spec (Version 2.0)
#
# Copyright (c) 2003 SuSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
Name: cross-m68k-amiga-gcc
License: GPL
Group: unsorted
Autoreqprov: on
Version: 3.4.6
Release: 0
Summary: AmigaOS GNU cross-toolchain (compilers)
Source6: gcc-3.4.6.tar.bz2
Patch1: gcc-3.4.6.dif
BuildRequires: bison flex texinfo texlive cross-m68k-amiga-binutils cross-m68k-amiga-libs
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: cross-m68k-amiga-binutils cross-m68k-amiga-libs
%description
This GNU toolchain build targets AmigaOS 3.x (possibly 2.x) and up.
%prep
%setup -qTc -a 6
cd gcc-*
%patch1
cd ..
%define adir /usr/lib/cross-amiga
%define dadir $RPM_BUILD_ROOT%adir
%build
export PREFIX=%adir
export TARGET=m68k-amigaos
export PATH=%adir/bin:$PATH
mkdir -p build-gcc/gcc/include
cd build-gcc
#CFLAGS="$RPM_OPT_FLAGS" using this breaks libstdc++ build
../gcc-*/configure \
--target=$TARGET \
--prefix=$PREFIX \
--enable-languages=c,c++ \
--with-headers=$PREFIX/m68k-amigaos/include \
--with-gnu-as --with-gnu-ld
make %{?jobs:-j%jobs}
%install
export PATH=%adir/bin:$PATH
cd build-gcc
make install DESTDIR=$RPM_BUILD_ROOT
for i in %dadir/m68k-amigaos/lib/libs??c++.la
do
sed 's,-L/usr/src/packages/BUILD/[^ ]* ,,g' <$i >$i.new && mv $i.new $i
done
%files
%defattr(-,root,root)
%adir