summaryrefslogtreecommitdiff
path: root/main/dtc/APKBUILD
blob: bcaf843f29793d16e0d1fbd5cf9b2a801f1e983d (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dtc
pkgver=1.4.4
pkgrel=0
pkgdesc="Device Tree Compiler"
url="http://devicetree.org/Device_Tree_Compiler"
arch="all"
license="GPL-2.0-or-later"
depends=""
depends_dev=""
makedepends="$depends_dev bison flex"
install=""
subpackages="$pkgname-dev libfdt"
source="https://kernel.org/pub/software/utils/dtc/dtc-$pkgver.tar.xz
	use-tx-as-the-type-specifier-instead-of-zx.patch
	"
builddir="$srcdir/dtc-$pkgver"

prepare() {
	default_prepare
	sed -i s:-Werror::g "$builddir"/Makefile
}

build() {
	cd "$builddir"
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" PREFIX=/usr install || return 1
}

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

sha512sums="20689f7b0489fa945c4df4e27084dfd46fd5512a8dff9b28d60e0cd0e9e79bbd9944e4d70a1aba86a026481b35bb5441ed6b63d306a4a8f7581517f7359fa9bf  dtc-1.4.4.tar.xz
b58959a60468a7b35e007ac13f8b9fb622d28175315b89122ba21a5f100440c55b431b9699e3441754e9cbe63f13d4c75ad4a1df9f66db6abb399fff03891041  use-tx-as-the-type-specifier-instead-of-zx.patch"