# $Id: busybox-1.15.3-r3.smage2 546 2010-05-08 10:58:18Z niro $ PNAME="busybox" PVER="1.17.3" PBUILD="r1" PCATEGORIE="sys-apps" STATE="unstable" DESCRIPTION="BusyBox combines tiny versions of many common UNIX utilities into a single small executable." HOMEPAGE="http://www.busybox.net/" DEPEND="" # busbox config CVS revision CFG_CVS_REV=1.10 # udhcpc client script CVS revision UDHCPC_CVS_REV=1.1 SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools SRC_URI=( http://www.busybox.net/downloads/${SRCFILE} mirror://busybox/${SRCFILE} mirror://busybox/config-${CFG_CVS_REV} mirror://busybox/udhcpc.sh-${UDHCPC_CVS_REV} mirror://busybox/de.kmap.gz mirror://busybox/${PNAME}-1.15.3-flags.patch ) src_prepare() { munpack ${SRCFILE} || die munpack de.kmap.gz ${SRCDIR} || die cd ${SRCDIR} # magellan patches # remove broken cflags mpatch ${PNAME}-1.15.3-flags.patch || die # using a custom config cp ${SOURCEDIR}/${PNAME}/config-${CFG_CVS_REV} .config || die # disable ps wide options, it breaks commands linke ps -e etc sed -i 's/.*\(CONFIG_FEATURE_PS_WIDE\).*/#\ \1 is not set/' .config || die # disable blkid, we're using the full-featured version from util-linux # which has ftype guessing features and a better uuid handling sed -i 's/.*\(CONFIG_BLKID\).*/#\ \1 is not set/' .config || die # enable advanced fbsplash features provided by tykefs patch echo "CONFIG_FEATURE_FBSPLASH_8BPP=y" >> .config || die echo "CONFIG_FEATURE_FBSPLASH_SPRITES=y" >> .config || die echo "CONFIG_FEATURE_FBSPLASH_TEXT=y" >> .config || die echo "CONFIG_FEATURE_FBSPLASH_FONTLOAD=y" >> .config || die } src_compile() { cd ${SRCDIR} make oldconfig || die mmake || die # create a busybox.links file HOSTCC=gcc sh applets/busybox.mkll | sort > busybox.links || die # fix missing applet symlinks echo "/bin/du" >> busybox.links || die # do not use ash as default sh, we want bin/bash sed -i '/bin\/sh/d' busybox.links || die # use poweroff as default halt command sed -i '/sbin\/halt/d' busybox.links || die echo -e '#!/bin/sh\n/sbin/poweroff $*' > halt.sh || die } src_install() { cd ${SRCDIR} minstalldir /bin || die minstallexec busybox /bin || die minstalldir /sbin || die minstallexec halt.sh /sbin/halt || die minstalldir /usr/share/busybox || die minstallfile busybox.links /usr/share/busybox || die minstalldir /usr/share/busybox/keymaps || die minstallfile de.kmap /usr/share/busybox/keymaps || die minstalldir /usr/share/udhcpc || die minstallexec -s udhcpc.sh-${UDHCPC_CVS_REV} /usr/share/udhcpc/default.script || die }