Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/examples/busybox.spec

    r1765 r2725  
    1 %define name    busybox
    2 %define epoch   0
    3 %define version 0.61.pre
    4 %define release %(date -I | sed -e 's/-/_/g')
    5 %define serial  1
     1Summary: Statically linked binary providing simplified versions of system commands
     2Name: busybox
     3Version: 1.15.1
     4Release: 1%{?dist}
     5Epoch: 1
     6License: GPLv2
     7Group: System Environment/Shells
     8Source: http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
     9Source1: busybox-static.config
     10Source2: busybox-petitboot.config
     11Source3: http://www.uclibc.org/downloads/uClibc-0.9.30.1.tar.bz2
     12Source4: uClibc.config
     13Patch16: busybox-1.10.1-hwclock.patch
     14# patch to avoid conflicts with getline() from stdio.h, already present in upstream VCS
     15Patch22: uClibc-0.9.30.1-getline.patch
     16Obsoletes: busybox-anaconda
     17URL: http://www.busybox.net
     18BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
     19BuildRequires: libselinux-devel >= 1.27.7-2
     20BuildRequires: libsepol-devel
     21BuildRequires: libselinux-static
     22BuildRequires: libsepol-static
     23BuildRequires: glibc-static
    624
    7 Name:    %{name}
    8 #Epoch:   %{epoch}
    9 Version: %{version}
    10 Release: %{release}
    11 Serial:  %{serial}
    12 Copyright: GPL
    13 Group: System/Utilities
    14 Summary: BusyBox is a tiny suite of Unix utilities in a multi-call binary.
    15 URL:     http://busybox.net/
    16 Source:  ftp://busybox.net/busybox/%{name}-%{version}.tar.gz
    17 Buildroot: /var/tmp/%{name}-%{version}
    18 Packager : Erik Andersen <andersen@codepoet.org>
     25%define debug_package %{nil}
    1926
    20 %Description
    21 BusyBox combines tiny versions of many common UNIX utilities into a single
    22 small executable. It provides minimalist replacements for most of the utilities
    23 you usually find in fileutils, shellutils, findutils, textutils, grep, gzip,
    24 tar, etc.  BusyBox provides a fairly complete POSIX environment for any small
    25 or emdedded system.  The utilities in BusyBox generally have fewer options then
    26 their full featured GNU cousins; however, the options that are provided behave
    27 very much like their GNU counterparts.
     27%package petitboot
     28Group: System Environment/Shells
     29Summary: Version of busybox configured for use with petitboot
    2830
    29 %Prep
    30 %setup -q -n %{name}-%{version}
     31%description
     32Busybox is a single binary which includes versions of a large number
     33of system commands, including a shell.  This package can be very
     34useful for recovering from certain types of system failures,
     35particularly those involving broken shared libraries.
    3136
    32 %Build
    33 make
     37%description petitboot
     38Busybox is a single binary which includes versions of a large number
     39of system commands, including a shell.  The version contained in this
     40package is a minimal configuration intended for use with the Petitboot
     41bootloader used on PlayStation 3. The busybox package provides a binary
     42better suited to normal use.
    3443
    35 %Install
     44%prep
     45%setup -q -a3
     46%patch16 -b .ia64 -p1
     47cat %{SOURCE4} >uClibc-0.9.30.1/.config1
     48%patch22 -b .getline -p1
     49
     50%build
     51# create static busybox - the executable is kept as busybox-static
     52# We use uclibc instead of system glibc, uclibc is several times
     53# smaller, this is important for static build.
     54# Build uclibc first.
     55cd uClibc-0.9.30.1
     56# fixme:
     57mkdir kernel-include
     58cp -a /usr/include/asm kernel-include
     59cp -a /usr/include/asm-generic kernel-include
     60cp -a /usr/include/linux kernel-include
     61# uclibc can't be built on ppc64,s390,ia64, we set $arch to "" in this case
     62arch=`uname -m | sed -e 's/i.86/i386/' -e 's/ppc/powerpc/' -e 's/ppc64//' -e 's/powerpc64//' -e 's/ia64//' -e 's/s390.*//'`
     63echo "TARGET_$arch=y" >.config
     64echo "TARGET_ARCH=\"$arch\"" >>.config
     65cat .config1 >>.config
     66if test "$arch"; then yes "" | make oldconfig; fi
     67if test "$arch"; then cat .config; fi
     68if test "$arch"; then make V=1; fi
     69if test "$arch"; then make install; fi
     70if test "$arch"; then make install_kernel_headers; fi
     71cd ..
     72# we are back in busybox-NN.MM dir now
     73cp %{SOURCE1} .config
     74# set all new options to defaults
     75yes "" | make oldconfig
     76# gcc needs to be convinced to use neither system headers, nor libs,
     77# nor startfiles (i.e. crtXXX.o files)
     78if test "$arch"; then \
     79    mv .config .config1 && \
     80    grep -v ^CONFIG_SELINUX .config1 >.config && \
     81    yes "" | make oldconfig && \
     82    cat .config && \
     83    make V=1 \
     84        EXTRA_CFLAGS="-isystem uClibc-0.9.30.1/installed/include" \
     85        CFLAGS_busybox="-static -nostartfiles -LuClibc-0.9.30.1/installed/lib uClibc-0.9.30.1/installed/lib/crt1.o uClibc-0.9.30.1/installed/lib/crti.o uClibc-0.9.30.1/installed/lib/crtn.o"; \
     86else \
     87    cat .config && \
     88    make V=1 CC="gcc $RPM_OPT_FLAGS"; \
     89fi
     90cp busybox busybox.static
     91
     92# create busybox optimized for petitboot
     93make clean
     94# copy new configuration file
     95cp %{SOURCE2} .config
     96# set all new options to defaults
     97yes "" | make oldconfig
     98make V=1 CC="%__cc $RPM_OPT_FLAGS"
     99cp busybox busybox.petitboot
     100
     101%install
    36102rm -rf $RPM_BUILD_ROOT
    37 make CONFIG_PREFIX=$RPM_BUILD_ROOT install
     103mkdir -p $RPM_BUILD_ROOT/sbin
     104install -m 755 busybox.static $RPM_BUILD_ROOT/sbin/busybox
     105install -m 755 busybox.petitboot $RPM_BUILD_ROOT/sbin/busybox.petitboot
    38106
    39 %Clean
     107%clean
    40108rm -rf $RPM_BUILD_ROOT
    41109
    42 %Files
    43 %defattr(-,root,root)
    44 /
     110%files
     111%defattr(-,root,root,-)
     112%doc LICENSE docs/busybox.net/*.html
     113/sbin/busybox
     114
     115%files petitboot
     116%defattr(-,root,root,-)
     117%doc LICENSE
     118/sbin/busybox.petitboot
     119
     120%changelog
Note: See TracChangeset for help on using the changeset viewer.