diff options
Diffstat (limited to 'main/u-boot/APKBUILD')
-rw-r--r-- | main/u-boot/APKBUILD | 41 |
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 |