# Copyright 1999-2017 Dustin C. Hatch # Distributed under the terms of the GNU General Public License v2 EAPI=6 inherit multilib DESCRIPTION="Kernel for ${PN#*-}" HOMEPAGE="" SRC_URI="" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" IUSE="modules" DEPEND="app-arch/lz4 =sys-kernel/gentoo-sources-${PVR} sys-kernel/linux-firmware" KSRC_DIR=/usr/src/linux-${PV}-gentoo if [ ${PR} != r0 ]; then KSRC_DIR=${KSRC_DIR}-${PR} fi src_unpack() { mkdir -p "${S}" || die } src_configure() { cp "${FILESDIR}"/${P}.kconfig .config || die unset ARCH make -C "${KSRC_DIR}" O="${S}" oldnoconfig || die } src_install() { local installpath="/usr/$(get_libdir)"/kernels/"${PF}" dodir "${installpath}" make install INSTALL_PATH="${D%/}${installpath}" || die if use modules; then make modules_install INSTALL_MOD_PATH="${D%/}" || die fi }