aboutsummaryrefslogtreecommitdiffstats
path: root/testing/raspberrypi/APKBUILD
blob: 838096a72c8e7a43900ea579e31e730e81225cdf (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
49
50
51
52
53
54
55
56
57
58
59
60
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=raspberrypi
pkgver=0.20140524
_commitid=4855a45b118cb7b97b83e5160551db9813487c91
pkgrel=0
pkgdesc="Raspberry Pi support tools"
url="https://github.com/raspberrypi/userland"
arch="armhf"
license="BSD"
depends=""
makedepends="cmake"
install=""
options="!fhs"
subpackages="$pkgname-dev $pkgname-libs"
source="raspberrypi-$pkgver.tar.gz::https://github.com/raspberrypi/userland/archive/$_commitid.tar.gz
	fix-musl.patch
	"

_sourcedir="$srcdir"/userland-$_commitid
_builddir="$srcdir"/build

prepare() {
	local i
	cd "$_sourcedir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	mkdir -p "$_builddir"
	cd "$_builddir"
	cmake -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
}

md5sums="86e35b07caac9d7dd3a8623a3ee59318  raspberrypi-0.20140524.tar.gz
49a33897d575a07514b1b8d288361f63  fix-musl.patch"
sha256sums="07a43686dc972d903d3af7bfb1262591bce09f2c3a772286fa3898e3a5fab216  raspberrypi-0.20140524.tar.gz
e8cbc558094d745f99a14f354720be0fdf81f2ebc48651fed32c4ae1ef1fd649  fix-musl.patch"
sha512sums="b2631a5b85d9c6a857f6d4266c30145314579fe81535100d7a2775477eb2663c1799efb0d52555660fab11fa8ccb4af0219c85d04e9c3e9b71f663167354273f  raspberrypi-0.20140524.tar.gz
8092d59985d7380b533896c6f8aad6f4838e8cf414a8052c43fa4330bc07ce6be7d2d0cc3bc280f3f63b537687cb8f51c93ef608db82fe6638505d03b317581f  fix-musl.patch"