void-packages/srcpkgs/toybox/template

45 lines
871 B
Bash

# Template file for 'toybox'
pkgname=toybox
version=0.7.3
revision=1
create_wrksrc=yes
short_desc="A BSD-licensed alternative to busybox"
maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
license="BSD"
homepage="http://www.landley.net/toybox"
distfiles="${homepage}/downloads/${pkgname}-${version}.tar.gz"
checksum=e6469b508224e0d2e4564dda05c4bb47aef5c28bf29d6c983bcdc6e3a0cd29d6
post_extract() {
mv toybox{-${version},}
cp -r toybox{,-static}
}
do_build() {
export NOSTRIP=1
# toybox
cd toybox
make defconfig
make ${makejobs} toybox
# toybox-static
cd ../toybox-static
make defconfig
make ${makejobs} LDFLAGS="--static" toybox
}
do_install() {
vbin toybox/toybox
vlicense toybox/LICENSE
}
toybox-static_package() {
short_desc+=" - statically linked"
pkg_install() {
vbin toybox-static/toybox toybox.static
vlicense toybox-static/LICENSE
}
}