diff --git a/srcpkgs/u-boot-tools/template b/srcpkgs/u-boot-tools/template new file mode 100644 index 00000000000..b86fe1e7298 --- /dev/null +++ b/srcpkgs/u-boot-tools/template @@ -0,0 +1,48 @@ +# Template file for 'u-boot-tools' +pkgname=u-boot-tools +version=2020.01 +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 " +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=aa453c603208b1b27bd03525775a7f79b443adec577fdc6e8f06974025a135f1 + +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 +} diff --git a/srcpkgs/uboot-mkimage/update b/srcpkgs/u-boot-tools/update similarity index 100% rename from srcpkgs/uboot-mkimage/update rename to srcpkgs/u-boot-tools/update diff --git a/srcpkgs/uboot-mkimage b/srcpkgs/uboot-mkimage new file mode 120000 index 00000000000..ab4e0db7cd5 --- /dev/null +++ b/srcpkgs/uboot-mkimage @@ -0,0 +1 @@ +uboot-tools \ No newline at end of file diff --git a/srcpkgs/uboot-mkimage/template b/srcpkgs/uboot-mkimage/template deleted file mode 100644 index 0e63e3623e2..00000000000 --- a/srcpkgs/uboot-mkimage/template +++ /dev/null @@ -1,26 +0,0 @@ -# Template file for 'uboot-mkimage' -pkgname=uboot-mkimage -version=2014.01 -revision=5 -wrksrc="u-boot-${version}" -short_desc="The U-Boot mkimage utility" -maintainer="Orphaned " -license="GPL-2" -homepage="http://www.denx.de/wiki/U-Boot/WebHome" -distfiles="ftp://ftp.denx.de/pub/u-boot/u-boot-${version}.tar.bz2" -checksum=cdaf8c81583abfa2e73da46cfcf87b0cbd9741d9aa766f3b905376e3652d543d - -do_configure() { - sed -i 's,ulong,unsigned long,g' include/*.[ch] common/*.[ch] tools/*.[ch] -} -do_build() { - if [ -n "$XBPS_CROSS_TRIPLET" ]; then - make HOSTSTRIP=: HOSTCC="$XBPS_CROSS_TRIPLET-gcc $CFLAGS $LDFLAGS" tools - else - make HOSTSTRIP=: HOSTCC="$CC $CFLAGS $LDFLAGS" tools - fi -} -do_install() { - vbin tools/mkimage - vman doc/mkimage.1 -}