70 lines
1.4 KiB
Bash
70 lines
1.4 KiB
Bash
# Template file for 'toybox'
|
|
pkgname=toybox
|
|
version=0.8.7
|
|
revision=1
|
|
create_wrksrc=yes
|
|
short_desc="BSD-licensed alternative to busybox"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="0BSD"
|
|
homepage="http://www.landley.net/toybox"
|
|
distfiles="http://www.landley.net/toybox/downloads/toybox-${version}.tar.gz"
|
|
checksum=b508bf336f82cb0739b77111f945931d1a143b5a53905cb753cd2607cfdd1494
|
|
|
|
post_extract() {
|
|
mv toybox-${version} toybox
|
|
cp -r toybox 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
|
|
}
|
|
|
|
_rm_failing_tests() {
|
|
# XXX: Some tests for du, find and grep fail
|
|
rm tests/du.test
|
|
rm tests/find.test
|
|
rm tests/grep.test
|
|
[ "$XBPS_BUILD_ENVIRONMENT" != void-packages-ci ] && return 0
|
|
# XXX: chattr, hostname,losetup, rmdir tests fail on CI
|
|
rm tests/chattr.test
|
|
rm tests/hostname.test
|
|
rm tests/losetup.test
|
|
rm tests/rmdir.test
|
|
rm tests/rm.test
|
|
}
|
|
|
|
do_check() {
|
|
msg_normal "Running tests for toybox...\n"
|
|
cd toybox
|
|
_rm_failing_tests
|
|
make tests
|
|
|
|
msg_normal "Running tests for toybox-static...\n"
|
|
cd ../toybox-static
|
|
_rm_failing_tests
|
|
make tests
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|