Eclass calculate-kernel-2 use calculate-builder cl-kernel for kernel compilation, installation and optimization initramfs. All new kernel ebuild will be used calculate-kernel-2 eclass instead depricated calculate-kernel.atratsevskiy
parent
840c962ba4
commit
715e53a5bb
@ -0,0 +1,129 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
#
|
||||
# Original Author: © 2007-2009 Mir Calculate, Ltd.
|
||||
# Purpose: Installing linux-desktop, linux-server.
|
||||
# Build the kernel from source.
|
||||
|
||||
inherit calculate eutils kernel-2
|
||||
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst
|
||||
|
||||
IUSE="vmlinuz"
|
||||
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
SLOT=$(get_version_component_range 1-4)
|
||||
KV_FULL="${PV}-calculate"
|
||||
S="${WORKDIR}/linux-${KV_FULL}"
|
||||
|
||||
CALC_K_SUBV=.$(get_version_component_range 4)
|
||||
[[ ${CALC_K_SUBV} == "." ]] && CALC_K_SUBV=
|
||||
|
||||
EXTRAVERSION="${CALC_K_SUBV}-calculate"
|
||||
|
||||
UNIPATCH_STRICTORDER=1
|
||||
|
||||
CALC_URI="ftp://ftp.calculate.ru/pub/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
ftp://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
calculate-kernel-2_pkg_setup() {
|
||||
kernel-2_pkg_setup
|
||||
ewarn "Perform command for update modules after kernel building:"
|
||||
ewarn " module-rebuild -X rebuild"
|
||||
ebeep 5
|
||||
}
|
||||
|
||||
calculate-kernel-2_src_unpack() {
|
||||
kernel-2_src_unpack
|
||||
}
|
||||
|
||||
vmlinuz_src_compile() {
|
||||
# disable sandbox
|
||||
export SANDBOX_ON=0
|
||||
export LDFLAGS=""
|
||||
local GENTOOARCH="${ARCH}"
|
||||
unset ARCH
|
||||
|
||||
cd ${S}
|
||||
DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" cl-kernel \
|
||||
--ebuild \
|
||||
--kerneldir=${S} \
|
||||
--set cl_kernel_cache_path=${WORKDIR}/cache \
|
||||
--set cl_kernel_temp_path=${S}/temp \
|
||||
--set cl_kernel_install_path=${WORKDIR} \
|
||||
--mrproper || die "kernel build failed"
|
||||
|
||||
make distclean &>/dev/null || die "cannot perform distclean"
|
||||
ARCH="${GENTOOARCH}"
|
||||
|
||||
rm ${WORKDIR}/lib/modules/${KV_FULL}/build
|
||||
rm ${WORKDIR}/lib/modules/${KV_FULL}/source
|
||||
}
|
||||
|
||||
calculate-kernel-2_src_compile() {
|
||||
use vmlinuz && vmlinuz_src_compile
|
||||
}
|
||||
|
||||
vmlinuz_src_install() {
|
||||
cd ${WORKDIR}/lib
|
||||
insinto /lib
|
||||
doins -r modules
|
||||
dodir /usr/share/${PN}/${PV}
|
||||
insinto /usr/share/${PN}/${PV}
|
||||
doins -r firmware
|
||||
cd ${WORKDIR}
|
||||
doins -r boot
|
||||
|
||||
dosym /usr/src/linux-${KV_FULL} \
|
||||
"/lib/modules/${KV_FULL}/source" ||
|
||||
die "cannot install source symlink"
|
||||
dosym /usr/src/linux-${KV_FULL} \
|
||||
"/lib/modules/${KV_FULL}/build" ||
|
||||
die "cannot install build symlink"
|
||||
insinto /etc/modprobe.d
|
||||
|
||||
newins "${FILESDIR}"/modprobe_i915.conf i915.conf || die
|
||||
}
|
||||
|
||||
calculate-kernel-2_src_install() {
|
||||
kernel-2_src_install
|
||||
use vmlinuz && vmlinuz_src_install
|
||||
}
|
||||
|
||||
vmlinuz_pkg_postinst() {
|
||||
cp -p /usr/share/${PN}/${PV}/boot/* ${ROOT}/boot/
|
||||
cl-kernel --ebuild \
|
||||
--set cl_kernel_src_path=/usr/src/linux-${KV_FULL} \
|
||||
--set cl_kernel_install_path=${ROOT}/
|
||||
|
||||
mkdir -p ${ROOT}/lib/firmware
|
||||
cp -a ${ROOT}/usr/share/${PN}/${PV}/firmware/* ${ROOT}/lib/firmware/
|
||||
calculate_update_depmod
|
||||
calculate_update_modules
|
||||
|
||||
[[ -f $MODULESDBFILE ]] &&
|
||||
sed -ri 's/a:1:sys-fs\/aufs2/a:0:sys-fs\/aufs2/' $MODULESDBFILE
|
||||
}
|
||||
|
||||
calculate-kernel-2_pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
|
||||
KV_OUT_DIR=${ROOT}/usr/src/linux-${KV_FULL}
|
||||
cp -p /usr/share/${PN}/${PV}/boot/System.map* ${KV_OUT_DIR}/System.map
|
||||
cp -p /usr/share/${PN}/${PV}/boot/config* ${KV_OUT_DIR}/.config
|
||||
cd ${KV_OUT_DIR}
|
||||
local GENTOOARCH="${ARCH}"
|
||||
unset ARCH
|
||||
ebegin "kernel: >> Running modules_prepare..."
|
||||
make modules_prepare &>/dev/null
|
||||
eend $? "Failed modules prepare"
|
||||
ARCH="${GENTOOARCH}"
|
||||
|
||||
use vmlinuz && vmlinuz_pkg_postinst
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
# ChangeLog for sys-apps/calculate-builder
|
||||
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Header: $
|
||||
|
||||
*calculate-builder-2.2.9999 (15 Sep 2010)
|
||||
|
||||
15 Sep 2010; Mike Hiretsky (mhiretskiy) <mh@calculate.ru>
|
||||
+calculate-builder-2.2.9999.ebuild, +metadata.xml:
|
||||
Add live ebuild.
|
||||
|
@ -0,0 +1,3 @@
|
||||
EBUILD calculate-builder-2.2.9999.ebuild 478 RMD160 6db2a7a0826b7d2492a0ab57057f83282427fa9c SHA1 7787dff362d8d7bb17f6a9cb2e892b9d8f3986da SHA256 f0836ca71625ca6210893fa654040928a33ba50f23ae7873ddb43431242781de
|
||||
MISC ChangeLog 303 RMD160 11b9d704a59fa736234f1d7c2ac5a54866878fa9 SHA1 45b29950ec2350a03435e9573612055e45b28b4d SHA256 53af6be041d7a4a337999f4474cfdc057fb0f899a38023a6ba208bff968d60c7
|
||||
MISC metadata.xml 270 RMD160 b5ff308a82cd6e594c2f04731cdbe9f80a945042 SHA1 58dbf7eb15bb2e6c6c8514f483e51dfacd1c62e9 SHA256 b65e150429ecbf36cf03d094f4e3e7518f536c61289cecff6b817326703d58a0
|
@ -0,0 +1,20 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit distutils git
|
||||
|
||||
EGIT_COMMIT=""
|
||||
EGIT_REPO_URI="git://git.calculate.ru/calculate-builder.git"
|
||||
|
||||
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND="~sys-apps/calculate-install-2.2.9999"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>maintainer-wanted</herd>
|
||||
<longdescription lang="en">
|
||||
The utilities for builder tasks of Calculate Linux.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
||||
|
Loading…
Reference in new issue