diff options
17 files changed, 278 insertions, 1179 deletions
diff --git a/eclass/linux-build.eclass b/eclass/linux-build.eclass new file mode 100644 index 00000000..fcb9b889 --- /dev/null +++ b/eclass/linux-build.eclass @@ -0,0 +1,230 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# @ECLASS: linux-build.eclass +# @MAINTAINER: +# Bertrand Jacquin <beber@meleeweb.net> +# @BLURB: Eclass for building kernel +# @DESCRIPTION: +# Build kernel properly + +case "${EAPI:-0}" in + 5) + ;; + *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" + ;; +esac + +ETYPE="sources" + +inherit savedconfig kernel-2 +detect_version + +EXPORT_FUNCTIONS src_prepare src_compile src_install pkg_postinst + +SLOT="${PV%.*}" + +DESCRIPTION="Kernel stable sources and build" +HOMEPAGE="http://www.kernel.org" +SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}" + +SRCDIR="${WORKDIR}/linux-${KV_FULL}" +BUILDDIR="${WORKDIR}/build" + +KV_EXTRA="${EXTRAVERSION}" +S="${SRCDIR}" + +IUSE="build source zlib lzma" +REQUIRED_USE=" + ?? ( zlib lzma ) + zlib? ( build ) + lzma? ( build ) + symlink? ( source ) + " + +DEPEND=" + sys-devel/bc + sys-apps/diffutils + || ( + sys-apps/kmod[zlib?,lzma?] + sys-apps/module-init-tools + )" +RDEPEND="" + +# @FUNCTION: _linux-build_configval +# @INTERNAL +# @DESCRIPTION: +# Request a CONFIG value from .config file +# Return true if set, and define CONFIG_<key> +# Return false if not set +_linux-build_configval() { + local _v="CONFIG_$1" + + # Export only the needed config value + # when not already define + declare -p "${_v}" > /dev/null 2>&1 \ + || . <(sed -n "/^${_v}=/ p" "${BUILDDIR}/.config") + + case "${!_v}" in + "") declare "$_v=n" ; export "${_v}" ; return 1 ;; + *) export "${_v}" ; return 0 ;; + esac +} + +_linux-build_src_prepare_build() { + mkdir "${BUILDDIR}" + + restore_config "${BUILDDIR}/.config" + if [[ ! -e "${BUILDDIR}/.config" ]] ; then + ewarn "Generate .config using 'defconfig'" + emake defconfig "${myopt[@]}" + fi + + mkdir "${WORKDIR}/boot" + + if _linux-build_configval CMDLINE_BOOL && _linux-build_configval CMDLINE ; then + einfo "Creating kernel.arg" + einfo " CONFIG_CMDLINE='${CONFIG_CMDLINE}'" + echo "${CONFIG_CMDLINE}" > "${WORKDIR}/boot/kernel.arg" + fi + + _linux-build_configval MODULES || ewarn "CONFIG_MODULES is not set" + _linux-build_configval UEVENT_HELPER_PATH \ + && ewarn "CONFIG_UEVENT_HELPER_PATH should be empty" + + _linux-build_configval FHANDLE || ewarn "CONFIG_FHANDLE is needed for >=sys-fs/udev-210" + _linux-build_configval NET || ewarn "CONFIG_NET is needed for >=sys-fs/udev-210" +} + +linux-build_src_prepare() { + bopt=( + -C "${BUILDDIR}" + -f "${SRCDIR}/Makefile" + KBUILD_SRC="${SRCDIR}" + KCONFIG_CONFIG="${BUILDDIR}/.config" + + KBUILD_BUILD_USER="${KBUILD_BUILD_USER:-$PORTAGE_USERNAME}" + ) + + copt=( + CC="$(tc-getCC)" HOSTCC="${CBUILD}-gcc" CROSS_COMPILE="${CHOST}-" + ARCH="$(tc-arch-kernel)" SUBARCH="$(tc-arch-kernel)" + ) + + vopt=( + EXTRAVERSION="${KV_EXTRA}" + LOCALVERSION= CONFIG_LOCALVERSION= + V=1 + ) + + myopt=( "${bopt[@]}" "${copt[@]}" "${vopt[@]}" ) + + use build && _linux-build_src_prepare_build +} + +_linux-build_src_compile_build() { + einfo "Checking configuration file" + emake oldconfig "${myopt[@]}" < /dev/null + + if diff -Nu0 "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" \ + | egrep -q '^(\-|\+)CONFIG_' ; then + eerror "You configuration is not up to date" + diff -Nu "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" + die "Bad configuration" + fi + + einfo "Building kernel" + emake bzImage "${myopt[@]}" + + if _linux-build_configval MODULES ; then + einfo "Building modules" + emake modules "${myopt[@]}" + fi +} + +linux-build_src_compile() { + use build && _linux-build_src_compile_build +} + +_linux-build_src_install_sources() { + kernel-2_src_install +} + +_linux-build_src_install_build() { + einfo "Installing kernel" + emake install "${myopt[@]}" \ + INSTALL_PATH="${WORKDIR}/boot" + + insinto "/boot/${KV_FULL}" + + newins "${WORKDIR}/boot/config-${KV_FULL}" kernel.cfg + newins "${WORKDIR}/boot/vmlinuz-${KV_FULL}" kernel.img + newins "${WORKDIR}/boot/System.map-${KV_FULL}" System.map + + if _linux-build_configval CMDLINE_BOOL && _linux-build_configval CMDLINE ; then + doins "${WORKDIR}/boot/kernel.arg" + fi + + if _linux-build_configval MODULES ; then + einfo "Installing modules" + emake modules_install "${myopt[@]}" \ + INSTALL_MOD_PATH="${WORKDIR}" \ + INSTALL_MOD_STRIP="${PORTAGE_STRIP_FLAGS}" + + # kmod only support zlib and lzma + # See libkmod/libkmod-util.c / struct kmod_ext kmod_exts + if use zlib || use lzma ; then + local cmp ext + + use zlib && { cmp="gzip -9c" ext="gz" ; } + use lzma && { cmp="xz -9c" ext="xz" ; } + + einfo "Compressing modules" + find "${WORKDIR}/lib/modules" \ + -type f -name "*.ko" \ + | while read ; do + ${cmp} < "${REPLY}" > "${REPLY}.${ext}" \ + || die "${cmp} ${REPLY} failed" + rm "${REPLY}" + done + fi + + einfo "Generating modules.dep" + depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ + || die "depmod failed" + + rm "${WORKDIR}/lib/modules/${KV_FULL}/build" + rm "${WORKDIR}/lib/modules/${KV_FULL}/source" + + insinto /lib + doins -r "${WORKDIR}/lib/modules" + + # No need to make firmware_install, make modules_install does + if [[ -e "${WORKDIR}/lib/firmware" ]] ; then + einfo "Installing firmwares" + + insinto /lib + doins -r "${WORKDIR}/lib/firmware" + fi + fi + + use savedconfig && save_config "${BUILDDIR}/.config" +} + +linux-build_src_install() { + use build && _linux-build_src_install_build + use source && _linux-build_src_install_sources +} + +linux-build_pkg_postinst() { + kernel-2_pkg_postinst + + # Bypass kernel-2_pkg_postinst madness + if ! use symlink && [[ -L "${EROOT}usr/src/linux" ]] ; then + rm "${EROOT}usr/src/linux" + fi + + einfo "You may need to:" + einfo " make menuconfig ${copt[@]}" +} diff --git a/metadata/md5-cache/sys-kernel/longterm-sources-3.10.32 b/metadata/md5-cache/sys-kernel/longterm-sources-3.10.32 index e2d582ea..08f5dcf2 100644 --- a/metadata/md5-cache/sys-kernel/longterm-sources-3.10.32 +++ b/metadata/md5-cache/sys-kernel/longterm-sources-3.10.32 @@ -1,9 +1,9 @@ DEFINED_PHASES=compile install postinst postrm preinst prepare setup test unpack -DEPEND=sys-devel/bc || ( sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools ) !build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) +DEPEND=!build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) sys-devel/bc sys-apps/diffutils || ( sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools ) DESCRIPTION=Kernel stable sources and build EAPI=5 HOMEPAGE=http://www.kernel.org -IUSE=build source zlib lzma savedconfig symlink build +IUSE=savedconfig symlink build build source zlib lzma KEYWORDS=amd64 x86 LICENSE=GPL-2 freedist PDEPEND=!build? ( virtual/dev-manager ) @@ -12,5 +12,5 @@ REQUIRED_USE=?? ( zlib lzma ) zlib? ( build ) lzma? ( build ) symlink? ( source RESTRICT=binchecks strip SLOT=3.10 SRC_URI=mirror://kernel/linux/kernel/v3.x/patch-3.10.32.xz mirror://kernel/linux/kernel/v3.x/linux-3.10.tar.xz -_eclasses_=eutils 40081e8c7e7f7c4f9db349a1d6d52925 kernel-2 263afd0e4a90481352469cff577efe1b multilib fac675dcccf94392371a6abee62d909f portability 536c5e70c5fb252ed3b769e04aa3f05b python-any-r1 08d3455b23110d650f173ab0a090818b python-utils-r1 86e503f2f5e7da7163dc3e07c12cea62 savedconfig 5313100f525c41f6c72c6e04edeb4f65 toolchain-funcs 48b38a216afb92db6314d6c3187abea3 versionator a8a3963967d6140be9a14b08bb8f047f -_md5_=d80868c5d2bb6f9cff3645614c05b4f1 +_eclasses_=eutils 40081e8c7e7f7c4f9db349a1d6d52925 kernel-2 263afd0e4a90481352469cff577efe1b linux-build 73dd3dc6d7451da7f36c82c689c56f18 multilib fac675dcccf94392371a6abee62d909f portability 536c5e70c5fb252ed3b769e04aa3f05b python-any-r1 08d3455b23110d650f173ab0a090818b python-utils-r1 86e503f2f5e7da7163dc3e07c12cea62 savedconfig 5313100f525c41f6c72c6e04edeb4f65 toolchain-funcs 48b38a216afb92db6314d6c3187abea3 versionator a8a3963967d6140be9a14b08bb8f047f +_md5_=445d9dffe74a19ee55930a5aae8c5833 diff --git a/metadata/md5-cache/sys-kernel/longterm-sources-3.12.13 b/metadata/md5-cache/sys-kernel/longterm-sources-3.12.13 index 82e76b66..b143551c 100644 --- a/metadata/md5-cache/sys-kernel/longterm-sources-3.12.13 +++ b/metadata/md5-cache/sys-kernel/longterm-sources-3.12.13 @@ -1,9 +1,9 @@ DEFINED_PHASES=compile install postinst postrm preinst prepare setup test unpack -DEPEND=sys-devel/bc || ( sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools ) !build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) +DEPEND=!build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) sys-devel/bc sys-apps/diffutils || ( sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools ) DESCRIPTION=Kernel stable sources and build EAPI=5 HOMEPAGE=http://www.kernel.org -IUSE=build source zlib lzma savedconfig symlink build +IUSE=savedconfig symlink build build source zlib lzma KEYWORDS=amd64 x86 LICENSE=GPL-2 freedist PDEPEND=!build? ( virtual/dev-manager ) @@ -12,5 +12,5 @@ REQUIRED_USE=?? ( zlib lzma ) zlib? ( build ) lzma? ( build ) symlink? ( source RESTRICT=binchecks strip SLOT=3.12 SRC_URI=mirror://kernel/linux/kernel/v3.x/patch-3.12.13.xz mirror://kernel/linux/kernel/v3.x/linux-3.12.tar.xz -_eclasses_=eutils 40081e8c7e7f7c4f9db349a1d6d52925 kernel-2 263afd0e4a90481352469cff577efe1b multilib fac675dcccf94392371a6abee62d909f portability 536c5e70c5fb252ed3b769e04aa3f05b python-any-r1 08d3455b23110d650f173ab0a090818b python-utils-r1 86e503f2f5e7da7163dc3e07c12cea62 savedconfig 5313100f525c41f6c72c6e04edeb4f65 toolchain-funcs 48b38a216afb92db6314d6c3187abea3 versionator a8a3963967d6140be9a14b08bb8f047f -_md5_=d80868c5d2bb6f9cff3645614c05b4f1 +_eclasses_=eutils 40081e8c7e7f7c4f9db349a1d6d52925 kernel-2 263afd0e4a90481352469cff577efe1b linux-build 73dd3dc6d7451da7f36c82c689c56f18 multilib fac675dcccf94392371a6abee62d909f portability 536c5e70c5fb252ed3b769e04aa3f05b python-any-r1 08d3455b23110d650f173ab0a090818b python-utils-r1 86e503f2f5e7da7163dc3e07c12cea62 savedconfig 5313100f525c41f6c72c6e04edeb4f65 toolchain-funcs 48b38a216afb92db6314d6c3187abea3 versionator a8a3963967d6140be9a14b08bb8f047f +_md5_=445d9dffe74a19ee55930a5aae8c5833 diff --git a/metadata/md5-cache/sys-kernel/longterm-sources-3.2.55 b/metadata/md5-cache/sys-kernel/longterm-sources-3.2.55 index cef08386..da3258f0 100644 --- a/metadata/md5-cache/sys-kernel/longterm-sources-3.2.55 +++ b/metadata/md5-cache/sys-kernel/longterm-sources-3.2.55 @@ -1,9 +1,9 @@ DEFINED_PHASES=compile install postinst postrm preinst prepare setup test unpack -DEPEND=sys-devel/bc || ( sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools ) !build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) +DEPEND=!build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) sys-devel/bc sys-apps/diffutils || ( sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools ) DESCRIPTION=Kernel stable sources and build EAPI=5 HOMEPAGE=http://www.kernel.org -IUSE=build source zlib lzma savedconfig symlink build +IUSE=savedconfig symlink build build source zlib lzma KEYWORDS=amd64 x86 LICENSE=GPL-2 freedist PDEPEND=!build? ( virtual/dev-manager ) @@ -12,5 +12,5 @@ REQUIRED_USE=?? ( zlib lzma ) zlib? ( build ) lzma? ( build ) symlink? ( source RESTRICT=binchecks strip SLOT=3.2 SRC_URI=mirror://kernel/linux/kernel/v3.x/patch-3.2.55.xz mirror://kernel/linux/kernel/v3.x/linux-3.2.tar.xz -_eclasses_=eutils 40081e8c7e7f7c4f9db349a1d6d52925 kernel-2 263afd0e4a90481352469cff577efe1b multilib fac675dcccf94392371a6abee62d909f portability 536c5e70c5fb252ed3b769e04aa3f05b python-any-r1 08d3455b23110d650f173ab0a090818b python-utils-r1 86e503f2f5e7da7163dc3e07c12cea62 savedconfig 5313100f525c41f6c72c6e04edeb4f65 toolchain-funcs 48b38a216afb92db6314d6c3187abea3 versionator a8a3963967d6140be9a14b08bb8f047f -_md5_=d80868c5d2bb6f9cff3645614c05b4f1 +_eclasses_=eutils 40081e8c7e7f7c4f9db349a1d6d52925 kernel-2 263afd0e4a90481352469cff577efe1b linux-build 73dd3dc6d7451da7f36c82c689c56f18 multilib fac675dcccf94392371a6abee62d909f portability 536c5e70c5fb252ed3b769e04aa3f05b python-any-r1 08d3455b23110d650f173ab0a090818b python-utils-r1 86e503f2f5e7da7163dc3e07c12cea62 savedconfig 5313100f525c41f6c72c6e04edeb4f65 toolchain-funcs 48b38a216afb92db6314d6c3187abea3 versionator a8a3963967d6140be9a14b08bb8f047f +_md5_=445d9dffe74a19ee55930a5aae8c5833 diff --git a/metadata/md5-cache/sys-kernel/longterm-sources-3.4.82 b/metadata/md5-cache/sys-kernel/longterm-sources-3.4.82 index 53b3f994..80ecf2eb 100644 --- a/metadata/md5-cache/sys-kernel/longterm-sources-3.4.82 +++ b/metadata/md5-cache/sys-kernel/longterm-sources-3.4.82 @@ -1,9 +1,9 @@ DEFINED_PHASES=compile install postinst postrm preinst prepare setup test unpack -DEPEND=sys-devel/bc || ( sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools ) !build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) +DEPEND=!build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) sys-devel/bc sys-apps/diffutils || ( sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools ) DESCRIPTION=Kernel stable sources and build EAPI=5 HOMEPAGE=http://www.kernel.org -IUSE=build source zlib lzma savedconfig symlink build +IUSE=savedconfig symlink build build source zlib lzma KEYWORDS=amd64 x86 LICENSE=GPL-2 freedist PDEPEND=!build? ( virtual/dev-manager ) @@ -12,5 +12,5 @@ REQUIRED_USE=?? ( zlib lzma ) zlib? ( build ) lzma? ( build ) symlink? ( source RESTRICT=binchecks strip SLOT=3.4 SRC_URI=mirror://kernel/linux/kernel/v3.x/patch-3.4.82.xz mirror://kernel/linux/kernel/v3.x/linux-3.4.tar.xz -_eclasses_=eutils 40081e8c7e7f7c4f9db349a1d6d52925 kernel-2 263afd0e4a90481352469cff577efe1b multilib fac675dcccf94392371a6abee62d909f portability 536c5e70c5fb252ed3b769e04aa3f05b python-any-r1 08d3455b23110d650f173ab0a090818b python-utils-r1 86e503f2f5e7da7163dc3e07c12cea62 savedconfig 5313100f525c41f6c72c6e04edeb4f65 toolchain-funcs 48b38a216afb92db6314d6c3187abea3 versionator a8a3963967d6140be9a14b08bb8f047f -_md5_=d80868c5d2bb6f9cff3645614c05b4f1 +_eclasses_=eutils 40081e8c7e7f7c4f9db349a1d6d52925 kernel-2 263afd0e4a90481352469cff577efe1b linux-build 73dd3dc6d7451da7f36c82c689c56f18 multilib fac675dcccf94392371a6abee62d909f portability 536c5e70c5fb252ed3b769e04aa3f05b python-any-r1 08d3455b23110d650f173ab0a090818b python-utils-r1 86e503f2f5e7da7163dc3e07c12cea62 savedconfig 5313100f525c41f6c72c6e04edeb4f65 toolchain-funcs 48b38a216afb92db6314d6c3187abea3 versionator a8a3963967d6140be9a14b08bb8f047f +_md5_=445d9dffe74a19ee55930a5aae8c5833 diff --git a/metadata/md5-cache/sys-kernel/stable-sources-3.11.10 b/metadata/md5-cache/sys-kernel/stable-sources-3.11.10 index 3beae949..4130444c 100644 --- a/metadata/md5-cache/sys-kernel/stable-sources-3.11.10 +++ b/metadata/md5-cache/sys-kernel/stable-sources-3.11.10 @@ -1,9 +1,9 @@ DEFINED_PHASES=compile install postinst postrm preinst prepare setup test unpack -DEPEND=sys-devel/bc || ( sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools ) !build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) +DEPEND=!build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) sys-devel/bc sys-apps/diffutils || ( sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools ) DESCRIPTION=Kernel stable sources and build EAPI=5 HOMEPAGE=http://www.kernel.org -IUSE=build source zlib lzma savedconfig symlink build +IUSE=savedconfig symlink build build source zlib lzma KEYWORDS=~amd64 ~x86 LICENSE=GPL-2 freedist PDEPEND=!build? ( virtual/dev-manager ) @@ -12,5 +12,5 @@ REQUIRED_USE=?? ( zlib lzma ) zlib? ( build ) lzma? ( build ) symlink? ( source RESTRICT=binchecks strip SLOT=3.11 SRC_URI=mirror://kernel/linux/kernel/v3.x/patch-3.11.10.xz mirror://kernel/linux/kernel/v3.x/linux-3.11.tar.xz -_eclasses_=eutils 40081e8c7e7f7c4f9db349a1d6d52925 kernel-2 263afd0e4a90481352469cff577efe1b multilib fac675dcccf94392371a6abee62d909f portability 536c5e70c5fb252ed3b769e04aa3f05b python-any-r1 08d3455b23110d650f173ab0a090818b python-utils-r1 86e503f2f5e7da7163dc3e07c12cea62 savedconfig 5313100f525c41f6c72c6e04edeb4f65 toolchain-funcs 48b38a216afb92db6314d6c3187abea3 versionator a8a3963967d6140be9a14b08bb8f047f -_md5_=44c983f5957e363f27aadd8a8a09335c +_eclasses_=eutils 40081e8c7e7f7c4f9db349a1d6d52925 kernel-2 263afd0e4a90481352469cff577efe1b linux-build 73dd3dc6d7451da7f36c82c689c56f18 multilib fac675dcccf94392371a6abee62d909f portability 536c5e70c5fb252ed3b769e04aa3f05b python-any-r1 08d3455b23110d650f173ab0a090818b python-utils-r1 86e503f2f5e7da7163dc3e07c12cea62 savedconfig 5313100f525c41f6c72c6e04edeb4f65 toolchain-funcs 48b38a216afb92db6314d6c3187abea3 versionator a8a3963967d6140be9a14b08bb8f047f +_md5_=38706be878dca1e8c32a93a1c9f68d31 diff --git a/metadata/md5-cache/sys-kernel/stable-sources-3.13.5 b/metadata/md5-cache/sys-kernel/stable-sources-3.13.5 index 290d05e1..dd22b8a5 100644 --- a/metadata/md5-cache/sys-kernel/stable-sources-3.13.5 +++ b/metadata/md5-cache/sys-kernel/stable-sources-3.13.5 @@ -1,9 +1,9 @@ DEFINED_PHASES=compile install postinst postrm preinst prepare setup test unpack -DEPEND=sys-devel/bc || ( sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools ) !build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) +DEPEND=!build? ( sys-apps/sed >=sys-devel/binutils-2.11.90.0.31 ) sys-devel/bc sys-apps/diffutils || ( sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools ) DESCRIPTION=Kernel stable sources and build EAPI=5 HOMEPAGE=http://www.kernel.org -IUSE=build source zlib lzma savedconfig symlink build +IUSE=savedconfig symlink build build source zlib lzma KEYWORDS=~amd64 ~x86 LICENSE=GPL-2 freedist PDEPEND=!build? ( virtual/dev-manager ) @@ -12,5 +12,5 @@ REQUIRED_USE=?? ( zlib lzma ) zlib? ( build ) lzma? ( build ) symlink? ( source RESTRICT=binchecks strip SLOT=3.13 SRC_URI=mirror://kernel/linux/kernel/v3.x/patch-3.13.5.xz mirror://kernel/linux/kernel/v3.x/linux-3.13.tar.xz -_eclasses_=eutils 40081e8c7e7f7c4f9db349a1d6d52925 kernel-2 263afd0e4a90481352469cff577efe1b multilib fac675dcccf94392371a6abee62d909f portability 536c5e70c5fb252ed3b769e04aa3f05b python-any-r1 08d3455b23110d650f173ab0a090818b python-utils-r1 86e503f2f5e7da7163dc3e07c12cea62 savedconfig 5313100f525c41f6c72c6e04edeb4f65 toolchain-funcs 48b38a216afb92db6314d6c3187abea3 versionator a8a3963967d6140be9a14b08bb8f047f -_md5_=d0c9706c7b76f4409f33fad4041ac8ed +_eclasses_=eutils 40081e8c7e7f7c4f9db349a1d6d52925 kernel-2 263afd0e4a90481352469cff577efe1b linux-build 73dd3dc6d7451da7f36c82c689c56f18 multilib fac675dcccf94392371a6abee62d909f portability 536c5e70c5fb252ed3b769e04aa3f05b python-any-r1 08d3455b23110d650f173ab0a090818b python-utils-r1 86e503f2f5e7da7163dc3e07c12cea62 savedconfig 5313100f525c41f6c72c6e04edeb4f65 toolchain-funcs 48b38a216afb92db6314d6c3187abea3 versionator a8a3963967d6140be9a14b08bb8f047f +_md5_=38706be878dca1e8c32a93a1c9f68d31 diff --git a/sys-kernel/longterm-sources/ChangeLog b/sys-kernel/longterm-sources/ChangeLog index 1d74ad87..2826948c 100644 --- a/sys-kernel/longterm-sources/ChangeLog +++ b/sys-kernel/longterm-sources/ChangeLog @@ -2,6 +2,11 @@ # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 26 Feb 2014; Bertrand Jacquin <beber@meleeweb.net> + longterm-sources-3.10.32.ebuild, longterm-sources-3.12.13.ebuild, + longterm-sources-3.2.55.ebuild, longterm-sources-3.4.82.ebuild: + sys-kernel: Eclassify + *longterm-sources-3.10.32 (26 Feb 2014) *longterm-sources-3.12.13 (26 Feb 2014) *longterm-sources-3.4.82 (26 Feb 2014) diff --git a/sys-kernel/longterm-sources/Manifest b/sys-kernel/longterm-sources/Manifest index af3fc99a..922e5b25 100644 --- a/sys-kernel/longterm-sources/Manifest +++ b/sys-kernel/longterm-sources/Manifest @@ -6,9 +6,9 @@ DIST patch-3.10.32.xz 587956 SHA256 e05a8b9bbd475a3b85b893b447109aa5a4af3c981d4f DIST patch-3.12.13.xz 340200 SHA256 f55fccaba90c44475ffd82357e946d8410ca6a1c6ffb78c53d421fa1a2f5a1e2 WHIRLPOOL 3c268a8f786ca50e75e8ad29d4702c3e1fd2632958548db42717efce38750e673dcebda1c25c6d6d3327a4005594af79f08d1129042853510b3d404b7120425e DIST patch-3.2.55.xz 1093628 SHA256 b60370501cc194db6ab5548af02ce3e58c11d3018e12dee23b0345b4f9d433a0 WHIRLPOOL 5becb6249f306fe0bc6d9e9d65075171f3a54505a29dfbe229f4559ad0c9957e1c3380d34595b2f1f3f6feee45525652b304fd32ffc6133d2988f5c50eaf08f1 DIST patch-3.4.82.xz 883040 SHA256 0f040418580670f8d119cd960a39c20e5b548261db3bb3382144c19f33d30404 WHIRLPOOL 200723263e9d960d7c760d5efcdc893472be87ce9e70c7ea426c6602cd9fdbb1c5e2da6091bc6a2853ad36f76a0a35b1db25f5e65aa523aa286521bb52007d78 -EBUILD longterm-sources-3.10.32.ebuild 4490 SHA256 c46cd8799390dc6354e09ce2b7ac6984438cd8c979f8c96e0f9b5d0996f9cb6e WHIRLPOOL 66dd9974f52f72dd9d01c281ecf7bed1aad39862700191ca394a5e18d339fe600292a9bee1418b318615e8bea5452d01d9c0fe6744622b452c879b75166db553 -EBUILD longterm-sources-3.12.13.ebuild 4490 SHA256 c46cd8799390dc6354e09ce2b7ac6984438cd8c979f8c96e0f9b5d0996f9cb6e WHIRLPOOL 66dd9974f52f72dd9d01c281ecf7bed1aad39862700191ca394a5e18d339fe600292a9bee1418b318615e8bea5452d01d9c0fe6744622b452c879b75166db553 -EBUILD longterm-sources-3.2.55.ebuild 4490 SHA256 c46cd8799390dc6354e09ce2b7ac6984438cd8c979f8c96e0f9b5d0996f9cb6e WHIRLPOOL 66dd9974f52f72dd9d01c281ecf7bed1aad39862700191ca394a5e18d339fe600292a9bee1418b318615e8bea5452d01d9c0fe6744622b452c879b75166db553 -EBUILD longterm-sources-3.4.82.ebuild 4490 SHA256 c46cd8799390dc6354e09ce2b7ac6984438cd8c979f8c96e0f9b5d0996f9cb6e WHIRLPOOL 66dd9974f52f72dd9d01c281ecf7bed1aad39862700191ca394a5e18d339fe600292a9bee1418b318615e8bea5452d01d9c0fe6744622b452c879b75166db553 -MISC ChangeLog 21479 SHA256 735f6bbe96a5bca22bc6b8904400689fa78ff1fd6f75c51e1a914d074c2559d9 WHIRLPOOL aeb0d6408e3421b7116bba34f616457658ede6645a3090eb517048b9926f27804e57e279f86c2209f48657d00770082128dd18ad6f8eee8dc367cbde5f3df171 +EBUILD longterm-sources-3.10.32.ebuild 170 SHA256 be0b6a4515116899d079f1a861922c41d70ec74289e3e8f2d5fa80e9f1f65ae5 WHIRLPOOL 443aef5003c5a3231ec0b1d978479a9866122fc0e2302136128d69be8ad0d982f543aa6eb5f4a72c4d28ac2d3e3e7fdff3901b0452c4184dcd71a78f4ad96bd8 +EBUILD longterm-sources-3.12.13.ebuild 170 SHA256 be0b6a4515116899d079f1a861922c41d70ec74289e3e8f2d5fa80e9f1f65ae5 WHIRLPOOL 443aef5003c5a3231ec0b1d978479a9866122fc0e2302136128d69be8ad0d982f543aa6eb5f4a72c4d28ac2d3e3e7fdff3901b0452c4184dcd71a78f4ad96bd8 +EBUILD longterm-sources-3.2.55.ebuild 170 SHA256 be0b6a4515116899d079f1a861922c41d70ec74289e3e8f2d5fa80e9f1f65ae5 WHIRLPOOL 443aef5003c5a3231ec0b1d978479a9866122fc0e2302136128d69be8ad0d982f543aa6eb5f4a72c4d28ac2d3e3e7fdff3901b0452c4184dcd71a78f4ad96bd8 +EBUILD longterm-sources-3.4.82.ebuild 170 SHA256 be0b6a4515116899d079f1a861922c41d70ec74289e3e8f2d5fa80e9f1f65ae5 WHIRLPOOL 443aef5003c5a3231ec0b1d978479a9866122fc0e2302136128d69be8ad0d982f543aa6eb5f4a72c4d28ac2d3e3e7fdff3901b0452c4184dcd71a78f4ad96bd8 +MISC ChangeLog 21691 SHA256 b0c60b668e88aea7d19bab7244d4e5c826c9050d7b305f15bbc1ce9b46c59789 WHIRLPOOL 593ba267fe05288cbd5c1c7e3fd26166ce8cabedd8a9ddf6b78566853526ba423ecccefa8a05bc2e33a4634a8edffd693a3a39dd16a9a5999802c8d5a689a643 MISC metadata.xml 254 SHA256 c56bc3d6780712c960298c70bb86867aeb6661e97a317cc624516b0e16b72fcc WHIRLPOOL 2ebbfaa14ef0c1847284fe64a79f052cd7e73b25a724fba728c084aaaf2dd0692e068eedcf42ccef7e205077f00c35780ded7ec69118dc01ddb988b4802e46ae diff --git a/sys-kernel/longterm-sources/longterm-sources-3.10.32.ebuild b/sys-kernel/longterm-sources/longterm-sources-3.10.32.ebuild index f93a01a7..a0801a8c 100644 --- a/sys-kernel/longterm-sources/longterm-sources-3.10.32.ebuild +++ b/sys-kernel/longterm-sources/longterm-sources-3.10.32.ebuild @@ -3,196 +3,6 @@ # $Header: $ EAPI=5 -ETYPE="sources" - -inherit savedconfig kernel-2 -detect_version - -SLOT="${PV%.*}" - -DESCRIPTION="Kernel stable sources and build" -HOMEPAGE="http://www.kernel.org" -SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}" +inherit linux-build KEYWORDS="amd64 x86" - -SRCDIR="${WORKDIR}/linux-${KV_FULL}" -BUILDDIR="${WORKDIR}/build" - -KV_EXTRA="${EXTRAVERSION}" -S="${SRCDIR}" - -IUSE="build source zlib lzma" -REQUIRED_USE=" - ?? ( zlib lzma ) - zlib? ( build ) - lzma? ( build ) - symlink? ( source ) - " - -DEPEND=" - sys-devel/bc - || ( - sys-apps/kmod[zlib?,lzma?] - sys-apps/module-init-tools - )" - -configval () { - local _v="CONFIG_$1" - - # Export only the needed config value - # when not already define - declare -p ${_v} > /dev/null 2>&1 \ - || . <(sed -n "/^${_v}=/ p" ${BUILDDIR}/.config) - - case "${!_v}" in - "") declare "$_v=n" ; export $_v ; return 1 ;; - *) export $_v ; return 0 ;; - esac -} - -do_prepare_build () { - mkdir "${BUILDDIR}" - - restore_config "${BUILDDIR}/.config" - if [ ! -e "${BUILDDIR}/.config" ] ; then - ewarn "Generate .config using 'defconfig'" - emake defconfig "${myopt[@]}" - fi - - mkdir "${WORKDIR}/boot" - - if configval CMDLINE_BOOL && configval CMDLINE ; then - einfo "Creating kernel.arg" - einfo " CONFIG_CMDLINE='${CONFIG_CMDLINE}'" - echo "${CONFIG_CMDLINE}" > "${WORKDIR}/boot/kernel.arg" - fi - - configval MODULES || ewarn "CONFIG_MODULES is not set" - configval UEVENT_HELPER_PATH \ - && ewarn "CONFIG_UEVENT_HELPER_PATH should be empty" -} - -src_prepare () { - bopt=( - -C "${BUILDDIR}" - -f "${SRCDIR}/Makefile" - KBUILD_SRC="${SRCDIR}" - KCONFIG_CONFIG="${BUILDDIR}/.config" - - KBUILD_BUILD_USER="${KBUILD_BUILD_USER:-$PORTAGE_USERNAME}" - ) - - copt=( - CC="$(tc-getCC)" HOSTCC="${CBUILD}-gcc" CROSS_COMPILE="${CHOST}-" - ARCH="$(tc-arch-kernel)" SUBARCH="$(tc-arch-kernel)" - ) - - vopt=( - EXTRAVERSION="${KV_EXTRA}" - LOCALVERSION= CONFIG_LOCALVERSION= - V=1 - ) - - myopt=( "${bopt[@]}" "${copt[@]}" "${vopt[@]}" ) - - use build && do_prepare_build -} - -do_compile_build () { - einfo "Checking configuration file" - emake oldconfig "${myopt[@]}" < /dev/null - - if diff -Nu0 "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" \ - | egrep -q '^(\-|\+)CONFIG_' ; then - eerror "You configuration is not up to date" - diff -Nu "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" - die "Bad configuration" - fi - - einfo "Building kernel" - emake bzImage "${myopt[@]}" - - if configval MODULES ; then - einfo "Building modules" - emake modules "${myopt[@]}" - fi -} - -src_compile () { - use build && do_compile_build -} - -do_install_sources () { - kernel-2_src_install -} - -do_install_build () { - einfo "Installing kernel" - emake install "${myopt[@]}" \ - INSTALL_PATH="${WORKDIR}/boot" - - insinto "/boot/${KV_FULL}" - - newins "${WORKDIR}/boot/config-${KV_FULL}" kernel.cfg - newins "${WORKDIR}/boot/vmlinuz-${KV_FULL}" kernel.img - newins "${WORKDIR}/boot/System.map-${KV_FULL}" System.map - - if configval CMDLINE_BOOL && configval CMDLINE ; then - doins "${WORKDIR}/boot/kernel.arg" - fi - - if configval MODULES ; then - einfo "Installing modules" - emake modules_install "${myopt[@]}" \ - INSTALL_MOD_PATH="${WORKDIR}" \ - INSTALL_MOD_STRIP="${PORTAGE_STRIP_FLAGS}" - - # kmod only support zlib and lzma - # See libkmod/libkmod-util.c / struct kmod_ext kmod_exts - if use zlib || use lzma ; then - use zlib && { local cmp="gzip -9c" ; local ext="gz" ; } - use lzma && { local cmp="xz -9c" ; local ext="xz" ; } - - einfo "Compressing modules" - find "${WORKDIR}/lib/modules" \ - -type f -name "*.ko" \ - | while read ; do - ${cmp} < "${REPLY}" > "${REPLY}.${ext}" \ - || die "${cmp} ${REPLY} failed" - rm "${REPLY}" - done - fi - - einfo "Generating modules.dep" - depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ - || die "depmod failed" - - rm "${WORKDIR}/lib/modules/${KV_FULL}/build" - rm "${WORKDIR}/lib/modules/${KV_FULL}/source" - - insinto /lib - doins -r "${WORKDIR}/lib/modules" - - # No need to make firmware_install, make modules_install does - if [ -e "${WORKDIR}/lib/firmware" ] ; then - einfo "Installing firmwares" - - insinto /lib - doins -r "${WORKDIR}/lib/firmware" - fi - fi -} - -src_install () { - use build && do_install_build - use source && do_install_sources - use savedconfig && save_config "${BUILDDIR}/.config" -} - -pkg_postinst () { - kernel-2_pkg_postinst - - einfo "You may need to:" - einfo " make menuconfig ${copt[@]}" -} diff --git a/sys-kernel/longterm-sources/longterm-sources-3.12.13.ebuild b/sys-kernel/longterm-sources/longterm-sources-3.12.13.ebuild index f93a01a7..a0801a8c 100644 --- a/sys-kernel/longterm-sources/longterm-sources-3.12.13.ebuild +++ b/sys-kernel/longterm-sources/longterm-sources-3.12.13.ebuild @@ -3,196 +3,6 @@ # $Header: $ EAPI=5 -ETYPE="sources" - -inherit savedconfig kernel-2 -detect_version - -SLOT="${PV%.*}" - -DESCRIPTION="Kernel stable sources and build" -HOMEPAGE="http://www.kernel.org" -SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}" +inherit linux-build KEYWORDS="amd64 x86" - -SRCDIR="${WORKDIR}/linux-${KV_FULL}" -BUILDDIR="${WORKDIR}/build" - -KV_EXTRA="${EXTRAVERSION}" -S="${SRCDIR}" - -IUSE="build source zlib lzma" -REQUIRED_USE=" - ?? ( zlib lzma ) - zlib? ( build ) - lzma? ( build ) - symlink? ( source ) - " - -DEPEND=" - sys-devel/bc - || ( - sys-apps/kmod[zlib?,lzma?] - sys-apps/module-init-tools - )" - -configval () { - local _v="CONFIG_$1" - - # Export only the needed config value - # when not already define - declare -p ${_v} > /dev/null 2>&1 \ - || . <(sed -n "/^${_v}=/ p" ${BUILDDIR}/.config) - - case "${!_v}" in - "") declare "$_v=n" ; export $_v ; return 1 ;; - *) export $_v ; return 0 ;; - esac -} - -do_prepare_build () { - mkdir "${BUILDDIR}" - - restore_config "${BUILDDIR}/.config" - if [ ! -e "${BUILDDIR}/.config" ] ; then - ewarn "Generate .config using 'defconfig'" - emake defconfig "${myopt[@]}" - fi - - mkdir "${WORKDIR}/boot" - - if configval CMDLINE_BOOL && configval CMDLINE ; then - einfo "Creating kernel.arg" - einfo " CONFIG_CMDLINE='${CONFIG_CMDLINE}'" - echo "${CONFIG_CMDLINE}" > "${WORKDIR}/boot/kernel.arg" - fi - - configval MODULES || ewarn "CONFIG_MODULES is not set" - configval UEVENT_HELPER_PATH \ - && ewarn "CONFIG_UEVENT_HELPER_PATH should be empty" -} - -src_prepare () { - bopt=( - -C "${BUILDDIR}" - -f "${SRCDIR}/Makefile" - KBUILD_SRC="${SRCDIR}" - KCONFIG_CONFIG="${BUILDDIR}/.config" - - KBUILD_BUILD_USER="${KBUILD_BUILD_USER:-$PORTAGE_USERNAME}" - ) - - copt=( - CC="$(tc-getCC)" HOSTCC="${CBUILD}-gcc" CROSS_COMPILE="${CHOST}-" - ARCH="$(tc-arch-kernel)" SUBARCH="$(tc-arch-kernel)" - ) - - vopt=( - EXTRAVERSION="${KV_EXTRA}" - LOCALVERSION= CONFIG_LOCALVERSION= - V=1 - ) - - myopt=( "${bopt[@]}" "${copt[@]}" "${vopt[@]}" ) - - use build && do_prepare_build -} - -do_compile_build () { - einfo "Checking configuration file" - emake oldconfig "${myopt[@]}" < /dev/null - - if diff -Nu0 "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" \ - | egrep -q '^(\-|\+)CONFIG_' ; then - eerror "You configuration is not up to date" - diff -Nu "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" - die "Bad configuration" - fi - - einfo "Building kernel" - emake bzImage "${myopt[@]}" - - if configval MODULES ; then - einfo "Building modules" - emake modules "${myopt[@]}" - fi -} - -src_compile () { - use build && do_compile_build -} - -do_install_sources () { - kernel-2_src_install -} - -do_install_build () { - einfo "Installing kernel" - emake install "${myopt[@]}" \ - INSTALL_PATH="${WORKDIR}/boot" - - insinto "/boot/${KV_FULL}" - - newins "${WORKDIR}/boot/config-${KV_FULL}" kernel.cfg - newins "${WORKDIR}/boot/vmlinuz-${KV_FULL}" kernel.img - newins "${WORKDIR}/boot/System.map-${KV_FULL}" System.map - - if configval CMDLINE_BOOL && configval CMDLINE ; then - doins "${WORKDIR}/boot/kernel.arg" - fi - - if configval MODULES ; then - einfo "Installing modules" - emake modules_install "${myopt[@]}" \ - INSTALL_MOD_PATH="${WORKDIR}" \ - INSTALL_MOD_STRIP="${PORTAGE_STRIP_FLAGS}" - - # kmod only support zlib and lzma - # See libkmod/libkmod-util.c / struct kmod_ext kmod_exts - if use zlib || use lzma ; then - use zlib && { local cmp="gzip -9c" ; local ext="gz" ; } - use lzma && { local cmp="xz -9c" ; local ext="xz" ; } - - einfo "Compressing modules" - find "${WORKDIR}/lib/modules" \ - -type f -name "*.ko" \ - | while read ; do - ${cmp} < "${REPLY}" > "${REPLY}.${ext}" \ - || die "${cmp} ${REPLY} failed" - rm "${REPLY}" - done - fi - - einfo "Generating modules.dep" - depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ - || die "depmod failed" - - rm "${WORKDIR}/lib/modules/${KV_FULL}/build" - rm "${WORKDIR}/lib/modules/${KV_FULL}/source" - - insinto /lib - doins -r "${WORKDIR}/lib/modules" - - # No need to make firmware_install, make modules_install does - if [ -e "${WORKDIR}/lib/firmware" ] ; then - einfo "Installing firmwares" - - insinto /lib - doins -r "${WORKDIR}/lib/firmware" - fi - fi -} - -src_install () { - use build && do_install_build - use source && do_install_sources - use savedconfig && save_config "${BUILDDIR}/.config" -} - -pkg_postinst () { - kernel-2_pkg_postinst - - einfo "You may need to:" - einfo " make menuconfig ${copt[@]}" -} diff --git a/sys-kernel/longterm-sources/longterm-sources-3.2.55.ebuild b/sys-kernel/longterm-sources/longterm-sources-3.2.55.ebuild index f93a01a7..a0801a8c 100644 --- a/sys-kernel/longterm-sources/longterm-sources-3.2.55.ebuild +++ b/sys-kernel/longterm-sources/longterm-sources-3.2.55.ebuild @@ -3,196 +3,6 @@ # $Header: $ EAPI=5 -ETYPE="sources" - -inherit savedconfig kernel-2 -detect_version - -SLOT="${PV%.*}" - -DESCRIPTION="Kernel stable sources and build" -HOMEPAGE="http://www.kernel.org" -SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}" +inherit linux-build KEYWORDS="amd64 x86" - -SRCDIR="${WORKDIR}/linux-${KV_FULL}" -BUILDDIR="${WORKDIR}/build" - -KV_EXTRA="${EXTRAVERSION}" -S="${SRCDIR}" - -IUSE="build source zlib lzma" -REQUIRED_USE=" - ?? ( zlib lzma ) - zlib? ( build ) - lzma? ( build ) - symlink? ( source ) - " - -DEPEND=" - sys-devel/bc - || ( - sys-apps/kmod[zlib?,lzma?] - sys-apps/module-init-tools - )" - -configval () { - local _v="CONFIG_$1" - - # Export only the needed config value - # when not already define - declare -p ${_v} > /dev/null 2>&1 \ - || . <(sed -n "/^${_v}=/ p" ${BUILDDIR}/.config) - - case "${!_v}" in - "") declare "$_v=n" ; export $_v ; return 1 ;; - *) export $_v ; return 0 ;; - esac -} - -do_prepare_build () { - mkdir "${BUILDDIR}" - - restore_config "${BUILDDIR}/.config" - if [ ! -e "${BUILDDIR}/.config" ] ; then - ewarn "Generate .config using 'defconfig'" - emake defconfig "${myopt[@]}" - fi - - mkdir "${WORKDIR}/boot" - - if configval CMDLINE_BOOL && configval CMDLINE ; then - einfo "Creating kernel.arg" - einfo " CONFIG_CMDLINE='${CONFIG_CMDLINE}'" - echo "${CONFIG_CMDLINE}" > "${WORKDIR}/boot/kernel.arg" - fi - - configval MODULES || ewarn "CONFIG_MODULES is not set" - configval UEVENT_HELPER_PATH \ - && ewarn "CONFIG_UEVENT_HELPER_PATH should be empty" -} - -src_prepare () { - bopt=( - -C "${BUILDDIR}" - -f "${SRCDIR}/Makefile" - KBUILD_SRC="${SRCDIR}" - KCONFIG_CONFIG="${BUILDDIR}/.config" - - KBUILD_BUILD_USER="${KBUILD_BUILD_USER:-$PORTAGE_USERNAME}" - ) - - copt=( - CC="$(tc-getCC)" HOSTCC="${CBUILD}-gcc" CROSS_COMPILE="${CHOST}-" - ARCH="$(tc-arch-kernel)" SUBARCH="$(tc-arch-kernel)" - ) - - vopt=( - EXTRAVERSION="${KV_EXTRA}" - LOCALVERSION= CONFIG_LOCALVERSION= - V=1 - ) - - myopt=( "${bopt[@]}" "${copt[@]}" "${vopt[@]}" ) - - use build && do_prepare_build -} - -do_compile_build () { - einfo "Checking configuration file" - emake oldconfig "${myopt[@]}" < /dev/null - - if diff -Nu0 "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" \ - | egrep -q '^(\-|\+)CONFIG_' ; then - eerror "You configuration is not up to date" - diff -Nu "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" - die "Bad configuration" - fi - - einfo "Building kernel" - emake bzImage "${myopt[@]}" - - if configval MODULES ; then - einfo "Building modules" - emake modules "${myopt[@]}" - fi -} - -src_compile () { - use build && do_compile_build -} - -do_install_sources () { - kernel-2_src_install -} - -do_install_build () { - einfo "Installing kernel" - emake install "${myopt[@]}" \ - INSTALL_PATH="${WORKDIR}/boot" - - insinto "/boot/${KV_FULL}" - - newins "${WORKDIR}/boot/config-${KV_FULL}" kernel.cfg - newins "${WORKDIR}/boot/vmlinuz-${KV_FULL}" kernel.img - newins "${WORKDIR}/boot/System.map-${KV_FULL}" System.map - - if configval CMDLINE_BOOL && configval CMDLINE ; then - doins "${WORKDIR}/boot/kernel.arg" - fi - - if configval MODULES ; then - einfo "Installing modules" - emake modules_install "${myopt[@]}" \ - INSTALL_MOD_PATH="${WORKDIR}" \ - INSTALL_MOD_STRIP="${PORTAGE_STRIP_FLAGS}" - - # kmod only support zlib and lzma - # See libkmod/libkmod-util.c / struct kmod_ext kmod_exts - if use zlib || use lzma ; then - use zlib && { local cmp="gzip -9c" ; local ext="gz" ; } - use lzma && { local cmp="xz -9c" ; local ext="xz" ; } - - einfo "Compressing modules" - find "${WORKDIR}/lib/modules" \ - -type f -name "*.ko" \ - | while read ; do - ${cmp} < "${REPLY}" > "${REPLY}.${ext}" \ - || die "${cmp} ${REPLY} failed" - rm "${REPLY}" - done - fi - - einfo "Generating modules.dep" - depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ - || die "depmod failed" - - rm "${WORKDIR}/lib/modules/${KV_FULL}/build" - rm "${WORKDIR}/lib/modules/${KV_FULL}/source" - - insinto /lib - doins -r "${WORKDIR}/lib/modules" - - # No need to make firmware_install, make modules_install does - if [ -e "${WORKDIR}/lib/firmware" ] ; then - einfo "Installing firmwares" - - insinto /lib - doins -r "${WORKDIR}/lib/firmware" - fi - fi -} - -src_install () { - use build && do_install_build - use source && do_install_sources - use savedconfig && save_config "${BUILDDIR}/.config" -} - -pkg_postinst () { - kernel-2_pkg_postinst - - einfo "You may need to:" - einfo " make menuconfig ${copt[@]}" -} diff --git a/sys-kernel/longterm-sources/longterm-sources-3.4.82.ebuild b/sys-kernel/longterm-sources/longterm-sources-3.4.82.ebuild index f93a01a7..a0801a8c 100644 --- a/sys-kernel/longterm-sources/longterm-sources-3.4.82.ebuild +++ b/sys-kernel/longterm-sources/longterm-sources-3.4.82.ebuild @@ -3,196 +3,6 @@ # $Header: $ EAPI=5 -ETYPE="sources" - -inherit savedconfig kernel-2 -detect_version - -SLOT="${PV%.*}" - -DESCRIPTION="Kernel stable sources and build" -HOMEPAGE="http://www.kernel.org" -SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}" +inherit linux-build KEYWORDS="amd64 x86" - -SRCDIR="${WORKDIR}/linux-${KV_FULL}" -BUILDDIR="${WORKDIR}/build" - -KV_EXTRA="${EXTRAVERSION}" -S="${SRCDIR}" - -IUSE="build source zlib lzma" -REQUIRED_USE=" - ?? ( zlib lzma ) - zlib? ( build ) - lzma? ( build ) - symlink? ( source ) - " - -DEPEND=" - sys-devel/bc - || ( - sys-apps/kmod[zlib?,lzma?] - sys-apps/module-init-tools - )" - -configval () { - local _v="CONFIG_$1" - - # Export only the needed config value - # when not already define - declare -p ${_v} > /dev/null 2>&1 \ - || . <(sed -n "/^${_v}=/ p" ${BUILDDIR}/.config) - - case "${!_v}" in - "") declare "$_v=n" ; export $_v ; return 1 ;; - *) export $_v ; return 0 ;; - esac -} - -do_prepare_build () { - mkdir "${BUILDDIR}" - - restore_config "${BUILDDIR}/.config" - if [ ! -e "${BUILDDIR}/.config" ] ; then - ewarn "Generate .config using 'defconfig'" - emake defconfig "${myopt[@]}" - fi - - mkdir "${WORKDIR}/boot" - - if configval CMDLINE_BOOL && configval CMDLINE ; then - einfo "Creating kernel.arg" - einfo " CONFIG_CMDLINE='${CONFIG_CMDLINE}'" - echo "${CONFIG_CMDLINE}" > "${WORKDIR}/boot/kernel.arg" - fi - - configval MODULES || ewarn "CONFIG_MODULES is not set" - configval UEVENT_HELPER_PATH \ - && ewarn "CONFIG_UEVENT_HELPER_PATH should be empty" -} - -src_prepare () { - bopt=( - -C "${BUILDDIR}" - -f "${SRCDIR}/Makefile" - KBUILD_SRC="${SRCDIR}" - KCONFIG_CONFIG="${BUILDDIR}/.config" - - KBUILD_BUILD_USER="${KBUILD_BUILD_USER:-$PORTAGE_USERNAME}" - ) - - copt=( - CC="$(tc-getCC)" HOSTCC="${CBUILD}-gcc" CROSS_COMPILE="${CHOST}-" - ARCH="$(tc-arch-kernel)" SUBARCH="$(tc-arch-kernel)" - ) - - vopt=( - EXTRAVERSION="${KV_EXTRA}" - LOCALVERSION= CONFIG_LOCALVERSION= - V=1 - ) - - myopt=( "${bopt[@]}" "${copt[@]}" "${vopt[@]}" ) - - use build && do_prepare_build -} - -do_compile_build () { - einfo "Checking configuration file" - emake oldconfig "${myopt[@]}" < /dev/null - - if diff -Nu0 "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" \ - | egrep -q '^(\-|\+)CONFIG_' ; then - eerror "You configuration is not up to date" - diff -Nu "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" - die "Bad configuration" - fi - - einfo "Building kernel" - emake bzImage "${myopt[@]}" - - if configval MODULES ; then - einfo "Building modules" - emake modules "${myopt[@]}" - fi -} - -src_compile () { - use build && do_compile_build -} - -do_install_sources () { - kernel-2_src_install -} - -do_install_build () { - einfo "Installing kernel" - emake install "${myopt[@]}" \ - INSTALL_PATH="${WORKDIR}/boot" - - insinto "/boot/${KV_FULL}" - - newins "${WORKDIR}/boot/config-${KV_FULL}" kernel.cfg - newins "${WORKDIR}/boot/vmlinuz-${KV_FULL}" kernel.img - newins "${WORKDIR}/boot/System.map-${KV_FULL}" System.map - - if configval CMDLINE_BOOL && configval CMDLINE ; then - doins "${WORKDIR}/boot/kernel.arg" - fi - - if configval MODULES ; then - einfo "Installing modules" - emake modules_install "${myopt[@]}" \ - INSTALL_MOD_PATH="${WORKDIR}" \ - INSTALL_MOD_STRIP="${PORTAGE_STRIP_FLAGS}" - - # kmod only support zlib and lzma - # See libkmod/libkmod-util.c / struct kmod_ext kmod_exts - if use zlib || use lzma ; then - use zlib && { local cmp="gzip -9c" ; local ext="gz" ; } - use lzma && { local cmp="xz -9c" ; local ext="xz" ; } - - einfo "Compressing modules" - find "${WORKDIR}/lib/modules" \ - -type f -name "*.ko" \ - | while read ; do - ${cmp} < "${REPLY}" > "${REPLY}.${ext}" \ - || die "${cmp} ${REPLY} failed" - rm "${REPLY}" - done - fi - - einfo "Generating modules.dep" - depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ - || die "depmod failed" - - rm "${WORKDIR}/lib/modules/${KV_FULL}/build" - rm "${WORKDIR}/lib/modules/${KV_FULL}/source" - - insinto /lib - doins -r "${WORKDIR}/lib/modules" - - # No need to make firmware_install, make modules_install does - if [ -e "${WORKDIR}/lib/firmware" ] ; then - einfo "Installing firmwares" - - insinto /lib - doins -r "${WORKDIR}/lib/firmware" - fi - fi -} - -src_install () { - use build && do_install_build - use source && do_install_sources - use savedconfig && save_config "${BUILDDIR}/.config" -} - -pkg_postinst () { - kernel-2_pkg_postinst - - einfo "You may need to:" - einfo " make menuconfig ${copt[@]}" -} diff --git a/sys-kernel/stable-sources/ChangeLog b/sys-kernel/stable-sources/ChangeLog index 4b6ff472..5dd31dc6 100644 --- a/sys-kernel/stable-sources/ChangeLog +++ b/sys-kernel/stable-sources/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 26 Feb 2014; Bertrand Jacquin <beber@meleeweb.net> + stable-sources-3.11.10.ebuild, stable-sources-3.13.5.ebuild: + sys-kernel: Eclassify + *stable-sources-3.13.5 (26 Feb 2014) 26 Feb 2014; Bertrand Jacquin <beber@meleeweb.net> diff --git a/sys-kernel/stable-sources/Manifest b/sys-kernel/stable-sources/Manifest index f3b9013e..7c0c6c03 100644 --- a/sys-kernel/stable-sources/Manifest +++ b/sys-kernel/stable-sources/Manifest @@ -2,7 +2,7 @@ DIST linux-3.11.tar.xz 75082460 SHA256 803ec8f0ad4b2ddedcb0332a590cd2b5e10dfc57c DIST linux-3.13.tar.xz 77187032 SHA256 4d5e5eee5f276424c32e9591f1b6c971baedc7b49f28ce03d1f48b1e5d6226a2 WHIRLPOOL 2992257a17e85b3eb16fcaf21678fa6dbf31f80c2099fd1ad0ff9852ac1d16122ac8e2c0b46421d8895d4368253a724e439cd625307ee7af7bd1e50cb2c9b62a DIST patch-3.11.10.xz 198516 SHA256 b12321f0d62476211662945361178819b134964babd238a67dab0824edcf19b1 WHIRLPOOL 5a359009b6073083586fabe2df1c2dc75290d2b3613426a3063a1a02e7e80a5a52fd3331ee8ed4554b34281ad9961fd572d75016311ab34492b05d2e27125520 DIST patch-3.13.5.xz 129252 SHA256 074fdf3079b943540918d487ded1a13087b9a31f07feddef03fcf1bbb90f1091 WHIRLPOOL 78bce868395dd02d7e68c044cc27555facb04e99db7e5317557c6ee33584c942c9a9aaec98943c0dd5258a2de715e3fdaa3331d3eae8e7658ca0624b0f3a9e59 -EBUILD stable-sources-3.11.10.ebuild 4492 SHA256 f42dc38b5c9f71ab74e25a97709ffa0ed5522eb37f0dbf71651a7694d6a1edf5 WHIRLPOOL 43e0158c3d0c427770296e497a2000bd9ef7b5c8f5bf3b554b1bb3401f8e492c73c7ead854aae6e614f22040ffa2054557f7f8d5e1c7ab7c62ae0bc44f3f3cbf -EBUILD stable-sources-3.13.5.ebuild 4492 SHA256 066ad94af1e644a5a4261ef355f3d9a6d1e4e975ebf24168f7415b1b7f5e26c0 WHIRLPOOL 82d3757690f87fdc7b646bd10c35e4e7044cfdf681db675d5de26ccba22e9ad07ba22420a2dad41bb9a477f516c243bd24bc481b0d1b5ac5e17bb8827b77b9cc -MISC ChangeLog 14217 SHA256 f05c1cee8f8509774e8882b2d030109d033ef36847bb3b80f55b3b3bd6480b3c WHIRLPOOL 1099412651e3690a910d879597ffdf3429d2436e881f97d9bed4b8eca1174029ab676adbaa5881291901fb9f9692feb6e333f69c52fb0287d867de4fc9c72e39 +EBUILD stable-sources-3.11.10.ebuild 172 SHA256 7b6b7dcf7728344085cc3c74211ec67f00f6739be02926d890f6ee44e653e29c WHIRLPOOL 79298a398cb94c582d74168820923ba0fe03d863f3c2fe15e4529e129f96ce86d0dd93fa01d8c7241657751572b8f7aae87243fd0d176645ab99028e9f3fc5a9 +EBUILD stable-sources-3.13.5.ebuild 172 SHA256 7b6b7dcf7728344085cc3c74211ec67f00f6739be02926d890f6ee44e653e29c WHIRLPOOL 79298a398cb94c582d74168820923ba0fe03d863f3c2fe15e4529e129f96ce86d0dd93fa01d8c7241657751572b8f7aae87243fd0d176645ab99028e9f3fc5a9 +MISC ChangeLog 14358 SHA256 4eea9fb677f49f5f055866e5b834f3fc8fb5659105fd363c404baf0989a36bb0 WHIRLPOOL a380c5eaf2c9e728801d4ff9cacc6609ce0ff47b07919c2d16cbd7d36e750ada5f6e553b4ff77687552b8e96d859b8c65443d9e5199bdbfea54273e187c5dbf3 MISC metadata.xml 254 SHA256 c56bc3d6780712c960298c70bb86867aeb6661e97a317cc624516b0e16b72fcc WHIRLPOOL 2ebbfaa14ef0c1847284fe64a79f052cd7e73b25a724fba728c084aaaf2dd0692e068eedcf42ccef7e205077f00c35780ded7ec69118dc01ddb988b4802e46ae diff --git a/sys-kernel/stable-sources/stable-sources-3.11.10.ebuild b/sys-kernel/stable-sources/stable-sources-3.11.10.ebuild index 45d33212..ad98df29 100644 --- a/sys-kernel/stable-sources/stable-sources-3.11.10.ebuild +++ b/sys-kernel/stable-sources/stable-sources-3.11.10.ebuild @@ -1,198 +1,8 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 -ETYPE="sources" - -inherit savedconfig kernel-2 -detect_version - -SLOT="${PV%.*}" - -DESCRIPTION="Kernel stable sources and build" -HOMEPAGE="http://www.kernel.org" -SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}" +inherit linux-build KEYWORDS="~amd64 ~x86" - -SRCDIR="${WORKDIR}/linux-${KV_FULL}" -BUILDDIR="${WORKDIR}/build" - -KV_EXTRA="${EXTRAVERSION}" -S="${SRCDIR}" - -IUSE="build source zlib lzma" -REQUIRED_USE=" - ?? ( zlib lzma ) - zlib? ( build ) - lzma? ( build ) - symlink? ( source ) - " - -DEPEND=" - sys-devel/bc - || ( - sys-apps/kmod[zlib?,lzma?] - sys-apps/module-init-tools - )" - -configval () { - local _v="CONFIG_$1" - - # Export only the needed config value - # when not already define - declare -p ${_v} > /dev/null 2>&1 \ - || . <(sed -n "/^${_v}=/ p" ${BUILDDIR}/.config) - - case "${!_v}" in - "") declare "$_v=n" ; export $_v ; return 1 ;; - *) export $_v ; return 0 ;; - esac -} - -do_prepare_build () { - mkdir "${BUILDDIR}" - - restore_config "${BUILDDIR}/.config" - if [ ! -e "${BUILDDIR}/.config" ] ; then - ewarn "Generate .config using 'defconfig'" - emake defconfig "${myopt[@]}" - fi - - mkdir "${WORKDIR}/boot" - - if configval CMDLINE_BOOL && configval CMDLINE ; then - einfo "Creating kernel.arg" - einfo " CONFIG_CMDLINE='${CONFIG_CMDLINE}'" - echo "${CONFIG_CMDLINE}" > "${WORKDIR}/boot/kernel.arg" - fi - - configval MODULES || ewarn "CONFIG_MODULES is not set" - configval UEVENT_HELPER_PATH \ - && ewarn "CONFIG_UEVENT_HELPER_PATH should be empty" -} - -src_prepare () { - bopt=( - -C "${BUILDDIR}" - -f "${SRCDIR}/Makefile" - KBUILD_SRC="${SRCDIR}" - KCONFIG_CONFIG="${BUILDDIR}/.config" - - KBUILD_BUILD_USER="${KBUILD_BUILD_USER:-$PORTAGE_USERNAME}" - ) - - copt=( - CC="$(tc-getCC)" HOSTCC="${CBUILD}-gcc" CROSS_COMPILE="${CHOST}-" - ARCH="$(tc-arch-kernel)" SUBARCH="$(tc-arch-kernel)" - ) - - vopt=( - EXTRAVERSION="${KV_EXTRA}" - LOCALVERSION= CONFIG_LOCALVERSION= - V=1 - ) - - myopt=( "${bopt[@]}" "${copt[@]}" "${vopt[@]}" ) - - use build && do_prepare_build -} - -do_compile_build () { - einfo "Checking configuration file" - emake oldconfig "${myopt[@]}" < /dev/null - - if diff -Nu0 "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" \ - | egrep -q '^(\-|\+)CONFIG_' ; then - eerror "You configuration is not up to date" - diff -Nu "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" - die "Bad configuration" - fi - - einfo "Building kernel" - emake bzImage "${myopt[@]}" - - if configval MODULES ; then - einfo "Building modules" - emake modules "${myopt[@]}" - fi -} - -src_compile () { - use build && do_compile_build -} - -do_install_sources () { - kernel-2_src_install -} - -do_install_build () { - einfo "Installing kernel" - emake install "${myopt[@]}" \ - INSTALL_PATH="${WORKDIR}/boot" - - insinto "/boot/${KV_FULL}" - - newins "${WORKDIR}/boot/config-${KV_FULL}" kernel.cfg - newins "${WORKDIR}/boot/vmlinuz-${KV_FULL}" kernel.img - newins "${WORKDIR}/boot/System.map-${KV_FULL}" System.map - - if configval CMDLINE_BOOL && configval CMDLINE ; then - doins "${WORKDIR}/boot/kernel.arg" - fi - - if configval MODULES ; then - einfo "Installing modules" - emake modules_install "${myopt[@]}" \ - INSTALL_MOD_PATH="${WORKDIR}" \ - INSTALL_MOD_STRIP="${PORTAGE_STRIP_FLAGS}" - - # kmod only support zlib and lzma - # See libkmod/libkmod-util.c / struct kmod_ext kmod_exts - if use zlib || use lzma ; then - use zlib && { local cmp="gzip -9c" ; local ext="gz" ; } - use lzma && { local cmp="xz -9c" ; local ext="xz" ; } - - einfo "Compressing modules" - find "${WORKDIR}/lib/modules" \ - -type f -name "*.ko" \ - | while read ; do - ${cmp} < "${REPLY}" > "${REPLY}.${ext}" \ - || die "${cmp} ${REPLY} failed" - rm "${REPLY}" - done - fi - - einfo "Generating modules.dep" - depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ - || die "depmod failed" - - rm "${WORKDIR}/lib/modules/${KV_FULL}/build" - rm "${WORKDIR}/lib/modules/${KV_FULL}/source" - - insinto /lib - doins -r "${WORKDIR}/lib/modules" - - # No need to make firmware_install, make modules_install does - if [ -e "${WORKDIR}/lib/firmware" ] ; then - einfo "Installing firmwares" - - insinto /lib - doins -r "${WORKDIR}/lib/firmware" - fi - fi -} - -src_install () { - use build && do_install_build - use source && do_install_sources - use savedconfig && save_config "${BUILDDIR}/.config" -} - -pkg_postinst () { - kernel-2_pkg_postinst - - einfo "You may need to:" - einfo " make menuconfig ${copt[@]}" -} diff --git a/sys-kernel/stable-sources/stable-sources-3.13.5.ebuild b/sys-kernel/stable-sources/stable-sources-3.13.5.ebuild index 9eb2d95a..ad98df29 100644 --- a/sys-kernel/stable-sources/stable-sources-3.13.5.ebuild +++ b/sys-kernel/stable-sources/stable-sources-3.13.5.ebuild @@ -3,196 +3,6 @@ # $Header: $ EAPI=5 -ETYPE="sources" - -inherit savedconfig kernel-2 -detect_version - -SLOT="${PV%.*}" - -DESCRIPTION="Kernel stable sources and build" -HOMEPAGE="http://www.kernel.org" -SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}" +inherit linux-build KEYWORDS="~amd64 ~x86" - -SRCDIR="${WORKDIR}/linux-${KV_FULL}" -BUILDDIR="${WORKDIR}/build" - -KV_EXTRA="${EXTRAVERSION}" -S="${SRCDIR}" - -IUSE="build source zlib lzma" -REQUIRED_USE=" - ?? ( zlib lzma ) - zlib? ( build ) - lzma? ( build ) - symlink? ( source ) - " - -DEPEND=" - sys-devel/bc - || ( - sys-apps/kmod[zlib?,lzma?] - sys-apps/module-init-tools - )" - -configval () { - local _v="CONFIG_$1" - - # Export only the needed config value - # when not already define - declare -p ${_v} > /dev/null 2>&1 \ - || . <(sed -n "/^${_v}=/ p" ${BUILDDIR}/.config) - - case "${!_v}" in - "") declare "$_v=n" ; export $_v ; return 1 ;; - *) export $_v ; return 0 ;; - esac -} - -do_prepare_build () { - mkdir "${BUILDDIR}" - - restore_config "${BUILDDIR}/.config" - if [ ! -e "${BUILDDIR}/.config" ] ; then - ewarn "Generate .config using 'defconfig'" - emake defconfig "${myopt[@]}" - fi - - mkdir "${WORKDIR}/boot" - - if configval CMDLINE_BOOL && configval CMDLINE ; then - einfo "Creating kernel.arg" - einfo " CONFIG_CMDLINE='${CONFIG_CMDLINE}'" - echo "${CONFIG_CMDLINE}" > "${WORKDIR}/boot/kernel.arg" - fi - - configval MODULES || ewarn "CONFIG_MODULES is not set" - configval UEVENT_HELPER_PATH \ - && ewarn "CONFIG_UEVENT_HELPER_PATH should be empty" -} - -src_prepare () { - bopt=( - -C "${BUILDDIR}" - -f "${SRCDIR}/Makefile" - KBUILD_SRC="${SRCDIR}" - KCONFIG_CONFIG="${BUILDDIR}/.config" - - KBUILD_BUILD_USER="${KBUILD_BUILD_USER:-$PORTAGE_USERNAME}" - ) - - copt=( - CC="$(tc-getCC)" HOSTCC="${CBUILD}-gcc" CROSS_COMPILE="${CHOST}-" - ARCH="$(tc-arch-kernel)" SUBARCH="$(tc-arch-kernel)" - ) - - vopt=( - EXTRAVERSION="${KV_EXTRA}" - LOCALVERSION= CONFIG_LOCALVERSION= - V=1 - ) - - myopt=( "${bopt[@]}" "${copt[@]}" "${vopt[@]}" ) - - use build && do_prepare_build -} - -do_compile_build () { - einfo "Checking configuration file" - emake oldconfig "${myopt[@]}" < /dev/null - - if diff -Nu0 "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" \ - | egrep -q '^(\-|\+)CONFIG_' ; then - eerror "You configuration is not up to date" - diff -Nu "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" - die "Bad configuration" - fi - - einfo "Building kernel" - emake bzImage "${myopt[@]}" - - if configval MODULES ; then - einfo "Building modules" - emake modules "${myopt[@]}" - fi -} - -src_compile () { - use build && do_compile_build -} - -do_install_sources () { - kernel-2_src_install -} - -do_install_build () { - einfo "Installing kernel" - emake install "${myopt[@]}" \ - INSTALL_PATH="${WORKDIR}/boot" - - insinto "/boot/${KV_FULL}" - - newins "${WORKDIR}/boot/config-${KV_FULL}" kernel.cfg - newins "${WORKDIR}/boot/vmlinuz-${KV_FULL}" kernel.img - newins "${WORKDIR}/boot/System.map-${KV_FULL}" System.map - - if configval CMDLINE_BOOL && configval CMDLINE ; then - doins "${WORKDIR}/boot/kernel.arg" - fi - - if configval MODULES ; then - einfo "Installing modules" - emake modules_install "${myopt[@]}" \ - INSTALL_MOD_PATH="${WORKDIR}" \ - INSTALL_MOD_STRIP="${PORTAGE_STRIP_FLAGS}" - - # kmod only support zlib and lzma - # See libkmod/libkmod-util.c / struct kmod_ext kmod_exts - if use zlib || use lzma ; then - use zlib && { local cmp="gzip -9c" ; local ext="gz" ; } - use lzma && { local cmp="xz -9c" ; local ext="xz" ; } - - einfo "Compressing modules" - find "${WORKDIR}/lib/modules" \ - -type f -name "*.ko" \ - | while read ; do - ${cmp} < "${REPLY}" > "${REPLY}.${ext}" \ - || die "${cmp} ${REPLY} failed" - rm "${REPLY}" - done - fi - - einfo "Generating modules.dep" - depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ - || die "depmod failed" - - rm "${WORKDIR}/lib/modules/${KV_FULL}/build" - rm "${WORKDIR}/lib/modules/${KV_FULL}/source" - - insinto /lib - doins -r "${WORKDIR}/lib/modules" - - # No need to make firmware_install, make modules_install does - if [ -e "${WORKDIR}/lib/firmware" ] ; then - einfo "Installing firmwares" - - insinto /lib - doins -r "${WORKDIR}/lib/firmware" - fi - fi -} - -src_install () { - use build && do_install_build - use source && do_install_sources - use savedconfig && save_config "${BUILDDIR}/.config" -} - -pkg_postinst () { - kernel-2_pkg_postinst - - einfo "You may need to:" - einfo " make menuconfig ${copt[@]}" -} |