# Maintainer: Natanael Copa pkgname=busybox pkgver=1.15.3 pkgrel=0 pkgdesc="Size optimized toolbox of many common UNIX utilities" url=http://busybox.net license="GPL-2" depends= install="$pkgname.post-install $pkgname.post-upgrade" triggers="busybox.trigger:/bin /usr/bin /sbin /usr/sbin /lib/modules/*" source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2 $pkgname-1.11.1-bb.patch 0001-mount-move-resolve_mount_spec-to-volume_id.patch 0002-swaponoff-add-uuid-label-support.patch busyboxconfig" build() { cd "$srcdir"/$pkgname-$pkgver #patches for i in ../*.patch; do msg "Applying $i" if ! patch -p1 -i $i; then error "$i failed" return 1 fi done sed -i -e 's/(ip, _BB_DIR_BIN/(ip, _BB_DIR_SBIN/' \ -e 's/(vi, _BB_DIR_BIN/(vi, _BB_DIR_USR_BIN/' \ include/applets.h || return 1 # we set the install prefix with sed since it might differ depending # on abuild version sed -e "s:^CONFIG_PREFIX=.*:CONFIG_PREFIX=\"$pkgdir\":" \ ../busyboxconfig > .config make silentoldconfig || return 1 make || return 1 } package() { cd "$srcdir"/$pkgname-$pkgver make install DESTDIR="$pkgdir" mkdir -p "$pkgdir"/usr/sbin "$pkgdir"/usr/bin "$pkgdir"/tmp \ "$pkgdir"/var/cache/misc chmod 1777 "$pkgdir"/tmp # we need /bin/sh to be able to execute post-install ln -s /bin/busybox "$pkgdir"/bin/sh } md5sums="6059ac9456de6fb18dc8ee4cd0ec9240 busybox-1.15.3.tar.bz2 4c0f3b486eaa0674961b7ddcd0c60a9b busybox-1.11.1-bb.patch f928cadef10307c2f14202cfaf3c038c 0001-mount-move-resolve_mount_spec-to-volume_id.patch 82310729ab41d703f3584bc9920dd712 0002-swaponoff-add-uuid-label-support.patch 18c1ae8997b2a609f0633a01472060ed busyboxconfig"