void-packages/srcpkgs/base-system-busybox/template

45 lines
1.4 KiB
Text

# Build template for 'base-system-busybox'.
pkgname=base-system-busybox
version=1.21.1
revision=2
wrksrc="busybox-${version}"
homepage="http://www.busybox.net"
makedepends="perl"
short_desc="The Swiss Army Knife of Embedded Linux - base-system replacements"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
distfiles="${homepage}/downloads/busybox-$version.tar.bz2"
checksum=cd5be0912ec856110ae12c76c3ec9cd5cba1df45b5a9da2b095b8284d1481303
# Applets provided by this busybox version.
# Keep this list updated with ${FILESDIR}/dotconfig.
#
# XXX bzip2 provides libbz2, split it into libbz2 pkg.
_FEATURES="acpid coreutils cpio dash diffutils dosfstools findutils gawk
grep gzip hdparm ifenslave iproute2 iputils less lsof netcat nvi
patch powertop procps-ng psmisc rfkill run-parts sed tar
traceroute util-linux wget which whois xz"
for f in ${_FEATURES}; do
provides+="${f}-${version}_${revision} "
replaces+="${f}>=0 "
done
do_build() {
cp -f ${FILESDIR}/dotconfig .config
if [ "$CROSS_BUILD" ]; then
sed -e "s,\(CONFIG_CROSS_COMPILER_PREFIX\).*,\1=\"${XBPS_CROSS_TRIPLET}-\",g" -i .config
fi
make ${makejobs}
}
do_install() {
# Install everything to /usr/bin.
vmkdir usr/bin
for f in bin sbin usr/sbin; do
ln -sfr ${DESTDIR}/usr/bin ${DESTDIR}/${f}
done
make CONFIG_PREFIX=${DESTDIR} install
vinstall ${FILESDIR}/udhcpc-default.script \
755 usr/share/udhcpc default.script
rm -f ${DESTDIR}/{bin,sbin,usr/sbin}
}