# SliTaz package receipt. PACKED_SIZE="292.0K" UNPACKED_SIZE="760.0K" PACKAGE="busybox" VERSION="1.28-20170822" GIT_TAG="753c4045e4f287fc4b4788afd94f58738a7f04b4" CATEGORY="base-system" SHORT_DESC="Busybox combines tiny versions of many common UNIX utilities." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="GPL2" [ -n "$TARGET" ] || TARGET="i486" DEPENDS="" BUILD_DEPENDS="bzip2 uclibc-cross-compiler-$TARGET wget" TARBALL="$PACKAGE-$VERSION.tar.bz2" WEB_SITE="http://www.busybox.net/" WGET_URL="https://git.busybox.net/busybox/snapshot/busybox-$GIT_TAG.tar.bz2" CONFIG_FILES="/etc/rcS.conf /etc/hostname /etc/fstab /etc/init.d/local.sh" AUTO_SELECTION="always" apply_bb_patchs() { cd $src while read file; do [ -f done.$file ] && continue echo "Apply $file..." patch -p1 < $stuff/$PACKAGE-git-$file || return 1 touch done.$file done < /dev/null | \ awk '/=>/ { print $3 }' | while read file ; do cp -a $file _install/lib while [ -L "$file" ]; do dir="$(dirname $file)/" file="$(readlink $file)" case "$file" in /*) ;; *) file="$dir$file";; esac cp -a "$file" _install/lib done done chown 0.0 _install/lib/* } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir $fs/boot $fs/bin $fs/sbin cp -a $WOK/base-tiny/stuff/. $fs/ cp -a $src/_install/lib $fs/ cp -a $src/_install/bin/busybox $fs/bin for i in /bin/sh /bin/login /bin/false /sbin/mdev /init ; do ln $fs/bin/busybox $fs$i done mkdir -p $fs/etc/init.d # Busybox config files. cp $stuff/busybox.conf $fs/etc chmod 600 $fs/etc/busybox.conf touch $fs/etc/resolv.conf cp $stuff/daemon $fs/etc/init.d for i in crond klogd syslogd ; do grep -qi config_$i=y $src/.config && ln -s daemon $fs/etc/init.d/$i done sed -i 's|network.sh ||' $fs/etc/rcS.conf sed -i 's|.*Executing all initialization scripts.*|echo -n "Setting hostname..."\ hostname -F /etc/hostname\ status\n&|' $fs/etc/init.d/rcS rm -f $fs/etc/init.d/network.sh $fs/etc/network.conf \ $fs/etc/services $fs/etc/networks $fs/etc/inetd.conf \ $fs/etc/host.conf $fs/etc/hosts sed -i '2,$s/^#.*//;/^$/d' $fs/etc/init.d/rc* $fs/etc/init.d/daemon \ $fs/etc/init.d/*.sh sed -i 's/^#.*//;/^$/d' $fs/etc/*.conf $fs/etc/*tab \ $fs/etc/profile $fs/etc/securetty $fs/etc/shells find $fs -exec touch -r $fs {} \; cp $stuff/busybox-git.config $fs/boot/config-busybox } config_form() { if [ -z "$BBHOST" ]; then [ -n "$PASSWORD" ] || PASSWORD=root [ -n "$BBHOST" ] || BBHOST=slitaz [ -n "$FSTAB" ] || FSTAB='/dev/hda1 /mnt ext3 defaults 0 2' [ -n "$RC_LOCAL" ] || RC_LOCAL='[ -x /mnt/boot/init ] && /mnt/boot/init' fi cat < Root password (empty=disable) Host name Filesystems Additional boot commands Do not remove the modules files after loading modules.

Read floppy sector by sector instead of track by track (slow, stupid but safe). EOT } post_install() { chmod 4755 $1/bin/busybox ln -fs /proc/mounts $1/etc/mtab cat >> $1/boot/mkrootfs.pre_exec <> etc/packages.conf cp etc/packages.conf boot/packages.conf rm -f modules fi EOT [ "$STUPID" ] && cat >> $1/boot/mkrootfs.pre_exec < /dev/null cat > $1/root/.profile < $1/etc/hostname [ -n "$FSTAB" ] && dos2unix >> $1/etc/fstab <> $1/etc/init.d/local.sh <