commit: 2935575c30c5eb17d842bac7ec968639e5a6c1a5 Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org> AuthorDate: Sun Jun 29 18:25:22 2014 +0000 Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org> CommitDate: Sun Jun 29 18:25:22 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/jmbsvicetto.git;a=commit;h=2935575c
Update kernel ebuild. Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org> --- sys-kernel/infra-kernel/infra-kernel-3.15.2.ebuild | 41 ++++++++++++++-------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/sys-kernel/infra-kernel/infra-kernel-3.15.2.ebuild b/sys-kernel/infra-kernel/infra-kernel-3.15.2.ebuild index f0e2f2d..ce38078 100644 --- a/sys-kernel/infra-kernel/infra-kernel-3.15.2.ebuild +++ b/sys-kernel/infra-kernel/infra-kernel-3.15.2.ebuild @@ -10,27 +10,28 @@ KERNEL_NAME="hardened" KERNEL_PV="$PV" KERNEL_REVISION="$PR" INFRA_SUFFIX="infra27" -use amd64 && KARCH="x86_64" -use x86 && KARCH="x86" KERNEL_PVR="${KERNEL_PV}-${KERNEL_REVISION}" +KARCH_amd64="x86_64" +KARCH_x86="x86" BINPKG_PVR="${PVR}-${INFRA_SUFFIX}" -BINPKG_KERNEL="${PN/-sources/}-kernel-${KARCH}-${BINPKG_PVR}" -BINPKG_MODULES="${PN/-sources/}-modules-${KARCH}-${BINPKG_PVR}" +BINPKG_KERNEL="${PN/-sources/}-kernel-KARCH-${BINPKG_PVR}" +BINPKG_MODULES="${PN/-sources/}-modules-KARCH-${BINPKG_PVR}" -KERNEL_URI="${BINPKG_KERNEL}.tbz2" -MODULES_URI="${BINPKG_MODULES}.tbz2" +URIBASE="https://distfiles:fetchubufe...@portage.infra.gentoo.org/distfiles/" -CUSTOM_VERSION="${KERNEL_PV}-${KERNEL_NAME}-${KERNEL_REVISION}-${INFRA_SUFFIX}" -KERNEL_BIN="kernel-${KARCH}-${CUSTOM_VERSION}" -INITRAMFS_BIN="initramfs-${KARCH}-${CUSTOM_VERSION}" -SYSTEMMAP_BIN="System.map-${KARCH}-${CUSTOM_VERSION}" +KERNEL_URI_amd64="amd64? ( ${URIBASE}${BINPKG_KERNEL/KARCH/${KARCH_x86_64}}.tbz2 )" +KERNEL_URI_x86="x86? ( ${URIBASE}${BINPKG_KERNEL/KARCH/${KARCH_x86}}.tbz2 )" +KERNEL_URI="$KERNEL_URI ${KERNEL_URI_amd64}" +#KERNEL_URI="$KERNEL_URI ${KERNEL_URI_x86}" -SRC_URI=" - amd64? ( ${KERNEL_URI//--/-x86_64-} ${MODULES_URI//--/-x86_64-} ) - x86? ( ${KERNEL_URI//--/-x86-} ${MODULES_URI//--/-x86-} ) -" +MODULES_URI_amd64="amd64? ( ${URIBASE}${BINPKG_MODULES/KARCH/${KARCH_x86_64}}.tbz2 )" +MODULES_URI_x86="x86? ( ${URIBASE}${BINPKG_MODULES/KARCH/${KARCH_x86}}.tbz2 )" +MODULES_URI="$MODULES_URI ${MODULES_URI_amd64}" +#MODULES_URI="$MODULES_URI ${MODULES_URI_x86}" + +SRC_URI="${KERNEL_URI} ${MODULES_URI}" DESCRIPTION="Package to install kernel + initramfs for Gentoo infra boxes" HOMEPAGE="http://wiki.gentoo.org/wiki/Project:Infrastructure" IUSE="" @@ -46,6 +47,18 @@ S="${WORKDIR}" src_install() { + # Use is not valid in global scope + use amd64 && KARCH="${KARCH_amd64}" + use x86 && KARCH="${KARCH_x86}" + [ -z "$KARCH" ] && die "Your arch is not supported by this build" + + [ "${KERNEL_REVISION}" != "r0" ] && KERNEL_REVISION_STRING=-${KERNEL_REVISION} + CUSTOM_VERSION="${KERNEL_PV}-${KERNEL_NAME}${KERNEL_REVISION_STRING}-${INFRA_SUFFIX}" + KNAME="genkernel" + KERNEL_BIN="kernel-${KNAME}-${KARCH}-${CUSTOM_VERSION}" + INITRAMFS_BIN="initramfs-${KNAME}-${KARCH}-${CUSTOM_VERSION}" + SYSTEMMAP_BIN="System.map-${KNAME}-${KARCH}-${CUSTOM_VERSION}" + # copy the kernel and initramfs insinto /boot doins "${KERNEL_BIN}"