# Copyright 2004-2010 Sabayon Project # Distributed under the terms of the GNU General Public License v2 # $ # @ECLASS-VARIABLE: K_SABPATCHES_VER # @DESCRIPTION: # The version of the sabayon patches tarball(s) to apply. # A value of "5" would apply 2.6.12-5 to my-sources-2.6.12.ebuild # @ECLASS-VARIABLE: K_SABKERNEL_NAME # @DESCRIPTION: # The kernel name used by the ebuild, it should be the ending ${PN} part # for example, of linux-sabayon it is "sabayon", for linux-server it is "server" K_SABKERNEL_NAME="${K_SABKERNEL_NAME:-sabayon}" # @ECLASS-VARIABLE: K_SABKERNEL_URI_CONFIG # @DESCRIPTION: # Set this either to "no" or "yes" depending on the location of kernel config files # if they are inside FILESDIR (old location) leave this option set to "no", otherwise # set this to "yes" K_SABKERNEL_URI_CONFIG="${K_SABKERNEL_URI_CONFIG:-no}" # @ECLASS-VARIABLE: K_KERNEL_SOURCES_PKG # @DESCRIPTION: # The kernel sources package used to build this kernel binary K_KERNEL_SOURCES_PKG="${K_KERNEL_SOURCES_PKG:-${CATEGORY}/${PN}-sources-${PVR}}" K_ONLY_SOURCES="${K_ONLY_SOURCES:-}" KERN_INITRAMFS_SEARCH_NAME="${KERN_INITRAMFS_SEARCH_NAME:-initramfs-genkernel*${K_SABKERNEL_NAME}}" # Disable deblobbing feature K_DEBLOB_AVAILABLE=0 inherit eutils kernel-2 sabayon-artwork mount-boot linux-mod # from kernel-2 eclass detect_version detect_arch # export all the available functions here EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_postrm DESCRIPTION="Sabayon Linux kernel functions and phases" ## kernel-2 eclass settings K_NOSETEXTRAVERSION="1" if [ -n "${K_SABPATCHES_VER}" ]; then UNIPATCH_STRICTORDER="yes" K_SABPATCHES_PKG="${PV}-${K_SABPATCHES_VER}.tar.bz2" UNIPATCH_LIST="${DISTFILES}/${K_SABPATCHES_PKG}" fi # ebuild default values setup settings KV_FULL=${KV_FULL/linux/${K_SABKERNEL_NAME}} MY_KERNEL_DIR="/usr/src/linux-${KV_FULL}" KV_OUT_DIR="${MY_KERNEL_DIR}" S="${WORKDIR}/linux-${KV_FULL}" SLOT="${PV}" EXTRAVERSION=${EXTRAVERSION/linux/${K_SABKERNEL_NAME}} # provide extra virtual pkg PROVIDE="${PROVIDE} virtual/linux-binary" HOMEPAGE="http://www.sabayon.org" SRC_URI="${KERNEL_URI} http://distfiles.sabayon.org/${CATEGORY}/linux-sabayon-patches/${K_SABPATCHES_PKG}" if [ "${K_SABKERNEL_URI_CONFIG}" = "yes" ]; then K_SABKERNEL_CONFIG_FILE="${K_SABKERNEL_CONFIG_FILE:-${K_SABKERNEL_NAME}-${PVR}-__ARCH__.config}" SRC_URI="${SRC_URI} amd64? ( http://distfiles.sabayon.org/${CATEGORY}/linux-sabayon-patches/config/${K_SABKERNEL_CONFIG_FILE/__ARCH__/amd64} ) x86? ( http://distfiles.sabayon.org/${CATEGORY}/linux-sabayon-patches/config/${K_SABKERNEL_CONFIG_FILE/__ARCH__/x86} )" use amd64 && K_SABKERNEL_CONFIG_FILE=${K_SABKERNEL_CONFIG_FILE/__ARCH__/amd64} use x86 && K_SABKERNEL_CONFIG_FILE=${K_SABKERNEL_CONFIG_FILE/__ARCH__/x86} fi if [ -n "${K_ONLY_SOURCES}" ]; then IUSE="${IUSE}" DEPEND="sys-apps/sed" RDEPEND="${RDEPEND}" else IUSE="splash dmraid grub" DEPEND="sys-apps/sed app-arch/xz-utils