aboutsummaryrefslogtreecommitdiffstats
path: root/main/raspberrypi/APKBUILD
blob: 5394449818c075663590f06e844d2000784b6745 (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
46
47
48
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=raspberrypi
pkgver=0.20171114
_commitid=bc3c52a51315399a9f31ed24049eb4bc81fd1c60
pkgrel=0
pkgdesc="Raspberry Pi support tools"
url="https://github.com/raspberrypi/userland"
arch="armhf"
license="BSD"
depends=""
depends_dev="linux-headers raspberrypi-libs"
makedepends="cmake $depends_dev"
install=""
options="!fhs"
subpackages="$pkgname-dev $pkgname-libs"
source="raspberrypi-$pkgver.tar.gz::https://github.com/raspberrypi/userland/archive/$_commitid.tar.gz
	"

builddir="$srcdir"/userland-$_commitid

build() {
	mkdir -p "$builddir"
	cd "$builddir"
	# -Wno-error=array-bounds is workaround for gcc bug 59124
	cmake	-DCMAKE_C_FLAGS="$CFLAGS -D_GNU_SOURCE -Wno-error=array-bounds" \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_RPATH=/opt/vc/lib \
		$_sourcedir || return 1
	make
}

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

	# nuke the unwanted stuff
	rm -rf "$pkgdir"/opt/vc/src
	rm -rf "$pkgdir"/opt/vc/lib/*.a
}

libs() {
	pkgdesc="Raspberry Pi support libraries"

	mkdir -p "$subpkgdir"/opt/vc/lib
	mv "$pkgdir"/opt/vc/lib/* "$subpkgdir"/opt/vc/lib
}

sha512sums="d8295474e6bab7ad8f34b1ee5cf8e883b4c0a75bf6083012e2422707bdf36ee1ad11e9e61b2edaa77b40a80d1f529ac43d07e05d0cf87443bb5abf397430c19b  raspberrypi-0.20171114.tar.gz"