linux: don't build it unless target machine is supported.

This commit is contained in:
Juan RP 2014-01-18 12:56:13 +01:00
parent 799a2fd6ad
commit 86e42d1e64
1 changed files with 14 additions and 12 deletions

View File

@ -8,19 +8,21 @@ short_desc="Linux kernel meta package"
maintainer="Juan RP <xtraeme@gmail.com>"
license="Public domain"
if [ "$XBPS_TARGET_ARCH" = "i686" -o "$XBPS_TARGET_ARCH" = "x86_64" ]; then
makedepends="linux3.10 linux-firmware dracut"
depends="linux3.10"
elif [ "$XBPS_TARGET_ARCH" = "armv6l" ]; then
makedepends="kernel-rpi"
depends="kernel-rpi"
fi
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*)
makedepends="linux3.10 linux-firmware dracut"
depends="linux3.10"
_depends_headers="linux3.10-headers"
;;
armv6l*)
makedepends="kernel-rpi"
depends="kernel-rpi"
_depends_headers="kernel-rpi-headers"
;;
*) msg_error "${pkgname}-${version}: unsupported target machine.\n";;
esac
linux-headers_package() {
short_desc="Linux kernel headers meta package"
if [ "$XBPS_TARGET_ARCH" = "armv6l" ]; then
depends="kernel-rpi-headers"
else
depends="linux3.10-headers"
fi
depends="${_depends_headers}"
}