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

62 lines
1.8 KiB
Plaintext
Raw Normal View History

2013-12-08 13:14:00 +01:00
# Build template for 'base-system-busybox'.
pkgname=base-system-busybox
2014-02-10 11:57:53 +01:00
version=1.22.1
revision=17
wrksrc="busybox-${version}"
homepage="http://www.busybox.net"
2014-02-10 11:57:53 +01:00
hostmakedepends="perl"
2013-12-08 13:14:00 +01:00
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"
2014-02-10 11:57:53 +01:00
checksum=ae0b029d0a9e4dd71a077a790840e496dd838998e4571b87b60fed7462b6678b
register_shell="/bin/sh"
conflicts="base-system>=0"
# Applets provided by this busybox version.
# Keep this list updated with ${FILESDIR}/dotconfig.
#
# XXX bzip2 provides libbz2, split it into libbz2 pkg.
# XXX pgrep/pkill do not support -s0,1 required by runit-void.
# XXX sysctl --system unsupported
#
_FEATURES="acpid coreutils cpio dash diffutils dosfstools findutils awk
grep gzip hdparm ifenslave iproute2 iputils less lsof netcat nvi
patch powertop psmisc rfkill run-parts sed tar
traceroute util-linux wget which whois xz ncurses"
for f in ${_FEATURES}; do
provides+="${f}-${version}_${revision} "
conflicts+="${f}>=0 "
done
depends="base-files runit-void xbps kbd eudev shadow kmod ncurses-base procps-ng"
case "$XBPS_TARGET_MACHINE" in
*-musl) depends+=" musl";;
esac
2014-02-10 11:57:53 +01:00
pre_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
2014-02-10 11:57:53 +01:00
}
do_build() {
make ${makejobs}
}
do_install() {
2014-09-20 09:50:28 +02:00
# Install everything to /usr/bin and /usr/sbin.
vmkdir usr/bin
2014-09-20 09:50:28 +02:00
vmkdir usr/sbin
for f in bin sbin; do
ln -sfr ${DESTDIR}/usr/$f ${DESTDIR}/${f}
2013-12-08 13:14:00 +01:00
done
make CONFIG_PREFIX=${DESTDIR} install
vinstall ${FILESDIR}/udhcpc-default.script \
755 usr/share/udhcpc default.script
2014-09-20 09:50:28 +02:00
rm -f ${DESTDIR}/{,s}bin
# Provide /sbin/init symlink to runit.
ln -s /usr/bin/runit-init ${DESTDIR}/usr/sbin/init
}