void-packages/srcpkgs/u-boot-tools/template

49 lines
1.3 KiB
Bash

# Template file for 'u-boot-tools'
pkgname=u-boot-tools
version=2020.04
revision=1
wrksrc="u-boot-${version}"
build_style=gnu-makefile
make_build_args="HOSTSTRIP=: STRIP=:"
make_build_target="tools envtools"
hostmakedepends="bison flex"
makedepends="libressl-devel"
short_desc="Das U-Boot tools"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.denx.de/wiki/U-Boot/"
distfiles="ftp://ftp.denx.de/pub/u-boot/u-boot-${version}.tar.bz2"
checksum=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
if [ "$CROSS_BUILD" ]; then
make_build_args+=" CROSS_BUILD_TOOLS=y CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
fi
post_extract() {
touch include/stddef.h # musl hack
vsed '1itypedef unsigned long ulong;' \
-i include/image.h \
-i include/env.h \
-i tools/mkimage.h \
-i tools/proftool.c
}
do_configure() {
make ${makejobs} ${make_build_args} tools-only_defconfig
}
do_install() {
ln -sf fw_printenv tools/env/fw_setenv
for x in dumpimage fdtgrep fit_check_sign fit_info gen_eth_addr \
gen_ethaddr_crc ifwitool img2srec mkenvimage mkimage proftool \
spl_size_limit env/fw_printenv env/fw_setenv; do
vbin "tools/$x"
done
vman doc/mkimage.1
}
uboot-mkimage_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - (transitional meta package)"
build_style=meta
}