aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/raspberrypi-sources/raspberrypi-sources-4.1.9999.ebuild')
-rw-r--r--sys-kernel/raspberrypi-sources/raspberrypi-sources-4.1.9999.ebuild46
1 files changed, 46 insertions, 0 deletions
diff --git a/sys-kernel/raspberrypi-sources/raspberrypi-sources-4.1.9999.ebuild b/sys-kernel/raspberrypi-sources/raspberrypi-sources-4.1.9999.ebuild
new file mode 100644
index 00000000..457d545e
--- /dev/null
+++ b/sys-kernel/raspberrypi-sources/raspberrypi-sources-4.1.9999.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+ETYPE=sources
+K_SECURITY_UNSUPPORTED=1
+inherit kernel-2
+detect_version
+detect_arch
+
+inherit git-2 versionator
+IUSE="-rpi1 +rpi2"
+EGIT_REPO_URI=https://github.com/raspberrypi/linux.git
+EGIT_PROJECT="raspberrypi-linux.git"
+EGIT_BRANCH="rpi-$(get_version_component_range 1-2).y"
+EGIT_CLONE_TYPE="shallow"
+
+DESCRIPTION="Raspberry Pi kernel sources"
+HOMEPAGE="https://github.com/raspberrypi/linux"
+
+KEYWORDS="arm"
+
+pkg_setup() {
+ if use rpi1 && use rpi2; then
+ eerror "It is not possible to specify USE=\"rpi1 rpi2\" - please choose one"
+ eerror "architecture only."
+ die "Cannot build for RPi and RPi2 simultaneously"
+ fi
+
+ if use rpi2; then
+ export K_DEFCONFIG="bcm2709_defconfig"
+ export EXTRAVERSION="-rpi2/-*"
+ elif use rpi1; then
+ export K_DEFCONFIG="bcmrpi_defconfig"
+ export EXTRAVERSION="-rpi/-*"
+ else
+ die "One of USE=\"rpi1\" or USE=\"rpi2\" must be selected."
+ fi
+}
+
+src_unpack() {
+ git-2_src_unpack
+ unpack_set_extraversion
+}