Browse Source

busybox: update to 1.18.4, build with system uClibc, update configs

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@3963 ec354946-7b23-47d6-9f5a-488ba84defc7
daisuke 13 years ago
parent
commit
845d1e99dd
1 changed files with 35 additions and 48 deletions
  1. 35 48
      b/busybox/busybox-vl.spec

+ 35 - 48
b/busybox/busybox-vl.spec

@@ -1,22 +1,21 @@
-%define uclibc_version 0.9.30.1
-
 Summary: Statically linked binary providing simplified versions of system commands
 Name: busybox
-Version: 1.13.4
-Release: 2%{?_dist_release}
+Version: 1.18.4
+Release: 1%{?_dist_release}
 License: GPLv2
 Group: System Environment/Shells
 Source: http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
-Source2: http://www.uclibc.org/downloads/uClibc-%{uclibc_version}.tar.bz2
-Source3: uClibc.config
-Patch0: busybox-1.12.1-static.patch
-Patch1: busybox-1.12.1-anaconda.patch
+Source10: busybox-static.config
+Source11: busybox-anaconda.config
 Patch12: busybox-1.2.2-ls.patch
-Patch14: busybox-1.9.0-msh.patch
 Patch16: busybox-1.10.1-hwclock.patch
-Patch20: uClibc-0.9.30.1_remove-erroneous-hidden-defs.patch
 URL: http://www.busybox.net
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRequires: uClibc-devel
+
+Vendor: Project Vine
+Distribution: Vine Linux
+Packager: daisuke
 
 %description 
 Busybox is a single binary which includes versions of a large number
@@ -35,40 +34,18 @@ package is designed for use with the Red Hat installation program,
 anaconda. The busybox package provides a binary better suited to
 normal use.
 
+
 %prep
-%setup -q -a2
-%patch0 -b .static -p1
+%setup -q
 %patch12 -b .ls -p1
-%patch14 -b .msh -p1
 %patch16 -b .ia64 -p1
-cat %{SOURCE3} >uClibc-%{uclibc_version}/.config1
-%patch20 -b .hidden-defs -p0
 
 
 %build
-# create static busybox - the executable is kept as busybox-static
-# We use uclibc instead of system glibc, uclibc is several times
-# smaller, this is important for static build.
-# Build uclibc first.
-cd uClibc-%{uclibc_version}
-# fixme:
-mkdir kernel-include
-cp -a /usr/include/asm kernel-include
-cp -a /usr/include/asm-generic kernel-include
-cp -a /usr/include/linux kernel-include
-# uclibc can't be built on ppc64, we set $arch to "" in this case
+# create static busybox
 arch=`uname -m | sed -e 's/i.86/i386/' -e 's/ppc/powerpc/' -e 's/ppc64//' -e 's/powerpc64//'`
-echo "TARGET_$arch=y" >.config
-echo "TARGET_ARCH=\"$arch\"" >>.config
-cat .config1 >>.config
-if test "$arch"; then yes "" | make oldconfig; fi
-if test "$arch"; then cat .config; fi
-if test "$arch"; then make V=1; fi
-if test "$arch"; then make install; fi
-if test "$arch"; then make install_kernel_headers; fi
-cd ..
-# we are back in busybox-NN.MM dir now
-make defconfig
+cp %{SOURCE10} .config
+yes "" | make oldconfig
 # gcc needs to be convinced to use neither system headers, nor libs,
 # nor startfiles (i.e. crtXXX.o files)
 if test "$arch"; then \
@@ -77,43 +54,53 @@ if test "$arch"; then \
     yes "" | make oldconfig && \
     cat .config && \
     make V=1 \
-        EXTRA_CFLAGS="-isystem uClibc-%{uclibc_version}/installed/include" \
-        CFLAGS_busybox="-static -nostartfiles -LuClibc-%{uclibc_version}/installed/lib uClibc-%{uclibc_version}/installed/lib/crt1.o uClibc-%{uclibc_version}/installed/lib/crti.o uClibc-%{uclibc_version}/installed/lib/crtn.o"; \
+        EXTRA_CFLAGS="-isystem %{_includedir}/uClibc" \
+        CFLAGS_busybox="-static -nostartfiles -L%{_libdir}/uClibc %{_libdir}/uClibc/crt1.o %{_libdir}/uClibc/crti.o %{_libdir}/uClibc/crtn.o"; \
 else \
     cat .config && \
     make V=1 CC="gcc $RPM_OPT_FLAGS"; \
 fi
-cp busybox busybox-static
+cp busybox busybox.static
+cp docs/busybox.1 docs/busybox.static.1
+
 # create busybox optimized for anaconda 
 make clean
-# revert the static patches
-patch -R -p1 <%{PATCH0}
-# applied anaconda patch
-patch -b --suffix .anaconda -p1 < %{PATCH1}
-make defconfig
+# 
+cp %{SOURCE11} .config
+yes "" | make oldconfig
 make CONFIG_DEBUG=y CC="gcc $RPM_OPT_FLAGS"
 cp busybox busybox.anaconda
+cp docs/busybox.1 docs/busybox.anaconda.1
 
 %install
 rm -rf $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT/sbin
-install -m 755 busybox-static $RPM_BUILD_ROOT/sbin/busybox
+install -m 755 busybox.static $RPM_BUILD_ROOT/sbin/busybox
 install -m 755 busybox.anaconda $RPM_BUILD_ROOT/sbin/busybox.anaconda
+mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
+install -m 644 docs/busybox.static.1 $RPM_BUILD_ROOT/%{_mandir}/man1/busybox.1
+install -m 644 docs/busybox.anaconda.1 $RPM_BUILD_ROOT/%{_mandir}/man1/busybox.anaconda.1
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-%doc LICENSE docs/busybox.net/*.html docs/busybox.net/images/*
+%doc LICENSE README
 /sbin/busybox
+%{_mandir}/man1/busybox.1.gz
 
 %files anaconda
 %defattr(-,root,root,-)
-%doc LICENSE docs/busybox.net/*.html docs/busybox.net/images/*
+%doc LICENSE README
 /sbin/busybox.anaconda
+%{_mandir}/man1/busybox.anaconda.1.gz
 
 %changelog
+* Mon May 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.18.4-1
+- update to 1.18.4
+- build with system uClibc
+
 * Fri May 08 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.13.4-2
 - add Patch20 to fix build failure on ppc
   http://lists.uclibc.org/pipermail/uclibc-cvs/2009-January/025891.html