aboutsummaryrefslogtreecommitdiffstats
path: root/main/dtc/APKBUILD
blob: c4dc56b637afa3a6e1354db950d0be282303e1c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dtc
pkgver=1.5.0
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"
depends=""
depends_dev=""
makedepends="$depends_dev bison flex"
checkdepends="coreutils"
install=""
subpackages="$pkgname-dev libfdt"
source="https://kernel.org/pub/software/utils/dtc/dtc-$pkgver.tar.xz
	"
builddir="$srcdir/dtc-$pkgver"

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
}

libfdt() {
	pkgdesc="Device tree library"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/libfdt* "$subpkgdir"/usr/lib/
}

sha512sums="fd1e692a1b7bf7987f921ad17d9be6719f7b3aa7915873b45fa86f4ecb1398a0a62cdf53c1fddf98a0f7fed9bf34a79f684018bd01a2b5e88746b50879bf7102  dtc-1.5.0.tar.xz"