-Version: 0.29alpha
-Release: 1
-Group: System/Utilities
-Summary: BusyBox is a tiny suite of Unix utilities in a multi-call binary.
-Copyright: GPL
-Packager : Erik Andersen <andersen@lineo.com>
-Conflicts: fileutils grep shellutils
-Buildroot: /tmp/%{Name}-%{Version}
-Source: busybox-0.29a1.tar.gz
-
-%Description
-BusyBox is a suite of "tiny" Unix utilities in a multi-call binary. It
-provides a pretty complete environment that fits on a floppy or in a
-ROM. Just add "ash" (Keith Almquists tiny Bourne shell clone) and "ae",
-and a kernel and you have a full system. This is used on the Debian
-install disk and in an internet router, and it makes a good environment
-for a "rescue" disk or any small or embedded system.
-
-%Prep
-%setup -q -n busybox
-
-%Build
-make
-
-%Install
-rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/bin
-h=`cat busybox.links`
+Version: 1.15.1
+Release: 1%{?dist}
+Epoch: 1
+License: GPLv2
+Group: System Environment/Shells
+Source: http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
+Source1: busybox-static.config
+Source2: busybox-petitboot.config
+Source3: http://www.uclibc.org/downloads/uClibc-0.9.30.1.tar.bz2
+Source4: uClibc.config
+Patch16: busybox-1.10.1-hwclock.patch
+# patch to avoid conflicts with getline() from stdio.h, already present in upstream VCS
+Patch22: uClibc-0.9.30.1-getline.patch
+Obsoletes: busybox-anaconda
+URL: http://www.busybox.net
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: libselinux-devel >= 1.27.7-2
+BuildRequires: libsepol-devel
+BuildRequires: libselinux-static
+BuildRequires: libsepol-static
+BuildRequires: glibc-static
+
+%define debug_package %{nil}
+
+%package petitboot
+Group: System Environment/Shells
+Summary: Version of busybox configured for use with petitboot
+
+%description
+Busybox is a single binary which includes versions of a large number
+of system commands, including a shell. This package can be very
+useful for recovering from certain types of system failures,
+particularly those involving broken shared libraries.
+
+%description petitboot
+Busybox is a single binary which includes versions of a large number
+of system commands, including a shell. The version contained in this
+package is a minimal configuration intended for use with the Petitboot
+bootloader used on PlayStation 3. The busybox package provides a binary
+better suited to normal use.
+
+%prep
+%setup -q -a3
+%patch16 -b .ia64 -p1
+cat %{SOURCE4} >uClibc-0.9.30.1/.config1
+%patch22 -b .getline -p1