File scratchbox.spec of Package scratchbox

Name:           scratchbox
Version:        1.0.17
Release:        1%{?dist}
Summary:        Cross-Compilation Toolkit

Group:          Development/Tools
License:        GPL
URL:            http://www.scratchbox.org/
Source0:        %{name}-%{version}.tar.gz
Source1:        build.config
Source2:        scratchbox-download.tar.gz
Source3:        gnupg.keys
Patch0:         scratchbox-1.0.17-drop-debian-clean.patch
Patch1:         scratchbox-1.0.17-drop-darcs-changelog.patch
Patch2:         scratchbox-1.0.17-use-date.patch
Patch3:         gcc-3.3-needs-autoconf-2.13.patch
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

BuildRequires:  autoconf213 automake14 bison-alt darcs debhelper dpatch dpkg gnupg realpath xtermset
#Requires:       

%description
Scratchbox is a cross-compilation toolkit designed to make embedded Linux
application development easier. It also provides a full set of tools to
integrate and cross-compile an entire Linux distribution.

%package core
Summary:        Scratchbox base system

%description core
Development tools.

%package libs
Summary:        Scratchbox libraries

%description libs
Libraries and includes required by compilers and tools.

%package toolchain-host-gcc
Summary:        Scratchbox host-gcc toolchain

%description toolchain-host-gcc
Compiler for host architecture.

%prep
%setup -n %{name} -q
%setup -n %{name} -D -T -a 2
gpg --import %{_sourcedir}/gnupg.keys
%patch0
%patch1
%patch2
%patch3
echo "ROOT_DIR=$RPM_BUILD_ROOT" > .gar-local.conf


%build
# % configure
#make %{?_smp_mflags}
make doc/ChangeLog
make base
make host-gcc
make tools
make post-install
make docs

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/sbin
ln -s /scratchbox/sbin/sbox_adduser      $RPM_BUILD_ROOT/usr/sbin/sb-adduser
mkdir -p $RPM_BUILD_ROOT/usr/bin
ln -s /scratchbox/login                  $RPM_BUILD_ROOT/usr/bin/scratchbox
ln -s /scratchbox/tools/bin/sb-menu      $RPM_BUILD_ROOT/usr/bin/sb-menu
ln -s /scratchbox/tools/bin/sb-conf      $RPM_BUILD_ROOT/usr/bin/sb-conf
ln -s /scratchbox/tools/bin/sbrsh-conf   $RPM_BUILD_ROOT/usr/bin/sbrsh-conf
ln -s /scratchbox/tools/bin/sb-reinstall $RPM_BUILD_ROOT/usr/bin/sb-reinstall
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/scratchbox-core/doc
ln -s /scratchbox/doc                    $RPM_BUILD_ROOT/usr/share/doc/scratchbox-core/doc

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc
/scratchbox/tools/autotools/
/scratchbox/tools/bin/
/scratchbox/tools/deb_list/
/scratchbox/tools/etc/
/scratchbox/tools/include/
/scratchbox/tools/lib/
/scratchbox/tools/libexec/
/scratchbox/tools/share/
/scratchbox/tools/var/
/scratchbox/sbin/
/scratchbox/etc/
/scratchbox/doc/
/scratchbox/packages/
/scratchbox/login
/scratchbox/run_me_first.sh
/scratchbox/README

%files libs
/scratchbox/host_shared/
/scratchbox/compilers/bin/
/scratchbox/compilers/host-gcc/lib/ld-linux.so.*

%files toolchain-host-gcc
/scratchbox/compilers/host-gcc/bin
/scratchbox/compilers/host-gcc/compiler-name
/scratchbox/compilers/host-gcc/host-gcc.specs
/scratchbox/compilers/host-gcc/lib/gcc-lib
/scratchbox/compilers/host-gcc/lib/ldscripts
/scratchbox/compilers/host-gcc/lib/*.so
/scratchbox/tools/alien_bin/

%changelog
* Thu Jan 07 2009 Sven Herzberg <herzi@gnome-de.org> - 1.0.17-2.1
- depend on dpatch, now we're able to finish everything up to gcc's
  configure stage; now we need debhelper

* Thu Jan 07 2009 Sven Herzberg <herzi@gnome-de.org> - 1.0.17-1.1
- initial packaging
- scratchbox-base builds successfully
- host-gcc's gcc-3.3 passes these problematic patches:
  - debian/patches/libf2c-update.dpatch
  - debian/patches/libffi-no-debug.dpatch

# vim:set et: