aboutsummaryrefslogtreecommitdiffstats
path: root/main/u-boot
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2014-07-02 08:28:24 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2014-07-02 08:28:31 +0000
commitb4ecc3e7ee0824014a571570a73d72e0b07569dc (patch)
tree50bbbea48af8e981c4469f94651697bf0d355eeb /main/u-boot
parent817e4333d1827dab992f8328b7bc7e4a44dde544 (diff)
downloadaports-b4ecc3e7ee0824014a571570a73d72e0b07569dc.tar.bz2
aports-b4ecc3e7ee0824014a571570a73d72e0b07569dc.tar.xz
main/u-boot: install boards-specific files in subpackages
Diffstat (limited to 'main/u-boot')
-rw-r--r--main/u-boot/APKBUILD41
1 files changed, 28 insertions, 13 deletions
diff --git a/main/u-boot/APKBUILD b/main/u-boot/APKBUILD
index 9ec65fbab3..d0e9df4d7f 100644
--- a/main/u-boot/APKBUILD
+++ b/main/u-boot/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=u-boot
pkgver=2014.04
-pkgrel=1
+pkgrel=2
pkgdesc="Bootloader for ARM"
url="http://www.denx.de/wiki/U-Boot/"
arch="armhf"
@@ -12,14 +12,14 @@ depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
-subpackages=""
+subpackages="am335x_boneblack wandboard_quad"
source="ftp://ftp.denx.de/pub/u-boot/u-boot-$pkgver.tar.bz2
include-sys-types.patch
"
_builddir="$srcdir"/u-boot-$pkgver
-boards_config="am335x_boneblack wandboard_quad"
+boards_config="$subpackages"
prepare() {
local i
@@ -47,16 +47,31 @@ build() {
package() {
cd "$_builddir"
- for board in $boards_config; do
- mkdir -p "$pkgdir"/usr/share/$pkgname/$board
- export BUILD_DIR="$_builddir"/build/$board
- if [ -e "$BUILD_DIR"/MLO ]; then
- cp "$BUILD_DIR"/MLO \
- "$pkgdir"/usr/share/$pkgname/$board || return 1
- fi
- cp "$BUILD_DIR"/u-boot.* \
- "$pkgdir"/usr/share/$pkgname/$board || return 1
- done
+ mkdir -p "$pkgdir"/usr/share/doc/$pkgname
+ echo "Dummy package" > "$pkgdir"/usr/share/doc/$pkgname/README
+}
+
+_do_subpkg() {
+ board=$1
+ cd "$_builddir"
+ mkdir -p "$subpkgdir"/usr/share/$pkgname/$board
+ export BUILD_DIR="$_builddir"/build/$board
+ if [ -e "$BUILD_DIR"/MLO ]; then
+ cp "$BUILD_DIR"/MLO \
+ "$subpkgdir"/usr/share/$pkgname/$board || return 1
+ fi
+ cp "$BUILD_DIR"/u-boot.* \
+ "$subpkgdir"/usr/share/$pkgname/$board || return 1
+}
+
+am335x_boneblack() {
+ pkgdesc="u-boot for BeagleBone Black"
+ _do_subpkg $subpkgname
+}
+
+wandboard_quad() {
+ pkgdesc="u-boot for Wandboard Quad"
+ _do_subpkg $subpkgname
}
md5sums="6d2116d1385a66e9a59742caa9d62a54 u-boot-2014.04.tar.bz2