# Maintainer: Natanael Copa pkgname=dtc pkgver=1.5.1 pkgrel=0 pkgdesc="Device Tree Compiler" url="https://git.kernel.org/pub/scm/utils/dtc/dtc.git/" arch="all" license="GPL-2.0-or-later" makedepends="$depends_dev bison flex" checkdepends="coreutils" subpackages="$pkgname-dev libfdt" source="https://kernel.org/pub/software/utils/dtc/dtc-$pkgver.tar.xz " prepare() { default_prepare sed -i s:-Werror::g "$builddir"/Makefile } build() { cd "$builddir" make } check() { cd "$builddir" make check } package() { cd "$builddir" make -j1 DESTDIR="$pkgdir" PREFIX=/usr install rm -f "$pkgdir"/usr/lib/*.a } libfdt() { pkgdesc="Device tree library" mkdir -p "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/lib/libfdt* "$subpkgdir"/usr/lib/ } sha512sums="9e17103d791c71f1ad5d86ab6ac629d523d9add684c9cccb1624214d6c65e5c29776c23a2ad70597420b043bb5dfd412bf4beafd74729f02309d399d9639da83 dtc-1.5.1.tar.xz"