# $Id: busybox-1.15.3-r3.smage2 546 2010-05-08 10:58:18Z niro $ PNAME="busybox" PVER="1.17.4" PBUILD="r7" 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="" PROVIDE="virtual/sed virtual/tar virtual/usbutils virtual/pciutils virtual/debianutils virtual/which virtual/wget virtual/grep virtual/bzip2 virtual/gzip virtual/devmanager" # busbox config CVS revision CFG_CVS_REV=1.13 # udhcpc client script CVS revision UDHCPC_CVS_REV=1.1 # mdev.r cvs revision MDEVRC_CVS_REV=1.3 # mdev.conf cvs revision MDEVCONF_CVS_REV=1.2 # syslogd.rc cvs revision SYSLOGD_CVS_REV=1.3 # splash.conf cvs revision SPLASHCONF_CVS_REV=1.2 # splash-functions.rc cvs revision SPLASHRC_CVS_REV=1.2 SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" MISC_PVER="0.1.8" MISC_SRCFILE="miscsplashutils-${MISC_PVER}.tar.bz2" MISC_SRCDIR="${BUILDDIR}/miscsplashutils-${MISC_PVER}" SPLASHTHEME_PVER="1.1" SPLASHTHEME_SRCFILE="mcore-theme-busybox-${SPLASHTHEME_PVER}.tar.bz2" SPLASHTHEME_SRCDIR="${BUILDDIR}/mcore-theme-busybox-${SPLASHTHEME_PVER}" sminclude mtools SRC_URI=( http://www.busybox.net/downloads/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/config-${CFG_CVS_REV} mirror://${PNAME}/udhcpc.sh-${UDHCPC_CVS_REV} mirror://${PNAME}/de.kmap.gz mirror://${PNAME}/mdev.rc-${MDEVRC_CVS_REV} mirror://${PNAME}/mdev.conf-${MDEVCONF_CVS_REV} mirror://${PNAME}/dvbdev.sh mirror://${PNAME}/ide_links.sh mirror://${PNAME}/usbdev.sh mirror://${PNAME}/usbdisk_link.sh mirror://${PNAME}/syslogd.rc-${SYSLOGD_CVS_REV} mirror://${PNAME}/splash-functions.rc-${SPLASHRC_CVS_REV} mirror://${PNAME}/splash.conf-${SPLASHCONF_CVS_REV} mirror://${PNAME}/${PNAME}-1.15.3-flags.patch mirror://${PNAME}/${PNAME}-${PVER}-fbsplash-tykef-1.0.patch http://dev.gentoo.org/~spock/projects/gensplash/current/${MISC_SRCFILE} mirror://${PNAME}/${MISC_SRCFILE} mirror://${PNAME}/${SPLASHTHEME_SRCFILE} ) src_prepare() { munpack ${SRCFILE} || die munpack de.kmap.gz ${SRCDIR} || die munpack ${MISC_SRCFILE} || die munpack ${SPLASHTHEME_SRCFILE} || die cd ${SRCDIR} # official patches # magellan patches # remove broken cflags mpatch ${PNAME}-1.15.3-flags.patch || die # enhanced fbsplash from tykef # http://tykef.havlinda.net/programovani/fbsplash/ mpatch ${PNAME}-${PVER}-fbsplash-tykef-1.0.patch || die # using a custom config cp ${SOURCEDIR}/${PNAME}/config-${CFG_CVS_REV} .config || die # disable static linking atm, broken with glibc-2.12 sed -i 's/.*\(CONFIG_STATIC\).*/#\ \1 is not set/' .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 cd ${MISC_SRCDIR} mmake fbres || die } src_install() { cd ${SRCDIR} minstalldir /bin || die minstallexec busybox /bin || die # set suid bit for suid applets like su mchmod +s /bin/busybox || 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 minstallrc mdev.rc-${MDEVRC_CVS_REV} mdev || die minstalldir /etc || die minstallfile -s mdev.conf-${MDEVCONF_CVS_REV} /etc/mdev.conf || die # install mdev-helpers minstalldir /lib/mdev || die minstallexec -s dvbdev.sh /lib/mdev/devbdev || die minstallexec -s ide_links.sh /lib/mdev/ide_links || die minstallexec -s usbdev.sh /lib/mdev/usbdev || die minstallexec -s usbdisk_link.sh /lib/mdev/usbdisk_link || die # install syslogd rc script minstallrc syslogd.rc-${SYSLOGD_CVS_REV} syslogd || die # install splash-functions minstallrc splash-functions.rc-${SPLASHRC_CVS_REV} splash-functions || die minstalldir /etc/splash || die minstallfile -s splash.conf-${SPLASHCONF_CVS_REV} /etc/splash/splash.conf || die mkfifo ${BINDIR}/etc/splash/fbfifo || die # install fbres for splash minstallexec ${MISC_SRCDIR}/fbres || die # install fbsplash theme cd ${SPLASHTHEME_SRCDIR} make DESTDIR=${BINDIR} install || die # set mcore theme as default mlink mcore /etc/splash/themes/default || die # disable config_protection for themes minstalldir /etc/env.d || die echo "CONFIG_PROTECT_MASK=/etc/splash/themes" > ${BINDIR}/etc/env.d/15splash || die } postinstall() { if [[ ! -p ${MROOT}/etc/splash/fbfifo ]] then mkfifo ${MROOT}/etc/splash/fbfifo fi mstartservice syslogd } postremove() { mstopservice syslogd }