Удалены устаревшие eclass для сборки ядре. Добавлен новый calculate-kernel-6.eclass для сборки ядра на dracut. profile.bashrc изменен для вызова скриптов из /etc/calculate/profile.bashrc.d. Старый profile.bashrc переименован в profile.bashrc В утилитах добавлен параметр postmerge для вызова шаблонов после postinst. Добавлен patch для dracut для сборки им ядра через emergeatratsevskiy
parent
2f19d703ff
commit
f1cce1a38f
@ -1,154 +0,0 @@
|
||||
# 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
|
||||
|
||||
|
||||
if [[ "$(get_version_component_range 1)" == "3" ]]
|
||||
then
|
||||
CKV=$(get_version_component_range 1-2)
|
||||
else
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
fi
|
||||
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://ftp.calculate-linux.org/pub/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"
|
||||
|
||||
if [[ -n $LONGTERM ]];then
|
||||
if [[ $KERNEL_URI =~ ^(.*)(kernel/v2.6/patch)(.*)$ ]];then
|
||||
KERNEL_URI="${BASH_REMATCH[1]}kernel/v2.6/longterm/v${CKV}/patch${BASH_REMATCH[3]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
calculate-kernel-2_pkg_setup() {
|
||||
kernel-2_pkg_setup
|
||||
ewarn "!!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!"
|
||||
ewarn "After the kernel assemble perform command to update modules:"
|
||||
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 \
|
||||
${CL_KERNEL_OPTS} \
|
||||
--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
|
||||
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
|
||||
}
|
||||
|
||||
calculate-kernel-2_src_install() {
|
||||
kernel-2_src_install
|
||||
dodir /usr/share/${PN}/${PV}/boot
|
||||
use vmlinuz && vmlinuz_src_install
|
||||
if ! use vmlinuz
|
||||
then
|
||||
local configname=$(cl-kernel -v --filter cl_kernel_config | \
|
||||
sed -nr 's/.*\[.\]\s//p')
|
||||
[[ -n $configname ]] &&
|
||||
cp $configname ${D}/usr/share/${PN}/${PV}/boot/config-${KV_FULL}
|
||||
fi
|
||||
}
|
||||
|
||||
vmlinuz_pkg_postinst() {
|
||||
cp -p /usr/share/${PN}/${PV}/boot/* ${ROOT}/boot/
|
||||
cl-kernel --ebuild \
|
||||
-k /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}
|
||||
if ls /usr/share/${PN}/${PV}/boot/ | grep -q System.map
|
||||
then
|
||||
cp -p /usr/share/${PN}/${PV}/boot/System.map* ${KV_OUT_DIR}/System.map
|
||||
fi
|
||||
cp -p /usr/share/${PN}/${PV}/boot/config* ${KV_OUT_DIR}/.config
|
||||
cd ${KV_OUT_DIR}
|
||||
local GENTOOARCH="${ARCH}"
|
||||
unset ARCH
|
||||
ebegin "kernel: >> Running oldconfig..."
|
||||
make oldconfig </dev/null &>/dev/null
|
||||
eend $? "Failed oldconfig"
|
||||
ebegin "kernel: >> Running modules_prepare..."
|
||||
make modules_prepare &>/dev/null
|
||||
eend $? "Failed modules prepare"
|
||||
ARCH="${GENTOOARCH}"
|
||||
|
||||
use vmlinuz && vmlinuz_pkg_postinst
|
||||
}
|
@ -1,168 +0,0 @@
|
||||
# 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
|
||||
|
||||
if [[ ${KV_MAJOR} -ge 3 ]]
|
||||
then
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
CL_PATCH=$(get_version_component_range 1-2)
|
||||
local oldifs=${IFS}
|
||||
export IFS="."
|
||||
local OKV_ARRAY=( $OKV )
|
||||
export IFS=${oldifs}
|
||||
if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then
|
||||
# handle calculate-sources-3.x.y correctly
|
||||
if [[ ${KV_PATCH} -gt 0 ]]; then
|
||||
KERNEL_URI="${KERNEL_BASE_URI}/patch-${OKV}.xz"
|
||||
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.xz"
|
||||
fi
|
||||
KERNEL_URI="${KERNEL_URI} ${KERNEL_BASE_URI}/linux-${KV_MAJOR}.${KV_MINOR}.tar.xz"
|
||||
else
|
||||
KERNEL_URI="${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
|
||||
fi
|
||||
else
|
||||
die "Eclass is used only for kernel-3"
|
||||
fi
|
||||
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}-${CL_PATCH}.tar.bz2
|
||||
ftp://ftp.calculate-linux.org/pub/calculate/${PN}/${PN}-${CL_PATCH}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/${PN}/${PN}-${CL_PATCH}.tar.bz2
|
||||
ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${PN}-${CL_PATCH}.tar.bz2"
|
||||
|
||||
if [[ -n $LONGTERM ]];then
|
||||
if [[ $KERNEL_URI =~ ^(.*)(kernel/v3.0/patch)(.*)$ ]];then
|
||||
KERNEL_URI="${BASH_REMATCH[1]}kernel/v3.0/longterm/v${CKV}/patch${BASH_REMATCH[3]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
calculate-kernel-3_pkg_setup() {
|
||||
kernel-2_pkg_setup
|
||||
ewarn "!!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!"
|
||||
ewarn "After the kernel assemble perform command to update modules:"
|
||||
ewarn " module-rebuild -X rebuild"
|
||||
ebeep 5
|
||||
}
|
||||
|
||||
calculate-kernel-3_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 \
|
||||
${CL_KERNEL_OPTS} \
|
||||
--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-3_src_compile() {
|
||||
use vmlinuz && vmlinuz_src_compile
|
||||
}
|
||||
|
||||
vmlinuz_src_install() {
|
||||
cd ${WORKDIR}/lib
|
||||
insinto /lib
|
||||
doins -r modules
|
||||
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
|
||||
}
|
||||
|
||||
calculate-kernel-3_src_install() {
|
||||
kernel-2_src_install
|
||||
dodir /usr/share/${PN}/${PV}/boot
|
||||
use vmlinuz && vmlinuz_src_install
|
||||
if ! use vmlinuz
|
||||
then
|
||||
local configname=$(cl-kernel -v --filter cl_kernel_config | \
|
||||
sed -nr 's/.*\[.\]\s//p')
|
||||
[[ -n $configname ]] &&
|
||||
cp $configname ${D}/usr/share/${PN}/${PV}/boot/config-${KV_FULL}
|
||||
fi
|
||||
}
|
||||
|
||||
vmlinuz_pkg_postinst() {
|
||||
cp -p /usr/share/${PN}/${PV}/boot/* ${ROOT}/boot/
|
||||
cl-kernel --ebuild \
|
||||
-k /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-3_pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
|
||||
KV_OUT_DIR=${ROOT}/usr/src/linux-${KV_FULL}
|
||||
if ls /usr/share/${PN}/${PV}/boot/ | grep -q System.map
|
||||
then
|
||||
cp -p /usr/share/${PN}/${PV}/boot/System.map* ${KV_OUT_DIR}/System.map
|
||||
fi
|
||||
cp -p /usr/share/${PN}/${PV}/boot/config* ${KV_OUT_DIR}/.config
|
||||
cd ${KV_OUT_DIR}
|
||||
local GENTOOARCH="${ARCH}"
|
||||
unset ARCH
|
||||
ebegin "kernel: >> Running oldconfig..."
|
||||
make oldconfig </dev/null &>/dev/null
|
||||
eend $? "Failed oldconfig"
|
||||
ebegin "kernel: >> Running modules_prepare..."
|
||||
make modules_prepare &>/dev/null
|
||||
eend $? "Failed modules prepare"
|
||||
ARCH="${GENTOOARCH}"
|
||||
|
||||
use vmlinuz && vmlinuz_pkg_postinst
|
||||
}
|
@ -1,212 +0,0 @@
|
||||
# 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 minimal"
|
||||
|
||||
REQUIRED_USE="minimal? ( vmlinuz )"
|
||||
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
if [[ ${KV_MAJOR} -ge 3 ]]
|
||||
then
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
CL_PATCH=$(get_version_component_range 1-2)
|
||||
local oldifs=${IFS}
|
||||
export IFS="."
|
||||
local OKV_ARRAY=( $OKV )
|
||||
export IFS=${oldifs}
|
||||
if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then
|
||||
# handle calculate-sources-3.x.y correctly
|
||||
if [[ ${KV_PATCH} -gt 0 ]]; then
|
||||
KERNEL_URI="${KERNEL_BASE_URI}/patch-${OKV}.xz"
|
||||
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.xz"
|
||||
fi
|
||||
KERNEL_URI="${KERNEL_URI} ${KERNEL_BASE_URI}/linux-${KV_MAJOR}.${KV_MINOR}.tar.xz"
|
||||
else
|
||||
KERNEL_URI="${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
|
||||
fi
|
||||
else
|
||||
die "Eclass is used only for kernel-3"
|
||||
fi
|
||||
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}-${CL_PATCH}.tar.bz2
|
||||
ftp://ftp.calculate-linux.org/pub/calculate/${PN}/${PN}-${CL_PATCH}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/${PN}/${PN}-${CL_PATCH}.tar.bz2
|
||||
ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${PN}-${CL_PATCH}.tar.bz2"
|
||||
|
||||
if [[ -n $LONGTERM ]];then
|
||||
if [[ $KERNEL_URI =~ ^(.*)(kernel/v3.0/patch)(.*)$ ]];then
|
||||
KERNEL_URI="${BASH_REMATCH[1]}kernel/v3.0/longterm/v${CKV}/patch${BASH_REMATCH[3]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
calculate-kernel-4_pkg_setup() {
|
||||
kernel-2_pkg_setup
|
||||
ewarn "!!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!"
|
||||
ewarn "After the kernel assemble perform command to update modules:"
|
||||
ewarn " module-rebuild -X rebuild"
|
||||
ebeep 5
|
||||
}
|
||||
|
||||
calculate-kernel-4_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 \
|
||||
${CL_KERNEL_OPTS} \
|
||||
--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-4_src_compile() {
|
||||
use vmlinuz && vmlinuz_src_compile
|
||||
}
|
||||
|
||||
vmlinuz_src_install() {
|
||||
cd ${WORKDIR}/lib
|
||||
insinto /lib
|
||||
doins -r modules
|
||||
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
|
||||
}
|
||||
|
||||
calculate-kernel-4_src_install() {
|
||||
if use minimal
|
||||
then
|
||||
local configname=$(cl-kernel -v --filter cl_kernel_config$ | \
|
||||
sed -nr 's/.*\[.\]\s//p')
|
||||
cp $configname .config
|
||||
local GENTOOARCH="${ARCH}"
|
||||
unset ARCH
|
||||
ebegin "kernel: >> Running oldconfig..."
|
||||
make oldconfig </dev/null &>/dev/null
|
||||
eend $? "Failed oldconfig"
|
||||
ebegin "kernel: >> Running modules_prepare..."
|
||||
make modules_prepare &>/dev/null
|
||||
eend $? "Failed modules prepare"
|
||||
ARCH="${GENTOOARCH}"
|
||||
|
||||
einfo "Cleaning sources"
|
||||
for rmpath in $(ls arch | grep -v x86)
|
||||
do
|
||||
rm -r arch/$rmpath
|
||||
done
|
||||
KEEPLIST="scripts/Makefile.lib scripts/module-common.lds \
|
||||
scripts/gcc-version.sh scripts/Makefile.help \
|
||||
scripts/Makefile.modinst scripts/Makefile.asm-generic \
|
||||
scripts/Makefile.modbuiltin scripts/Makefile.fwinst \
|
||||
scripts/depmod.sh scripts/Makefile.host \
|
||||
scripts/Kbuild.include scripts/Makefile.modpost \
|
||||
scripts/gcc-goto.sh scripts/Makefile.headersinst \
|
||||
scripts/Makefile.build scripts/basic/fixdep \
|
||||
scripts/Makefile.clean scripts/mod/modpost \
|
||||
include/config/kernel.release include/config/auto.conf \
|
||||
arch/x86/Makefile_32.cpu arch/x86/Makefile \
|
||||
System.map Makefile Kbuild"
|
||||
find . -type f -a \! -wholename ./.config \
|
||||
$(echo $KEEPLIST | sed -r 's/(\S+)(\s|$)/-a \! -wholename .\/\1 /g') \
|
||||
-a \! -name "*.h" -delete
|
||||
rm -r drivers
|
||||
rm -r Documentation
|
||||
fi
|
||||
kernel-2_src_install
|
||||
dodir /usr/share/${PN}/${PV}/boot
|
||||
use vmlinuz && vmlinuz_src_install
|
||||
if ! use vmlinuz
|
||||
then
|
||||
local configname=$(cl-kernel -v --filter cl_kernel_config$ | \
|
||||
sed -nr 's/.*\[.\]\s//p')
|
||||
[[ -n $configname ]] &&
|
||||
cp $configname ${D}/usr/share/${PN}/${PV}/boot/config-${KV_FULL}
|
||||
fi
|
||||
}
|
||||
|
||||
vmlinuz_pkg_postinst() {
|
||||
cp -p /usr/share/${PN}/${PV}/boot/* ${ROOT}/boot/
|
||||
cl-kernel --ebuild \
|
||||
-k /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-4_pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
|
||||
KV_OUT_DIR=${ROOT}/usr/src/linux-${KV_FULL}
|
||||
if ls /usr/share/${PN}/${PV}/boot/ | grep -q System.map
|
||||
then
|
||||
cp -p /usr/share/${PN}/${PV}/boot/System.map* ${KV_OUT_DIR}/System.map
|
||||
fi
|
||||
cp -p /usr/share/${PN}/${PV}/boot/config* ${KV_OUT_DIR}/.config
|
||||
cd ${KV_OUT_DIR}
|
||||
|
||||
if ! use minimal
|
||||
then
|
||||
local GENTOOARCH="${ARCH}"
|
||||
unset ARCH
|
||||
ebegin "kernel: >> Running oldconfig..."
|
||||
make oldconfig </dev/null &>/dev/null
|
||||
eend $? "Failed oldconfig"
|
||||
ebegin "kernel: >> Running modules_prepare..."
|
||||
make modules_prepare &>/dev/null
|
||||
eend $? "Failed modules prepare"
|
||||
ARCH="${GENTOOARCH}"
|
||||
fi
|
||||
|
||||
use vmlinuz && vmlinuz_pkg_postinst
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
# 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 minimal"
|
||||
|
||||
REQUIRED_USE="minimal? ( vmlinuz )"
|
||||
RDEPEND="sys-kernel/dracut"
|
||||
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
if [[ ${KV_MAJOR} -lt 3 ]]
|
||||
then
|
||||
die "Eclass is used only for kernel-3"
|
||||
fi
|
||||
|
||||
SLOT=${PV}
|
||||
EXTRAVERSION="-calculate"
|
||||
KV_FULL="${PV}${EXTRAVERSION}"
|
||||
|
||||
S="${WORKDIR}/linux-${KV_FULL}"
|
||||
|
||||
calculate-kernel-6_pkg_setup() {
|
||||
kernel-2_pkg_setup
|
||||
eqawarn "!!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!"
|
||||
eqawarn "After the kernel assemble perform command to update modules:"
|
||||
eqawarn " emerge @modules-rebuild"
|
||||
}
|
||||
|
||||
calculate-kernel-6_src_unpack() {
|
||||
kernel-2_src_unpack
|
||||
}
|
||||
|
||||
vmlinuz_src_compile() {
|
||||
# disable sandbox
|
||||
local GENTOOARCH="${ARCH}"
|
||||
unset ARCH
|
||||
cd ${S}
|
||||
emake && emake modules || die "kernel build failed"
|
||||
[ -f .config ] && cp .config .config.save
|
||||
ARCH="${GENTOOARCH}"
|
||||
}
|
||||
|
||||
calculate-kernel-6_src_compile() {
|
||||
use vmlinuz && vmlinuz_src_compile
|
||||
}
|
||||
|
||||
vmlinuz_src_install() {
|
||||
# dracut change this files in chroot of ramdisk
|
||||
SANDBOX_WRITE="${SANDBOX_WRITE}:/etc/ld.so.cache~:/etc/ld.so.cache:/etc/mtab"
|
||||
cd ${S}
|
||||
dodir /usr/share/${PN}/${PV}/boot
|
||||
INSTALL_PATH=${D}/usr/share/${PN}/${PV}/boot emake install
|
||||
INSTALL_MOD_PATH=${D} emake modules_install
|
||||
/sbin/depmod -b ${D} ${KV_FULL}
|
||||
/usr/bin/dracut -a calculate -k ${D}/lib/modules/${KV_FULL} \
|
||||
--kver ${KV_FULL} \
|
||||
${D}/usr/share/${PN}/${PV}/boot/initramfs-${KV_FULL}
|
||||
# move firmware to share, because /lib/firmware installation does collisions
|
||||
mv ${D}/lib/firmware ${D}/usr/share/${PN}/${PV}
|
||||
insinto /usr/share/${PN}/${PV}/boot/
|
||||
newins .config config-${KV_FULL}
|
||||
|
||||
# recreate symlink in /lib/modules because symlink point to tmp/portage after make install
|
||||
rm ${D}/lib/modules/${KV_FULL}/build
|
||||
rm ${D}/lib/modules/${KV_FULL}/source
|
||||
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"
|
||||
}
|
||||
|
||||
# FUNCTION: clean_for_minimal
|
||||
# DESCRIPTION:
|
||||
# Clear kernel sources, keeping only need for custom modules compilation
|
||||
clean_for_minimal() {
|
||||
local GENTOOARCH="${ARCH}"
|
||||
unset ARCH
|
||||
ARCH="${GENTOOARCH}"
|
||||
|
||||
emake distclean &>/dev/null || die "cannot perform distclean"
|
||||
mv .config.save .config
|
||||
ebegin "kernel: >> Running modules_prepare..."
|
||||
emake modules_prepare &>/dev/null
|
||||
eend $? "Failed modules prepare"
|
||||
einfo "Cleaning sources"
|
||||
for rmpath in $(ls arch | grep -v x86)
|
||||
do
|
||||
rm -r arch/$rmpath
|
||||
done
|
||||
KEEPLIST="scripts/Makefile.lib scripts/module-common.lds \
|
||||
scripts/gcc-version.sh scripts/Makefile.help \
|
||||
scripts/Makefile.modinst scripts/Makefile.asm-generic \
|
||||
scripts/Makefile.modbuiltin scripts/Makefile.fwinst \
|
||||
scripts/depmod.sh scripts/Makefile.host \
|
||||
scripts/Kbuild.include scripts/Makefile.modpost \
|
||||
scripts/gcc-goto.sh scripts/Makefile.headersinst \
|
||||
scripts/Makefile.build scripts/basic/fixdep \
|
||||
scripts/Makefile.clean scripts/mod/modpost \
|
||||
include/config/kernel.release include/config/auto.conf \
|
||||
arch/x86/Makefile_32.cpu arch/x86/Makefile \
|
||||
System.map Makefile Kbuild"
|
||||
find . -type f -a \! -wholename ./.config \
|
||||
$(echo $KEEPLIST | sed -r 's/(\S+)(\s|$)/-a \! -wholename .\/\1 /g') \
|
||||
-a \! -name "*.h" -delete
|
||||
rm -r drivers
|
||||
rm -r Documentation
|
||||
}
|
||||
|
||||
calculate-kernel-6_src_install() {
|
||||
use vmlinuz && vmlinuz_src_install
|
||||
use minimal && clean_for_minimal
|
||||
kernel-2_src_install
|
||||
if ! use vmlinuz
|
||||
then
|
||||
cp .config ${D}/usr/share/${PN}/${PV}/boot/config-${KV_FULL}
|
||||
fi
|
||||
}
|
||||
|
||||
vmlinuz_pkg_postinst() {
|
||||
# install kernel into /boot
|
||||
calculate_update_ver /boot vmlinuz ${KV_FULL} /usr/share/${PN}/${PV}/boot/vmlinuz-${KV_FULL}
|
||||
calculate_update_ver /boot config ${KV_FULL} /usr/share/${PN}/${PV}/boot/config-${KV_FULL}
|
||||
calculate_update_ver /boot initramfs ${KV_FULL} /usr/share/${PN}/${PV}/boot/initramfs-${KV_FULL}
|
||||
calculate_update_ver /boot System.map ${KV_FULL} /usr/share/${PN}/${PV}/boot/System.map-${KV_FULL}
|
||||
# install firmware into /
|
||||
mkdir -p ${ROOT}/lib/firmware
|
||||
cp -a ${ROOT}/usr/share/${PN}/${PV}/firmware/* ${ROOT}/lib/firmware/
|
||||
calculate_update_depmod
|
||||
calculate_update_modules
|
||||
}
|
||||
|
||||
calculate-kernel-6_pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
|
||||
KV_OUT_DIR=${ROOT}/usr/src/linux-${KV_FULL}
|
||||
use vmlinuz && cp -p /usr/share/${PN}/${PV}/boot/System.map* ${KV_OUT_DIR}/System.map
|
||||
|
||||
if ! use minimal
|
||||
then
|
||||
cd ${KV_OUT_DIR}
|
||||
local GENTOOARCH="${ARCH}"
|
||||
unset ARCH
|
||||
ebegin "kernel: >> Running modules_prepare..."
|
||||
(emake oldconfig && emake modules_prepare) &>/dev/null
|
||||
eend $? "Failed modules prepare"
|
||||
ARCH="${GENTOOARCH}"
|
||||
fi
|
||||
|
||||
use vmlinuz && vmlinuz_pkg_postinst
|
||||
use vmlinuz && calculate_fix_lib_modules_contents
|
||||
}
|
@ -1,177 +0,0 @@
|
||||
# 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}"
|
||||
EXTRAVERSION="-calculate"
|
||||
|
||||
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://ftp.calculate-linux.org/pub/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"
|
||||
|
||||
NEW_CALCULATE_OVERLAY="/var/lib/layman/calculate"
|
||||
[[ -d ${ROOT}/${NEW_CALCULATE_OVERLAY} ]] &&
|
||||
CALCULATE_OVERLAY=${NEW_CALCULATE_OVERLAY} ||
|
||||
CALCULATE_OVERLAY="/usr/local/portage/layman/calculate"
|
||||
|
||||
MODULESDBFILE=${ROOT}/var/lib/module-rebuild/moduledb
|
||||
|
||||
calculate-kernel-old_pkg_setup() {
|
||||
kernel-2_pkg_setup
|
||||
local calculate_ini=${ROOT}/etc/calculate/calculate.ini
|
||||
[[ -e $calculate_ini ]] && \
|
||||
SYSTEM=$( sed -rn 's/^system\=(.*)/\1/p' $calculate_ini )
|
||||
[[ -n "$SYSTEM" ]] || SYSTEM=desktop
|
||||
if [[ -z "${KERNEL_CONFIG}" ]] || [[ ! -f "${KERNEL_CONFIG}" ]]
|
||||
then
|
||||
KERNEL_CONFIG="${ROOT}/${CALCULATE_OVERLAY}/profiles/kernel"
|
||||
[[ -n "$CARCH" ]] || CARCH=`arch`
|
||||
KERNEL_CONFIG="${KERNEL_CONFIG}/config-${SYSTEM}-${CARCH}-${CKV}"
|
||||
fi
|
||||
ewarn "After the kernel assemble perform command to update modules:"
|
||||
ewarn " module-rebuild -X rebuild"
|
||||
ebeep 5
|
||||
}
|
||||
|
||||
calculate-kernel-old_src_unpack() {
|
||||
kernel-2_src_unpack
|
||||
}
|
||||
|
||||
vmlinuz_src_compile() {
|
||||
# disable sandbox
|
||||
export SANDBOX_ON=0
|
||||
export LDFLAGS=""
|
||||
mkdir -p ${WORKDIR}/boot
|
||||
cd ${S}
|
||||
einfo "Using kernel config from "$( readlink -f ${KERNEL_CONFIG} )
|
||||
cp ${KERNEL_CONFIG} ${WORKDIR}/config || die "cannot copy kernel config"
|
||||
|
||||
cp ${WORKDIR}/config ${S}/.config
|
||||
local GENTOOARCH="${ARCH}"
|
||||
unset ARCH
|
||||
|
||||
DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" genkernel \
|
||||
--kerneldir=${S} \
|
||||
--kernel-config=${WORKDIR}/config \
|
||||
--cachedir=${WORKDIR}/cache \
|
||||
--makeopts=${MAKEOPTS} \
|
||||
--tempdir=${S}/temp \
|
||||
--logfile=${WORKDIR}/genkernel.log \
|
||||
--bootdir=${WORKDIR}/boot \
|
||||
--no-save-config \
|
||||
--kernname=${SYSTEM} \
|
||||
--no-menuconfig \
|
||||
--clean \
|
||||
--loglevel=2 \
|
||||
--mrproper \
|
||||
--no-cleartmp \
|
||||
--disklabel \
|
||||
--slowusb \
|
||||
--splash=tty1 \
|
||||
--all-ramdisk-modules \
|
||||
--unionfs \
|
||||
--module-prefix=${WORKDIR} \
|
||||
all || die "genkernel failed"
|
||||
|
||||
cp ${S}/.config ${WORKDIR}/boot/config-${KV_FULL}-installed
|
||||
einfo "kernel: >> Distclean..."
|
||||
make distclean &>/dev/null || die "cannot perform distclean"
|
||||
ARCH="${GENTOOARCH}"
|
||||
mv ${WORKDIR}/boot/kernel-${SYSTEM}-*-${KV_FULL} \
|
||||
${WORKDIR}/boot/vmlinuz-${KV_FULL}-installed
|
||||
mv ${WORKDIR}/boot/initramfs-${SYSTEM}-*-${KV_FULL} \
|
||||
${WORKDIR}/boot/initramfs-${KV_FULL}-installed
|
||||
mv ${WORKDIR}/boot/System.map-${SYSTEM}-*-${KV_FULL} \
|
||||
${WORKDIR}/boot/System.map-${KV_FULL}-installed
|
||||
cp ${WORKDIR}/boot/System.map-${KV_FULL}-installed ${S}/System.map
|
||||
rm ${WORKDIR}/lib/modules/${KV_FULL}/build
|
||||
rm ${WORKDIR}/lib/modules/${KV_FULL}/source
|
||||
}
|
||||
|
||||
calculate-kernel-old_src_compile() {
|
||||
use vmlinuz && vmlinuz_src_compile
|
||||
}
|
||||
|
||||
vmlinuz_src_install() {
|
||||
cd ${WORKDIR}
|
||||
insinto /
|
||||
doins -r boot
|
||||
cd ${WORKDIR}/lib
|
||||
insinto /lib
|
||||
doins -r modules
|
||||
insinto /tmp
|
||||
doins -r firmware
|
||||
|
||||
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-old_src_install() {
|
||||
kernel-2_src_install
|
||||
use vmlinuz && vmlinuz_src_install
|
||||
}
|
||||
|
||||
vmlinuz_pkg_postinst() {
|
||||
calculate_update_splash ${ROOT}/boot/initramfs-${KV_FULL}-installed
|
||||
cp ${ROOT}/boot/initramfs-${KV_FULL}-installed \
|
||||
${ROOT}/boot/initramfs-${KV_FULL}-install-installed
|
||||
calculate_update_kernel ${KV_FULL} ${ROOT}/boot
|
||||
mkdir -p ${ROOT}/lib/firmware
|
||||
cp -a ${ROOT}/tmp/firmware/* ${ROOT}/lib/firmware/
|
||||
rm -rf ${ROOT}/tmp/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-old_pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
|
||||
KV_OUT_DIR=${ROOT}/usr/src/linux-${KV_FULL}
|
||||
[[ -e ${ROOT}/boot/config-${KV_FULL}-installed ]] &&
|
||||
cp ${ROOT}/boot/config-${KV_FULL}-installed ${KV_OUT_DIR}/.config ||
|
||||
cp ${KERNEL_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
|
||||
}
|
@ -1,208 +0,0 @@
|
||||
# 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://ftp.calculate-linux.org/pub/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"
|
||||
|
||||
NEW_CALCULATE_OVERLAY="/var/lib/layman/calculate"
|
||||
[[ -d ${ROOT}/${NEW_CALCULATE_OVERLAY} ]] &&
|
||||
CALCULATE_OVERLAY=${NEW_CALCULATE_OVERLAY} ||
|
||||
CALCULATE_OVERLAY="/usr/local/portage/layman/calculate"
|
||||
|
||||
MODULESDBFILE=${ROOT}/var/lib/module-rebuild/moduledb
|
||||
if [[ -n $LONGTERM ]];then
|
||||
if [[ $KERNEL_URI =~ ^(.*)(kernel/v2.6/patch)(.*)$ ]];then
|
||||
KERNEL_URI="${BASH_REMATCH[1]}kernel/v2.6/longterm/v${CKV}/patch${BASH_REMATCH[3]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
calculate-kernel_pkg_setup() {
|
||||
kernel-2_pkg_setup
|
||||
local calculate_ini=${ROOT}/etc/calculate/calculate.ini
|
||||
[[ -e $calculate_ini ]] && \
|
||||
SYSTEM=$( sed -rn 's/^system\=(.*)/\1/p' $calculate_ini )
|
||||
[[ -n "$SYSTEM" ]] || SYSTEM=desktop
|
||||
if [[ -z "${KERNEL_CONFIG}" ]] || [[ ! -f "${KERNEL_CONFIG}" ]]
|
||||
then
|
||||
KERNEL_CONFIG="${ROOT}/${CALCULATE_OVERLAY}/profiles/kernel"
|
||||
[[ -n "$CARCH" ]] || CARCH=`arch`
|
||||
KERNEL_CONFIG="${KERNEL_CONFIG}/config-${SYSTEM}-${CARCH}-${CKV}"
|
||||
fi
|
||||
ewarn "After the kernel assemble perform command to update modules:"
|
||||
ewarn " module-rebuild -X rebuild"
|
||||
ebeep 5
|
||||
}
|
||||
|
||||
calculate-kernel_src_unpack() {
|
||||
kernel-2_src_unpack
|
||||
}
|
||||
|
||||
vmlinuz_src_compile() {
|
||||
# disable sandbox
|
||||
export SANDBOX_ON=0
|
||||
export LDFLAGS=""
|
||||
mkdir -p ${WORKDIR}/boot
|
||||
cd ${S}
|
||||
einfo "Using kernel config from "$( readlink -f ${KERNEL_CONFIG} )
|
||||
cp ${KERNEL_CONFIG} ${WORKDIR}/config || die "cannot copy kernel config"
|
||||
|
||||
cp ${WORKDIR}/config ${S}/.config
|
||||
local GENTOOARCH="${ARCH}"
|
||||
unset ARCH
|
||||
|
||||
DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" genkernel \
|
||||
--kerneldir=${S} \
|
||||
--kernel-config=${WORKDIR}/config \
|
||||
--cachedir=${WORKDIR}/cache \
|
||||
--makeopts=${MAKEOPTS} \
|
||||
--tempdir=${S}/temp \
|
||||
--logfile=${WORKDIR}/genkernel.log \
|
||||
--bootdir=${WORKDIR}/boot \
|
||||
--no-save-config \
|
||||
--kernname=${SYSTEM} \
|
||||
--no-menuconfig \
|
||||
--clean \
|
||||
--loglevel=2 \
|
||||
--mrproper \
|
||||
--no-cleartmp \
|
||||
--disklabel \
|
||||
--slowusb \
|
||||
--splash=tty1 \
|
||||
--all-ramdisk-modules \
|
||||
--unionfs \
|
||||
--module-prefix=${WORKDIR} \
|
||||
all || die "genkernel failed"
|
||||
|
||||
OLDARCH=`arch`
|
||||
NAMESUFFIX=${PV}-${OLDARCH}-$(detect_linux_shortname)
|
||||
cp ${S}/.config ${WORKDIR}/boot/config-${NAMESUFFIX}-installed
|
||||
einfo "kernel: >> Distclean..."
|
||||
make distclean &>/dev/null || die "cannot perform distclean"
|
||||
ARCH="${GENTOOARCH}"
|
||||
mv ${WORKDIR}/boot/kernel-${SYSTEM}-*-${KV_FULL} \
|
||||
${WORKDIR}/boot/vmlinuz-${NAMESUFFIX}-installed
|
||||
mv ${WORKDIR}/boot/initramfs-${SYSTEM}-*-${KV_FULL} \
|
||||
${WORKDIR}/boot/initramfs-${NAMESUFFIX}-installed
|
||||
mv ${WORKDIR}/boot/System.map-${SYSTEM}-*-${KV_FULL} \
|
||||
${WORKDIR}/boot/System.map-${NAMESUFFIX}-installed
|
||||
cp ${WORKDIR}/boot/System.map-${NAMESUFFIX}-installed ${S}/System.map
|
||||
rm ${WORKDIR}/lib/modules/${KV_FULL}/build
|
||||
rm ${WORKDIR}/lib/modules/${KV_FULL}/source
|
||||
}
|
||||
|
||||
calculate-kernel_src_compile() {
|
||||
use vmlinuz && vmlinuz_src_compile
|
||||
}
|
||||
|
||||
vmlinuz_src_install() {
|
||||
cd ${WORKDIR}
|
||||
insinto /
|
||||
doins -r boot
|
||||
cd ${WORKDIR}/lib
|
||||
insinto /lib
|
||||
doins -r modules
|
||||
insinto /tmp
|
||||
doins -r firmware
|
||||
|
||||
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_src_install() {
|
||||
kernel-2_src_install
|
||||
use vmlinuz && vmlinuz_src_install
|
||||
}
|
||||
|
||||
# FUNCTION: change_kernel_in_grub
|
||||
# DESCRIPTION:
|
||||
# Change kernel version in grub
|
||||
change_kernel_in_grub() {
|
||||
[[ -f /boot/vmlinuz-${NAMESUFFIX} ]] &&
|
||||
[[ -f /boot/initramfs-${NAMESUFFIX} ]] &&
|
||||
[[ -f /boot/initramfs-${NAMESUFFIX}-install ]] &&
|
||||
[[ -f /boot/grub/grub.conf ]] &&
|
||||
sed -ri "/^title/{ #find title in grub.conf
|
||||
:readnextline;N; #read next line
|
||||
s/\ninitrd/&/; #if pattern not contents initrd
|
||||
Treadnextline; #goto read next line
|
||||
:changemenuitem; #else try change menuitem
|
||||
s|root=${ROOTDEV}|&|; #if menuitem not for the system
|
||||
Tskipmenuitem; #then skip menuitem
|
||||
s|(/boot/vmlinuz)[^ ]+|\1-${NAMESUFFIX}|; #else change vmlinuz
|
||||
s|initrd (.*)-install$|initrd \1/install|; #hide '-install'
|
||||
s|(/boot/initramfs)[^ /]+|\1-${NAMESUFFIX}|; #change initramfs
|
||||
s|/install$|-install|; #show '-install'
|
||||
:skipmenuitem;
|
||||
}" /boot/grub/grub.conf
|
||||
}
|
||||
|
||||
vmlinuz_pkg_postinst() {
|
||||
calculate_update_splash ${ROOT}/boot/initramfs-${NAMESUFFIX}-installed
|
||||
cp ${ROOT}/boot/initramfs-${NAMESUFFIX}-installed \
|
||||
${ROOT}/boot/initramfs-${NAMESUFFIX}-install-installed
|
||||
calculate_update_kernel ${NAMESUFFIX} ${ROOT}/boot
|
||||
mkdir -p ${ROOT}/lib/firmware
|
||||
cp -a ${ROOT}/tmp/firmware/* ${ROOT}/lib/firmware/
|
||||
rm -rf ${ROOT}/tmp/firmware
|
||||
calculate_update_depmod
|
||||
calculate_update_modules
|
||||
|
||||
[[ -f $MODULESDBFILE ]] &&
|
||||
sed -ri 's/a:1:sys-fs\/aufs2/a:0:sys-fs\/aufs2/' $MODULESDBFILE
|
||||
calculate_initvars
|
||||
change_kernel_in_grub
|
||||
}
|
||||
|
||||
calculate-kernel_pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
|
||||
KV_OUT_DIR=${ROOT}/usr/src/linux-${KV_FULL}
|
||||
[[ -e ${ROOT}/boot/config-${NAMESUFFIX}-installed ]] &&
|
||||
cp ${ROOT}/boot/config-${NAMESUFFIX}-installed ${KV_OUT_DIR}/.config ||
|
||||
cp ${KERNEL_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
|
||||
}
|
@ -1,327 +1,14 @@
|
||||
# vim: set syntax=sh
|
||||
# Automatic patching.
|
||||
# put PATCH_OVERLAY=/path/to/patches into make.conf and then put patches into
|
||||
# $PATCH_OVERLAY/cate-gory/package/
|
||||
#
|
||||
# As I know history: Initial idea from solar, later
|
||||
# Ed Catmur added support autoreconf calls then pva rewritten everything...
|
||||
# Added interval check for version and run .sh hooks by Calculate
|
||||
|
||||
# don't setup packages by cl-core
|
||||
check_skip() {
|
||||
declare -A SKIPPKGS=(
|
||||
["calculate-install"]="1"
|
||||
["calculate-lib"]="1"
|
||||
["calculate-console"]="1"
|
||||
["calculate-console-gui"]="1"
|
||||
["calculate-core"]="1"
|
||||
["calculate-desktop"]="1"
|
||||
["calculate-client"]="1"
|
||||
["calculate-update"]="1" )
|
||||
|
||||
[[ -z ${SKIPPKGS[$PN]} ]]
|
||||
}
|
||||
|
||||
pkg_checkver() {
|
||||
PATCH_PV=( `echo $1 | sed 's/[._]/ /g' | sed -r 's/([a-z]+)/ \1 /g'` )
|
||||
EBUILD_PV=( `echo $2 | sed 's/[._]/ /g' | sed -r 's/([a-z]+)/ \1 /g'` )
|
||||
for i in $(seq 0 10);
|
||||
do
|
||||
# next part of version of patch
|
||||
if [[ -n ${PATCH_PV[$i]} ]]
|
||||
then
|
||||
# if part patch version not equal ebuild version
|
||||
if [[ ${PATCH_PV[$i]} != ${EBUILD_PV[$i]} ]]
|
||||
then
|
||||
# is pv in patch interval
|
||||
if [[ ${PATCH_PV[$i]} =~ ^([0-9]+)-([0-9]+)$ ]]
|
||||
then
|
||||
# check version of ebuild not in interval
|
||||
if [[ ${EBUILD_PV[$i]} -lt ${BASH_REMATCH[1]} ||
|
||||
${EBUILD_PV[$i]} -gt ${BASH_REMATCH[2]} ]]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
# pv not interval
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
pkg_try2apply() {
|
||||
local patch=${1}
|
||||
for l in `seq 0 4`; do
|
||||
patch -g0 --dry-run -p${l} >/dev/null < "${patch}"
|
||||
if [ $? = 0 ]; then
|
||||
echo "auto patching succeeded (-p${l}) ${patch}" > "${S}/.$(basename ${patch})"
|
||||
#patch -g0 -p${l} < "${patch}" && return 0
|
||||
patch -g0 -p${l} < "${patch}" > /dev/null && return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
apecho() {
|
||||
:
|
||||
#echo "AP: ${@}"
|
||||
}
|
||||
|
||||
pkg_pick_patches() {
|
||||
apecho " * entering pick_patches ${1}"
|
||||
pushd "${1}" > /dev/null 2>&1
|
||||
local VERSION='(-(cvs[.])?[0-9]+([.][0-9]+(-[0-9]+)?)*[a-z]?(_(pre|p|beta|alpha|rc)[0-9]*)*)?'
|
||||
for f in *${PN}*; do
|
||||
[[ ! -e ${f} ]] && continue
|
||||
apecho " > processing file: ${f}."
|
||||
if [[ ${f} =~ ^(..-)?${PN}${VERSION}(-r[0-9]+)?(_[0-9a-zA-Z-]+_)?([0-9a-zA-Z_.-]+[.](${patch_extens}))?$ ]]; then
|
||||
local MATCHED_PV=${BASH_REMATCH[2]/-}
|
||||
local MATCHED_PR=${BASH_REMATCH[7]/-}
|
||||
local MATCHED_ARCH=${BASH_REMATCH[8]//_}
|
||||
local MATCHED_EXT=${BASH_REMATCH[10]}
|
||||
apecho " | parsed: PV=$MATCHED_PV, PR=$MATCHED_PR, ARCH=$MATCHED_ARCH, ext=$MATCHED_EXT."
|
||||
if [[ -n ${MATCHED_ARCH} && ( ${MATCHED_ARCH} != ${ARCH} && ${MATCHED_ARCH} != all ) ]]; then
|
||||
apecho " X ARCH does not match. Skipping..."
|
||||
continue
|
||||
fi
|
||||
if [[ -n ${MATCHED_PR} && ${MATCHED_PR} != ${PR} ]]; then
|
||||
apecho " X PR does not match. Skipping..."
|
||||
continue
|
||||
fi
|
||||
if [[ -n ${MATCHED_PV} ]] && ! pkg_checkver ${MATCHED_PV} ${PV}; then
|
||||
apecho " X PV=${MATCHED_PV} does not match. Skipping..."
|
||||
continue
|
||||
fi
|
||||
if [[ -d ${f} ]]; then
|
||||
apecho " -> $f is a direcrory. Delving..."
|
||||
pkg_pick_patches ${f}
|
||||
apecho "<- Back. Continuing..."
|
||||
continue
|
||||
|
||||
elif [[ -z ${MATCHED_EXT} ]]; then
|
||||
apecho " X Is $f a file without patch|diff extension. Skipping."
|
||||
continue
|
||||
fi
|
||||
apecho " + Adding '$(pwd)/${f}' to patches."
|
||||
patches=( "${patches[@]}" "$(pwd)/${f}")
|
||||
fi
|
||||
done
|
||||
popd > /dev/null
|
||||
apecho " < ${patches[@]}"
|
||||
}
|
||||
|
||||
pkgpatch() {
|
||||
local -a patches=()
|
||||
local -i runautomake=0 runautoconf=0
|
||||
[[ ! -d "${PATCH_OVERLAY}/${CATEGORY}" ]] && return 0
|
||||
# only in precompile phase find patches and hooks
|
||||
if [[ ${EBUILD_PHASE} == compile ]]; then
|
||||
local patch_extens="diff|patch|sh"
|
||||
# in other phases find only hooks
|
||||
else
|
||||
local patch_extens="sh"
|
||||
fi
|
||||
pkg_pick_patches "${PATCH_OVERLAY}/${CATEGORY}"
|
||||
apecho " ! GRAND RESULT: ${patches[@]}"
|
||||
# before unpack phase ${S} yet not present
|
||||
if ! pushd "${S}" &>/dev/null;then
|
||||
pushd "`pwd`" >/dev/null
|
||||
fi
|
||||
for patch in "${patches[@]}"; do
|
||||
if [[ $patch =~ \.sh$ ]];
|
||||
then
|
||||
source $patch
|
||||
else
|
||||
ebegin "Trying to apply $(basename ${patch})"
|
||||
if pkg_try2apply "${patch}"; then
|
||||
eend 0
|
||||
else
|
||||
eend 1
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
if grep -E '^[+][+][+][[:space:]]+.*Makefile[.]am[[:space:]]+.*$' "${patch}" >/dev/null; then
|
||||
einfo "Need to rerun automake"
|
||||
(( ++runautomake ))
|
||||
fi
|
||||
if grep -E '^[+][+][+][[:space:]]+.*configure[.](ac|in)[[:space:]]+.*$' "${patch}">/dev/null; then
|
||||
einfo "Need to rerun autoconf"
|
||||
(( ++runautoconf ))
|
||||
fi
|
||||
done
|
||||
if [[ ${runautomake} -gt 0 || ${runautoconf} -gt 0 ]]; then
|
||||
inherit autotools
|
||||
fi
|
||||
if [[ ${runautomake} -gt 0 && ${runautoconf} -gt 0 ]]; then
|
||||
eautoreconf
|
||||
elif [[ ${runautomake} -gt 0 ]]; then
|
||||
eautomake
|
||||
elif [[ ${runautoconf} -gt 0 ]]; then
|
||||
eautoconf
|
||||
fi
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
[ -d /var/db/pkg/sys-apps/calculate-core-3.1.[1-9]* ] && calcver=3.1.1
|
||||
|
||||
post_pkg_preinst() {
|
||||
CL_UPDATE_PROG=/usr/lib/calculate-2.2/calculate-lib/bin/cl-update-config
|
||||
if [ -e ${CL_UPDATE_PROG} ];then
|
||||
[[ -z ${CONFIG_PROTECT} && -e /etc/profile ]] && source /etc/profile
|
||||
CONFIG_PROTECT=${CONFIG_PROTECT} ${CL_UPDATE_PROG} --desktop --system --pkg_version ${PVR} --pkg_category ${CATEGORY} --path ${D} $PN
|
||||
fi
|
||||
CL_UPDATE_PROG=/usr/sbin/cl-core-setup
|
||||
if [ -e ${CL_UPDATE_PROG} ] && [[ -z $calcver ]] && check_skip
|
||||
then
|
||||
${CL_UPDATE_PROG} --no-progress --pkg-version ${PVR} --pkg-category ${CATEGORY} --pkg-path ${D} --pkg-name ${PN}
|
||||
fi
|
||||
}
|
||||
|
||||
post_pkg_postinst() {
|
||||
if [ -e "${PORTAGE_BUILDDIR}/.patched" ];then
|
||||
rm -f "${PORTAGE_BUILDDIR}/.patched"
|
||||
fi
|
||||
}
|
||||
|
||||
pre_pkg_postinst() {
|
||||
if [[ -n $calcver ]] && check_skip
|
||||
then
|
||||
CL_UPDATE_PROG=/usr/sbin/cl-core-setup
|
||||
if [ -e ${CL_UPDATE_PROG} ];then
|
||||
CTARGET=${CTARGET} GCC_CONFIG_VER=${GCC_CONFIG_VER} ${CL_UPDATE_PROG} --no-progress --pkg-version ${PVR} --pkg-slot ${SLOT} --pkg-category ${CATEGORY} --pkg-path "/" --pkg-name ${PN}
|
||||
fi
|
||||
fi
|
||||
rm -f /var/lib/calculate/-merge-$PN-*
|
||||
rm -f /var/lib/calculate/-CONTENTS-*
|
||||
}
|
||||
|
||||
CL_CORE_PATCH=/usr/sbin/cl-core-patch
|
||||
if [[ ${EBUILD_PHASE} == "compile" ]] && [ -e ${CL_CORE_PATCH} ] &&
|
||||
[[ -d ${S} ]] && check_skip; then
|
||||
${CL_CORE_PATCH} --no-progress --pkg-version ${PVR} --pkg-slot ${SLOT} --pkg-category ${CATEGORY} --pkg-path ${S} --pkg-name ${PN} --verbose
|
||||
else
|
||||
if [[ `readlink -f /etc/portage/bashrc` != "/usr/calculate/install/bashrc" ]] || [[ ! -f /etc/portage/bashrc ]]
|
||||
then
|
||||
PATCH_OVERLAY="/usr/local/portage/layman/calculate/profiles/patches"
|
||||
[[ -d "/var/lib/layman/calculate/profiles/patches" ]] && \
|
||||
PATCH_OVERLAY="/var/lib/layman/calculate/profiles/patches"
|
||||
PATH=${PATH}:/usr/sbin:/usr/bin:/bin:/sbin
|
||||
|
||||
if [[ ${EBUILD_PHASE} == compile ]]; then
|
||||
if [[ ! -f ${PORTAGE_BUILDDIR}/.patched || \
|
||||
( ${PORTAGE_BUILDDIR}/.unpacked -nt ${PORTAGE_BUILDDIR}/.patched ) ]]; then
|
||||
touch "${PORTAGE_BUILDDIR}/.patched"
|
||||
elif [[ "${PORTAGE_BUILDDIR}/.unpacked" -nt "${PORTAGE_BUILDDIR}/.patched" ]]; then
|
||||
einfo ">>> WORKDIR is up-to-date and patched, keeping..."
|
||||
fi
|
||||
fi
|
||||
|
||||
pkgpatch
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update configuration files for package installation
|
||||
if [[ ${EBUILD_PHASE} == setup ]]; then
|
||||
userBashrc="/etc/portage/bashrc"
|
||||
if [[ -f /etc/portage/bashrc ]] &&
|
||||
grep -q -e "function\s+post_pkg_preinst" -e "post_pkg_preinst\(\)" $userBashrc &&
|
||||
! grep -q "calculate_post_pkg_preinst" $userBashrc;
|
||||
then
|
||||
ewarn ""
|
||||
ewarn "!!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!"
|
||||
ewarn "Redeclaration post_pkg_reinst was detected in ${useBashrc}."
|
||||
ewarn "Remove it for correct package configuration."
|
||||
inherit eutils
|
||||
ebeep 5
|
||||
fi
|
||||
fi
|
||||
|
||||
# added for calculate2.2
|
||||
# FUNC: change_permissions
|
||||
# DESC: change permissions for all files and directories into specified
|
||||
change_permissions() {
|
||||
local directory=$1
|
||||
[[ -d $1 ]] || return
|
||||
|
||||
# get owner from parent directory
|
||||
addwrite ${directory}
|
||||
local dirowner=$(stat -c"%u:%g" ${directory})
|
||||
local dirmode=0$(stat -c%a ${directory})
|
||||
# get permissions from parent directory
|
||||
local dirmode=0$(stat -c%a ${directory})
|
||||
|
||||
# turnoff execute for all (permission for files in parent directory)
|
||||
if which bc &>/dev/null;
|
||||
then
|
||||
local filemode=0$(echo "obase=8;$(( $dirmode & 0666 ))" | bc)
|
||||
elif which printf &>/dev/null;
|
||||
then
|
||||
local filemode=$(printf "0%o" $(( $dirmode & 0666 )) )
|
||||
else
|
||||
local filemode=
|
||||
fi
|
||||
# set for all files and directories dirowner
|
||||
chown -R ${dirowner} ${directory}
|
||||
# set permissions for all directories in parent directory
|
||||
find ${directory} \! -perm ${dirmode} -type d -exec chmod ${dirmode} {} \;
|
||||
if [[ -n $filemode ]]
|
||||
then
|
||||
# set permissions for all files in parent directory
|
||||
find ${directory} \! -perm ${filemode} -type f -exec chmod ${filemode} {} \;
|
||||
fi
|
||||
}
|
||||
|
||||
# system has "remote" share
|
||||
if grep "\[remote\]" /etc/samba/smb.conf &>/dev/null
|
||||
then
|
||||
post_src_unpack() {
|
||||
einfo "Performing permissions change for distdir directory"
|
||||
change_permissions ${PORTAGE_ACTUAL_DISTDIR}
|
||||
}
|
||||
else
|
||||
post_src_unpack() {
|
||||
:
|
||||
}
|
||||
fi
|
||||
|
||||
if grep "\[remote\]" /etc/samba/smb.conf &>/dev/null
|
||||
then
|
||||
pre_pkg_preinst() {
|
||||
einfo "Performing permissions change for packages directory"
|
||||
change_permissions ${PKGDIR}
|
||||
}
|
||||
else
|
||||
pre_pkg_preinst() {
|
||||
:
|
||||
}
|
||||
fi
|
||||
|
||||
# prerm functions
|
||||
if [[ $EBUILD_PHASE == "preinst" ]]
|
||||
then
|
||||
[[ ! -d /var/lib/calculate ]] && mkdir /var/lib/calculate
|
||||
touch "/var/lib/calculate/-merge-$PN--${SLOT/\//_}-$PPID"
|
||||
fi
|
||||
|
||||
# Copyright 2014 Calculate Ltd. http://www.calculate-linux.org
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
if [[ $EBUILD_PHASE == "postrm" ]]
|
||||
then
|
||||
if [[ ! -f /var/lib/calculate/-merge-$PN--${SLOT/\//_}-$PPID ]] && check_skip
|
||||
then
|
||||
if [[ -n $calcver ]]
|
||||
then
|
||||
CL_UPDATE_PROG=/usr/sbin/cl-core-setup
|
||||
if [ -e ${CL_UPDATE_PROG} ];then
|
||||
${CL_UPDATE_PROG} --no-progress --pkg-version ${PVR} --pkg-slot ${SLOT} --pkg-category ${CATEGORY} --pkg-path / --pkg-name ${PN}
|
||||
fi
|
||||
fi
|
||||
else
|
||||
cp /var/db/pkg/${CATEGORY}/${PF}/CONTENTS /var/lib/calculate/-CONTENTS-$PN
|
||||
fi
|
||||
rm -f /var/lib/calculate/-merge-$PN-*
|
||||
fi
|
||||
for fn in /etc/calculate/profile.bashrc.d/*;do
|
||||
[[ -f $fn ]] && source ${fn} && PROFILE_BASHRC_D=1
|
||||
done
|
||||
[[ -z ${PROFILE_BASHRC_D} ]] && source ${BASH_SOURCE}.old
|
||||
|
@ -0,0 +1,345 @@
|
||||
# vim: set syntax=sh
|
||||
# Automatic patching.
|
||||
# put PATCH_OVERLAY=/path/to/patches into make.conf and then put patches into
|
||||
# $PATCH_OVERLAY/cate-gory/package/
|
||||
#
|
||||
# As I know history: Initial idea from solar, later
|
||||
# Ed Catmur added support autoreconf calls then pva rewritten everything...
|
||||
# Added interval check for version and run .sh hooks by Calculate
|
||||
#
|
||||
|
||||
# don't setup packages by cl-core
|
||||
check_skip() {
|
||||
declare -A SKIPPKGS=(
|
||||
["calculate-install"]="1"
|
||||
["calculate-lib"]="1"
|
||||
["calculate-console"]="1"
|
||||
["calculate-console-gui"]="1"
|
||||
["calculate-core"]="1"
|
||||
["calculate-desktop"]="1"
|
||||
["calculate-client"]="1"
|
||||
["calculate-update"]="1" )
|
||||
|
||||
[[ -z ${SKIPPKGS[$PN]} ]]
|
||||
}
|
||||
|
||||
pkg_checkver() {
|
||||
PATCH_PV=( `echo $1 | sed 's/[._]/ /g' | sed -r 's/([a-z]+)/ \1 /g'` )
|
||||
EBUILD_PV=( `echo $2 | sed 's/[._]/ /g' | sed -r 's/([a-z]+)/ \1 /g'` )
|
||||
for i in $(seq 0 10);
|
||||
do
|
||||
# next part of version of patch
|
||||
if [[ -n ${PATCH_PV[$i]} ]]
|
||||
then
|
||||
# if part patch version not equal ebuild version
|
||||
if [[ ${PATCH_PV[$i]} != ${EBUILD_PV[$i]} ]]
|
||||
then
|
||||
# is pv in patch interval
|
||||
if [[ ${PATCH_PV[$i]} =~ ^([0-9]+)-([0-9]+)$ ]]
|
||||
then
|
||||
# check version of ebuild not in interval
|
||||
if [[ ${EBUILD_PV[$i]} -lt ${BASH_REMATCH[1]} ||
|
||||
${EBUILD_PV[$i]} -gt ${BASH_REMATCH[2]} ]]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
# pv not interval
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
pkg_try2apply() {
|
||||
local patch=${1}
|
||||
for l in `seq 0 4`; do
|
||||
patch -g0 --dry-run -p${l} >/dev/null < "${patch}"
|
||||
if [ $? = 0 ]; then
|
||||
echo "auto patching succeeded (-p${l}) ${patch}" > "${S}/.$(basename ${patch})"
|
||||
#patch -g0 -p${l} < "${patch}" && return 0
|
||||
patch -g0 -p${l} < "${patch}" > /dev/null && return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
apecho() {
|
||||
:
|
||||
#echo "AP: ${@}"
|
||||
}
|
||||
|
||||
pkg_pick_patches() {
|
||||
apecho " * entering pick_patches ${1}"
|
||||
pushd "${1}" > /dev/null 2>&1
|
||||
local VERSION='(-(cvs[.])?[0-9]+([.][0-9]+(-[0-9]+)?)*[a-z]?(_(pre|p|beta|alpha|rc)[0-9]*)*)?'
|
||||
for f in *${PN}*; do
|
||||
[[ ! -e ${f} ]] && continue
|
||||
apecho " > processing file: ${f}."
|
||||
if [[ ${f} =~ ^(..-)?${PN}${VERSION}(-r[0-9]+)?(_[0-9a-zA-Z-]+_)?([0-9a-zA-Z_.-]+[.](${patch_extens}))?$ ]]; then
|
||||
local MATCHED_PV=${BASH_REMATCH[2]/-}
|
||||
local MATCHED_PR=${BASH_REMATCH[7]/-}
|
||||
local MATCHED_ARCH=${BASH_REMATCH[8]//_}
|
||||
local MATCHED_EXT=${BASH_REMATCH[10]}
|
||||
apecho " | parsed: PV=$MATCHED_PV, PR=$MATCHED_PR, ARCH=$MATCHED_ARCH, ext=$MATCHED_EXT."
|
||||
if [[ -n ${MATCHED_ARCH} && ( ${MATCHED_ARCH} != ${ARCH} && ${MATCHED_ARCH} != all ) ]]; then
|
||||
apecho " X ARCH does not match. Skipping..."
|
||||
continue
|
||||
fi
|
||||
if [[ -n ${MATCHED_PR} && ${MATCHED_PR} != ${PR} ]]; then
|
||||
apecho " X PR does not match. Skipping..."
|
||||
continue
|
||||
fi
|
||||
if [[ -n ${MATCHED_PV} ]] && ! pkg_checkver ${MATCHED_PV} ${PV}; then
|
||||
apecho " X PV=${MATCHED_PV} does not match. Skipping..."
|
||||
continue
|
||||
fi
|
||||
if [[ -d ${f} ]]; then
|
||||
apecho " -> $f is a direcrory. Delving..."
|
||||
pkg_pick_patches ${f}
|
||||
apecho "<- Back. Continuing..."
|
||||
continue
|
||||
|
||||
elif [[ -z ${MATCHED_EXT} ]]; then
|
||||
apecho " X Is $f a file without patch|diff extension. Skipping."
|
||||
continue
|
||||
fi
|
||||
apecho " + Adding '$(pwd)/${f}' to patches."
|
||||
patches=( "${patches[@]}" "$(pwd)/${f}")
|
||||
fi
|
||||
done
|
||||
popd > /dev/null
|
||||
apecho " < ${patches[@]}"
|
||||
}
|
||||
|
||||
pkgpatch() {
|
||||
local -a patches=()
|
||||
local -i runautomake=0 runautoconf=0
|
||||
[[ ! -d "${PATCH_OVERLAY}/${CATEGORY}" ]] && return 0
|
||||
# only in precompile phase find patches and hooks
|
||||
if [[ ${EBUILD_PHASE} == compile ]]; then
|
||||
local patch_extens="diff|patch|sh"
|
||||
# in other phases find only hooks
|
||||
else
|
||||
local patch_extens="sh"
|
||||
fi
|
||||
pkg_pick_patches "${PATCH_OVERLAY}/${CATEGORY}"
|
||||
apecho " ! GRAND RESULT: ${patches[@]}"
|
||||
# before unpack phase ${S} yet not present
|
||||
if ! pushd "${S}" &>/dev/null;then
|
||||
pushd "`pwd`" >/dev/null
|
||||
fi
|
||||
for patch in "${patches[@]}"; do
|
||||
if [[ $patch =~ \.sh$ ]];
|
||||
then
|
||||
source $patch
|
||||
else
|
||||
ebegin "Trying to apply $(basename ${patch})"
|
||||
if pkg_try2apply "${patch}"; then
|
||||
eend 0
|
||||
else
|
||||
eend 1
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
if grep -E '^[+][+][+][[:space:]]+.*Makefile[.]am[[:space:]]+.*$' "${patch}" >/dev/null; then
|
||||
einfo "Need to rerun automake"
|
||||
(( ++runautomake ))
|
||||
fi
|
||||
if grep -E '^[+][+][+][[:space:]]+.*configure[.](ac|in)[[:space:]]+.*$' "${patch}">/dev/null; then
|
||||
einfo "Need to rerun autoconf"
|
||||
(( ++runautoconf ))
|
||||
fi
|
||||
done
|
||||
if [[ ${runautomake} -gt 0 || ${runautoconf} -gt 0 ]]; then
|
||||
inherit autotools
|
||||
fi
|
||||
if [[ ${runautomake} -gt 0 && ${runautoconf} -gt 0 ]]; then
|
||||
eautoreconf
|
||||
elif [[ ${runautomake} -gt 0 ]]; then
|
||||
eautomake
|
||||
elif [[ ${runautoconf} -gt 0 ]]; then
|
||||
eautoconf
|
||||
fi
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
[ -d /var/db/pkg/sys-apps/calculate-core-3.1.[1-9]* ] && calcver=3.1.1
|
||||
|
||||
post_pkg_preinst() {
|
||||
CL_UPDATE_PROG=/usr/lib/calculate-2.2/calculate-lib/bin/cl-update-config
|
||||
if [ -e ${CL_UPDATE_PROG} ];then
|
||||
[[ -z ${CONFIG_PROTECT} && -e /etc/profile ]] && source /etc/profile
|
||||
CONFIG_PROTECT=${CONFIG_PROTECT} ${CL_UPDATE_PROG} --desktop --system --pkg_version ${PVR} --pkg_category ${CATEGORY} --path ${D} $PN
|
||||
fi
|
||||
CL_UPDATE_PROG=/usr/sbin/cl-core-setup
|
||||
if [ -e ${CL_UPDATE_PROG} ] && [[ -z $calcver ]] && check_skip
|
||||
then
|
||||
${CL_UPDATE_PROG} --no-progress --pkg-version ${PVR} --pkg-category ${CATEGORY} --pkg-path ${D} --pkg-name ${PN}
|
||||
fi
|
||||
}
|
||||
|
||||
post_pkg_postinst() {
|
||||
if [ -e "${PORTAGE_BUILDDIR}/.patched" ];then
|
||||
rm -f "${PORTAGE_BUILDDIR}/.patched"
|
||||
fi
|
||||
if [[ -n $calcver ]] && [[ -f /var/lib/calculate/-postmerge ]] && check_skip
|
||||
then
|
||||
CL_UPDATE_PROG=/usr/sbin/cl-core-setup
|
||||
if [ -e ${CL_UPDATE_PROG} ];then
|
||||
OLDIFS=$IFS
|
||||
IFS=/
|
||||
while read category pkgname;do
|
||||
[[ -n $pkgname ]] || continue
|
||||
IFS=$OLDIFS
|
||||
CTARGET=${CTARGET} GCC_CONFIG_VER=${GCC_CONFIG_VER} ${CL_UPDATE_PROG} --no-progress --pkg-name $pkgname --pkg-category $category --pkg-path "/"
|
||||
IFS=/
|
||||
done </var/lib/calculate/-postmerge
|
||||
IFS=$OLDIFS
|
||||
fi
|
||||
fi
|
||||
rm -f /var/lib/calculate/-postmerge
|
||||
}
|
||||
|
||||
pre_pkg_postinst() {
|
||||
rm -f /var/lib/calculate/-postmerge
|
||||
if [[ -n $calcver ]] && check_skip
|
||||
then
|
||||
CL_UPDATE_PROG=/usr/sbin/cl-core-setup
|
||||
if [ -e ${CL_UPDATE_PROG} ];then
|
||||
CTARGET=${CTARGET} GCC_CONFIG_VER=${GCC_CONFIG_VER} ${CL_UPDATE_PROG} --no-progress --pkg-version ${PVR} --pkg-slot ${SLOT} --pkg-category ${CATEGORY} --pkg-path "/" --pkg-name ${PN}
|
||||
fi
|
||||
fi
|
||||
rm -f /var/lib/calculate/-merge-$PN-*
|
||||
rm -f /var/lib/calculate/-CONTENTS-*
|
||||
}
|
||||
|
||||
CL_CORE_PATCH=/usr/sbin/cl-core-patch
|
||||
if [[ ${EBUILD_PHASE} == "compile" ]] && [ -e ${CL_CORE_PATCH} ] &&
|
||||
[[ -d ${S} ]] && check_skip; then
|
||||
${CL_CORE_PATCH} --no-progress --pkg-version ${PVR} --pkg-slot ${SLOT} --pkg-category ${CATEGORY} --pkg-path ${S} --pkg-name ${PN} --verbose
|
||||
else
|
||||
if [[ `readlink -f /etc/portage/bashrc` != "/usr/calculate/install/bashrc" ]] || [[ ! -f /etc/portage/bashrc ]]
|
||||
then
|
||||
PATCH_OVERLAY="/usr/local/portage/layman/calculate/profiles/patches"
|
||||
[[ -d "/var/lib/layman/calculate/profiles/patches" ]] && \
|
||||
PATCH_OVERLAY="/var/lib/layman/calculate/profiles/patches"
|
||||
PATH=${PATH}:/usr/sbin:/usr/bin:/bin:/sbin
|
||||
|
||||
if [[ ${EBUILD_PHASE} == compile ]]; then
|
||||
if [[ ! -f ${PORTAGE_BUILDDIR}/.patched || \
|
||||
( ${PORTAGE_BUILDDIR}/.unpacked -nt ${PORTAGE_BUILDDIR}/.patched ) ]]; then
|
||||
touch "${PORTAGE_BUILDDIR}/.patched"
|
||||
elif [[ "${PORTAGE_BUILDDIR}/.unpacked" -nt "${PORTAGE_BUILDDIR}/.patched" ]]; then
|
||||
einfo ">>> WORKDIR is up-to-date and patched, keeping..."
|
||||
fi
|
||||
fi
|
||||
|
||||
pkgpatch
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update configuration files for package installation
|
||||
if [[ ${EBUILD_PHASE} == setup ]]; then
|
||||
userBashrc="/etc/portage/bashrc"
|
||||
if [[ -f /etc/portage/bashrc ]] &&
|
||||
grep -q -e "function\s+post_pkg_preinst" -e "post_pkg_preinst\(\)" $userBashrc &&
|
||||
! grep -q "calculate_post_pkg_preinst" $userBashrc;
|
||||
then
|
||||
ewarn ""
|
||||
ewarn "!!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!"
|
||||
ewarn "Redeclaration post_pkg_reinst was detected in ${useBashrc}."
|
||||
ewarn "Remove it for correct package configuration."
|
||||
inherit eutils
|
||||
ebeep 5
|
||||
fi
|
||||
fi
|
||||
|
||||
# added for calculate2.2
|
||||
# FUNC: change_permissions
|
||||
# DESC: change permissions for all files and directories into specified
|
||||
change_permissions() {
|
||||
local directory=$1
|
||||
[[ -d $1 ]] || return
|
||||
|
||||
# get owner from parent directory
|
||||
addwrite ${directory}
|
||||
local dirowner=$(stat -c"%u:%g" ${directory})
|
||||
local dirmode=0$(stat -c%a ${directory})
|
||||
# get permissions from parent directory
|
||||
local dirmode=0$(stat -c%a ${directory})
|
||||
|
||||
# turnoff execute for all (permission for files in parent directory)
|
||||
if which bc &>/dev/null;
|
||||
then
|
||||
local filemode=0$(echo "obase=8;$(( $dirmode & 0666 ))" | bc)
|
||||
elif which printf &>/dev/null;
|
||||
then
|
||||
local filemode=$(printf "0%o" $(( $dirmode & 0666 )) )
|
||||
else
|
||||
local filemode=
|
||||
fi
|
||||
# set for all files and directories dirowner
|
||||
chown -R ${dirowner} ${directory}
|
||||
# set permissions for all directories in parent directory
|
||||
find ${directory} \! -perm ${dirmode} -type d -exec chmod ${dirmode} {} \;
|
||||
if [[ -n $filemode ]]
|
||||
then
|
||||
# set permissions for all files in parent directory
|
||||
find ${directory} \! -perm ${filemode} -type f -exec chmod ${filemode} {} \;
|
||||
fi
|
||||
}
|
||||
|
||||
# system has "remote" share
|
||||
if grep "\[remote\]" /etc/samba/smb.conf &>/dev/null
|
||||
then
|
||||
post_src_unpack() {
|
||||
einfo "Performing permissions change for distdir directory"
|
||||
change_permissions ${PORTAGE_ACTUAL_DISTDIR}
|
||||
}
|
||||
else
|
||||
post_src_unpack() {
|
||||
:
|
||||
}
|
||||
fi
|
||||
|
||||
if grep "\[remote\]" /etc/samba/smb.conf &>/dev/null
|
||||
then
|
||||
pre_pkg_preinst() {
|
||||
einfo "Performing permissions change for packages directory"
|
||||
change_permissions ${PKGDIR}
|
||||
}
|
||||
else
|
||||
pre_pkg_preinst() {
|
||||
:
|
||||
}
|
||||
fi
|
||||
|
||||
# prerm functions
|
||||
if [[ $EBUILD_PHASE == "preinst" ]]
|
||||
then
|
||||
[[ ! -d /var/lib/calculate ]] && mkdir /var/lib/calculate
|
||||
touch "/var/lib/calculate/-merge-$PN--${SLOT/\//_}-$PPID"
|
||||
fi
|
||||
|
||||
|
||||
if [[ $EBUILD_PHASE == "postrm" ]]
|
||||
then
|
||||
if [[ ! -f /var/lib/calculate/-merge-$PN--${SLOT/\//_}-$PPID ]] && check_skip
|
||||
then
|
||||
if [[ -n $calcver ]]
|
||||
then
|
||||
CL_UPDATE_PROG=/usr/sbin/cl-core-setup
|
||||
if [ -e ${CL_UPDATE_PROG} ];then
|
||||
${CL_UPDATE_PROG} --no-progress --pkg-version ${PVR} --pkg-slot ${SLOT} --pkg-category ${CATEGORY} --pkg-path / --pkg-name ${PN}
|
||||
fi
|
||||
fi
|
||||
else
|
||||
cp /var/db/pkg/${CATEGORY}/${PF}/CONTENTS /var/lib/calculate/-CONTENTS-$PN
|
||||
fi
|
||||
rm -f /var/lib/calculate/-merge-$PN-*
|
||||
fi
|
@ -0,0 +1 @@
|
||||
# Calculate cl_ver>=3.1.9.3&&merge()!=&&pkg()!= path=/etc/calculate name=profile.bashrc.d
|
@ -0,0 +1,24 @@
|
||||
# vim: set syntax=sh
|
||||
#
|
||||
# Copyright 2014 Calculate Ltd. http://www.calculate-linux.org
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
|
||||
check_skip() {
|
||||
declare -A SKIPPKGS=(
|
||||
["calculate-install"]="1"
|
||||
["calculate-lib"]="1"
|
||||
["calculate-console"]="1"
|
||||
["calculate-console-gui"]="1"
|
||||
["calculate-core"]="1"
|
||||
["calculate-desktop"]="1"
|
||||
["calculate-client"]="1"
|
||||
["calculate-update"]="1" )
|
||||
|
||||
[[ -z ${SKIPPKGS[$PN]} ]]
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
# vim: set syntax=sh
|
||||
#
|
||||
# Copyright 2014 Calculate Ltd. http://www.calculate-linux.org
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
CL_CORE_PATCH=/usr/sbin/cl-core-patch
|
||||
|
||||
if [[ ${EBUILD_PHASE} == "compile" ]] && [[ -d ${S} ]] && check_skip; then
|
||||
${CL_CORE_PATCH} --no-progress --pkg-version ${PVR} \
|
||||
--pkg-slot ${SLOT} --pkg-category ${CATEGORY} \
|
||||
--pkg-path ${S} --pkg-name ${PN} --verbose
|
||||
fi
|
@ -0,0 +1,31 @@
|
||||
# vim: set syntax=sh
|
||||
#
|
||||
# Copyright 2014 Calculate Ltd. http://www.calculate-linux.org
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
CL_UPDATE_PROG=/usr/sbin/cl-core-setup
|
||||
|
||||
post_setup_package() {
|
||||
if [[ -f /var/lib/calculate/-postmerge ]] && check_skip
|
||||
then
|
||||
OLDIFS=$IFS
|
||||
IFS=/
|
||||
while read category pkgname;do
|
||||
[[ -n $pkgname ]] || continue
|
||||
IFS=$OLDIFS
|
||||
CTARGET=${CTARGET} GCC_CONFIG_VER=${GCC_CONFIG_VER} ${CL_UPDATE_PROG} --no-progress --pkg-name $pkgname --pkg-category $category --pkg-path "/"
|
||||
IFS=/
|
||||
done < <(sort /var/lib/calculate/-postmerge | uniq)
|
||||
IFS=$OLDIFS
|
||||
fi
|
||||
rm -f /var/lib/calculate/-postmerge
|
||||
}
|
||||
|
||||
post_pkg_postinst() {
|
||||
post_setup_package
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
# vim: set syntax=sh
|
||||
#
|
||||
# Copyright 2014 Calculate Ltd. http://www.calculate-linux.org
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# added for calculate server 2.2
|
||||
# FUNC: change_permissions
|
||||
# DESC: change permissions for all files and directories into specified
|
||||
change_permissions() {
|
||||
local directory=$1
|
||||
[[ -d $1 ]] || return
|
||||
|
||||
addwrite ${directory}
|
||||
# get owner from parent directory
|
||||
local diruid=$(stat -c"%u" ${directory})
|
||||
local dirgid=$(stat -c"%g" ${directory})
|
||||
local dirowner="${diruid}:${dirgid}"
|
||||
# get permissions from parent directory
|
||||
local dirmode=0$(stat -c%a ${directory})
|
||||
|
||||
# turnoff execute for all (permission for files in parent directory)
|
||||
if type bc &>/dev/null;
|
||||
then
|
||||
local filemode=0$(echo "obase=8;$(( $dirmode & 0666 ))" | bc)
|
||||
elif type printf &>/dev/null;
|
||||
then
|
||||
local filemode=$(printf "0%o" $(( $dirmode & 0666 )) )
|
||||
else
|
||||
local filemode=
|
||||
fi
|
||||
# set for all files and directories dirowner
|
||||
find ${directory} \! -uid ${diruid} -o \! -gid ${dirgid} -exec chown ${dirowner} {} \;
|
||||
# set permissions for all directories in parent directory
|
||||
find ${directory} \! -perm ${dirmode} -type d -exec chmod ${dirmode} {} \;
|
||||
if [[ -n $filemode ]]
|
||||
then
|
||||
# set permissions for all files in parent directory
|
||||
find ${directory} \! -perm ${filemode} -type f -exec chmod ${filemode} {} \;
|
||||
fi
|
||||
}
|
||||
|
||||
# system has "remote" share
|
||||
if grep "\[remote\]" /etc/samba/smb.conf &>/dev/null
|
||||
then
|
||||
pre_pkg_preinst() {
|
||||
einfo "Performing permissions change for packages directory"
|
||||
change_permissions ${PKGDIR}
|
||||
}
|
||||
|
||||
post_src_unpack() {
|
||||
einfo "Performing permissions change for distdir directory"
|
||||
change_permissions ${PORTAGE_ACTUAL_DISTDIR}
|
||||
}
|
||||
else
|
||||
post_src_unpack() {
|
||||
:
|
||||
}
|
||||
|
||||
pre_pkg_preinst() {
|
||||
:
|
||||
}
|
||||
fi
|
@ -0,0 +1,68 @@
|
||||
# vim: set syntax=sh
|
||||
#
|
||||
# Copyright 2014 Calculate Ltd. http://www.calculate-linux.org
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
CL_UPDATE_PROG=/usr/sbin/cl-core-setup
|
||||
[[ -d /var/lib/calculate ]] || mkdir /var/lib/calculate
|
||||
|
||||
# setup package and create postmerge package list
|
||||
setup_merge_package() {
|
||||
rm -f /var/lib/calculate/-postmerge
|
||||
check_skip && CTARGET=${CTARGET} GCC_CONFIG_VER=${GCC_CONFIG_VER} ${CL_UPDATE_PROG} --no-progress --pkg-version ${PVR} --pkg-slot ${SLOT} --pkg-category ${CATEGORY} --pkg-path "/" --pkg-name ${PN}
|
||||
}
|
||||
|
||||
# remove mark: package updating
|
||||
clean_update_mark() {
|
||||
rm -f /var/lib/calculate/-merge-$PN-*
|
||||
}
|
||||
|
||||
# remove contents file which need for cl-core-setup
|
||||
clean_contents_mark() {
|
||||
rm -f /var/lib/calculate/-CONTENTS-*
|
||||
}
|
||||
|
||||
# mark: package updating
|
||||
mark_update_package() {
|
||||
touch "/var/lib/calculate/-merge-$PN--${SLOT/\//_}-$PPID"
|
||||
}
|
||||
|
||||
# dispatching unmerge or update package
|
||||
pkg_postrm_dispatch() {
|
||||
if [[ ! -f /var/lib/calculate/-merge-$PN--${SLOT/\//_}-$PPID ]]
|
||||
then
|
||||
pkg_postrm_unmerge
|
||||
else
|
||||
pkg_postrm_update
|
||||
fi
|
||||
}
|
||||
|
||||
# setup package umerging
|
||||
pkg_postrm_unmerge() {
|
||||
check_skip && ${CL_UPDATE_PROG} --no-progress --pkg-version ${PVR} --pkg-slot ${SLOT} --pkg-category ${CATEGORY} --pkg-path / --pkg-name ${PN}
|
||||
}
|
||||
|
||||
# save contents file for correct package updating by cl-core-setup
|
||||
pkg_postrm_update() {
|
||||
cp /var/db/pkg/${CATEGORY}/${PF}/CONTENTS /var/lib/calculate/-CONTENTS-$PN
|
||||
}
|
||||
|
||||
pre_pkg_postrm() {
|
||||
pkg_postrm_dispatch
|
||||
clean_update_mark
|
||||
}
|
||||
|
||||
pre_pkg_postinst() {
|
||||
setup_merge_package
|
||||
clean_contents_mark
|
||||
clean_update_mark
|
||||
}
|
||||
|
||||
pre_pkg_preinst() {
|
||||
mark_update_package
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
# Calculate merge()!=&&pkg()!= path=/etc/runlevels name=boot
|
||||
|
@ -1 +0,0 @@
|
||||
# Calculate link=/etc/init.d/calculate-builder symbolic force protected
|
@ -0,0 +1 @@
|
||||
# Calculate append=skip cl_merge_pkg!=&&cl_ver>=3.1.9.3
|
@ -0,0 +1 @@
|
||||
# Calculate append=skip merge(sys-kernel/calculate-sources)!= postmerge=sys-boot/grub
|
@ -0,0 +1 @@
|
||||
# Calculate append=skip merge()!=
|
@ -0,0 +1,15 @@
|
||||
# Calculate format=diff
|
||||
diff -ruN dracut-034.orig/dracut.sh dracut-034/dracut.sh
|
||||
--- dracut-034.orig/dracut.sh 2013-12-27 17:19:20.082554927 +0400
|
||||
+++ dracut-034/dracut.sh 2014-01-09 14:42:53.235039034 +0400
|
||||
@@ -1270,7 +1270,10 @@
|
||||
else
|
||||
dinfo "*** Pre-linking files ***"
|
||||
inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf
|
||||
+ [[ -d $initdir/proc ]] || mkdir $initdir/proc
|
||||
+ mount -n -t proc none $initdir/proc
|
||||
chroot "$initdir" "$PRELINK_BIN" -a
|
||||
+ umount -n $initdir/proc
|
||||
rm -f -- "$initdir/$PRELINK_BIN"
|
||||
rm -fr -- "$initdir"/etc/prelink.*
|
||||
dinfo "*** Pre-linking files done ***"
|
@ -0,0 +1,51 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
PYTHON_DEPEND="2:2.7"
|
||||
RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="The WSDL core for Calculate 3"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="minimal"
|
||||
|
||||
DEPEND="~sys-apps/calculate-lib-3.1.9
|
||||
>=dev-python/soaplib-1.0
|
||||
!minimal? ( dev-python/sudsds
|
||||
net-libs/dslib
|
||||
dev-python/pyopenssl
|
||||
dev-libs/openssl
|
||||
dev-python/m2crypto
|
||||
dev-python/cherrypy )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
pkg_preinst() {
|
||||
dosym /usr/sbin/cl-core /usr/sbin/cl-core-setup
|
||||
dosym /usr/sbin/cl-core /usr/sbin/cl-core-patch
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "For autoconfigure calculate-core for adminuser perform:"
|
||||
einfo " cl-core --bootstrap <username>"
|
||||
einfo "For run calculate-core perform:"
|
||||
einfo " /etc/init.d/calculate-core start"
|
||||
einfo "Add calcualte core to autorun:"
|
||||
einfo " rc-update add calculate-core boot"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-core-3.1.9-r4.patch"
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
diff --git core/server/cert_cmd.py core/server/cert_cmd.py
|
||||
index eeaa33e..4a8fb66 100644
|
||||
--- core/server/cert_cmd.py
|
||||
+++ core/server/cert_cmd.py
|
||||
@@ -177,7 +177,6 @@ def check_server_certificate(cert, key, cert_path, args, port, auto = False):
|
||||
|
||||
# send a certificate signing request to another server
|
||||
elif args.host:
|
||||
- port = args.port if args.port else 8888
|
||||
url = "https://%s:%d/?wsdl" %(args.host, port)
|
||||
print url + '\n' + _("connecting...")
|
||||
from sudsds.client import Client
|
||||
@@ -225,7 +224,6 @@ def check_server_certificate(cert, key, cert_path, args, port, auto = False):
|
||||
req_id = fc.read()
|
||||
fc.close()
|
||||
|
||||
- port = args.port if args.port else 8888
|
||||
url = "https://%s:%d/?wsdl" %(args.root_host, port)
|
||||
print url + '\n' + _("connecting...")
|
||||
|
||||
@@ -1125,7 +1123,7 @@ def parse(full=False):
|
||||
'--start', action='store_true', default=False, dest = 'start',
|
||||
help=_('server started'))
|
||||
parser.add_argument(
|
||||
- '-p', '--port', type=int, default = '8888', dest='port',
|
||||
+ '-p', '--port', type=int, dest='port',
|
||||
help=_('port number'))
|
||||
parser.add_argument(
|
||||
'--pid-file', type=str, dest='pidfile',
|
||||
diff --git core/server/cl_server.py core/server/cl_server.py
|
||||
index 8daf7e4..a62d8cd 100644
|
||||
--- core/server/cl_server.py
|
||||
+++ core/server/cl_server.py
|
||||
@@ -74,16 +74,13 @@ def main(*args, **keywords):
|
||||
key = ob.Get('cl_core_key')
|
||||
cl_ver = ob.Get('cl_ver')
|
||||
log_path_var = ob.Get('cl_log_path')
|
||||
+ cl_core_port = ob.GetInteger('cl_core_port')
|
||||
|
||||
if args.version:
|
||||
print cl_ver
|
||||
return 0
|
||||
|
||||
- if os.getuid():
|
||||
- if any("sbin" in x for x in sys.argv[0].split('/')):
|
||||
- print _("User must be root")
|
||||
- sys.exit(1)
|
||||
- elif ob.Get('cl_ebuild_phase') == '':
|
||||
+ if ob.Get('cl_ebuild_phase') == '':
|
||||
import logging
|
||||
import logging.handlers
|
||||
|
||||
@@ -113,7 +110,7 @@ def main(*args, **keywords):
|
||||
ob.close()
|
||||
if not args.method:
|
||||
try:
|
||||
- port = args.port
|
||||
+ port = args.port or cl_core_port
|
||||
if args.check:
|
||||
import bootstrap
|
||||
bootstrap.check(cert, key, cert_path, data_path, certbase, args)
|
||||
diff --git core/server/func.py core/server/func.py
|
||||
index c095483..ae69095 100644
|
||||
--- core/server/func.py
|
||||
+++ core/server/func.py
|
||||
@@ -132,7 +132,7 @@ class CommonMethods:
|
||||
root = '/'
|
||||
else:
|
||||
root = root.getDirectory()
|
||||
- cltFilter=True if cltFilter in (True,"on") else False,
|
||||
+ cltFilter=True if cltFilter in (True,"on") else False
|
||||
self.clVars.Set("cl_chroot_path",chroot, True)
|
||||
self.clVars.Set("cl_root_path",root, True)
|
||||
# определение каталогов содержащих шаблоны
|
||||
@@ -148,8 +148,9 @@ class CommonMethods:
|
||||
printERROR=self.printERROR)
|
||||
try:
|
||||
dirsFiles = clTempl.applyTemplates()
|
||||
- if clTempl.getError():
|
||||
- raise TemplatesError(clTempl.getError())
|
||||
+ if clTempl.hasError():
|
||||
+ if clTempl.getError():
|
||||
+ raise TemplatesError(clTempl.getError())
|
||||
finally:
|
||||
if clTempl:
|
||||
if clTempl.cltObj:
|
||||
diff --git core/variables/core.py core/variables/core.py
|
||||
index 3f0b888..16ec8a1 100644
|
||||
--- core/variables/core.py
|
||||
+++ core/variables/core.py
|
||||
@@ -204,3 +204,10 @@ class VariableClGlobRootCert(Variable):
|
||||
"""
|
||||
def get(self):
|
||||
return path.join(self.Get('cl_core_cert_path'),"sys_ca.crt")
|
||||
+
|
||||
+class VariableClCorePort(Variable):
|
||||
+ """
|
||||
+ Port for cl-core WSDL server
|
||||
+ """
|
||||
+ type = "int"
|
||||
+ value = "8888"
|
||||
diff --git core/variables/setup_package.py core/variables/setup_package.py
|
||||
index 5f45dbd..9a3f3e1 100644
|
||||
--- core/variables/setup_package.py
|
||||
+++ core/variables/setup_package.py
|
||||
@@ -192,10 +192,20 @@ class VariableClCorePkgDesktopSet(Variable):
|
||||
"""
|
||||
|
||||
type = "bool"
|
||||
- value = "on"
|
||||
opt = ["--desktop"]
|
||||
metavalue = "ON/OFF"
|
||||
|
||||
+ def get(self):
|
||||
+ if self.Get('cl_templates_locate') == ["clt"]:
|
||||
+ return "off"
|
||||
+ return "on"
|
||||
+
|
||||
+ def check(self,value):
|
||||
+ if self.Get('cl_templates_locate') == ["clt"] and value == "on":
|
||||
+ raise VariableError(
|
||||
+ _("You shouldn't choice only clt location "
|
||||
+ "for desktop templates"))
|
||||
+
|
||||
def init(self):
|
||||
self.label = _("Configure users")
|
||||
self.help = _("updating desktop (user) configuration files")
|
||||
diff --git core/wsdl_core.py core/wsdl_core.py
|
||||
index f9fe2f4..794130b 100644
|
||||
--- core/wsdl_core.py
|
||||
+++ core/wsdl_core.py
|
||||
@@ -76,9 +76,10 @@ class Wsdl(WsdlBase):
|
||||
normal=('cl_core_pkg_name',),
|
||||
expert=('cl_core_pkg_category', 'cl_core_pkg_version',
|
||||
'cl_core_pkg_slot', 'cl_core_pkg_path',
|
||||
+ 'cl_templates_locate',
|
||||
'cl_core_pkg_system_set', 'cl_core_pkg_desktop_set',
|
||||
'cl_core_pkg_root_set',
|
||||
- 'cl_templates_locate','cl_verbose_set',
|
||||
+ 'cl_verbose_set',
|
||||
'cl_dispatch_conf'),
|
||||
next_label=_("Setup"))]},
|
||||
#
|
@ -0,0 +1,44 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
PYTHON_DEPEND="2:2.7"
|
||||
RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="The program of installation Calculate Linux"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="pxe minimal"
|
||||
|
||||
DEPEND="~sys-apps/calculate-core-3.1.9
|
||||
!<sys-apps/calculate-install-2.2.29
|
||||
app-portage/layman
|
||||
>=virtual/udev-197
|
||||
!app-misc/livecd-tools
|
||||
sys-apps/iproute2[-minimal]
|
||||
!minimal? ( sys-boot/grub
|
||||
sys-apps/gptfdisk
|
||||
>=sys-apps/util-linux-2.19.1
|
||||
sys-fs/dosfstools
|
||||
sys-fs/squashfs-tools
|
||||
sys-block/parted )
|
||||
pxe? ( sys-apps/calculate-server
|
||||
net-ftp/tftp-hpa
|
||||
net-misc/dhcp
|
||||
net-fs/nfs-utils )"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-install-3.1.9-r4.patch"
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
diff --git install/distr.py install/distr.py
|
||||
index 88de47f..ae94ddb 100644
|
||||
--- install/distr.py
|
||||
+++ install/distr.py
|
||||
@@ -31,7 +31,8 @@ from functools import partial
|
||||
from calculate.lib.utils.files import (runOsCommand,isMount,removeDir,
|
||||
processProgress,countFiles,STDOUT,
|
||||
typeFile,pathJoin,process,getRunCommands,
|
||||
- readLinesFile,getProgPath,listDirectory,checkUtils)
|
||||
+ readLinesFile,getProgPath,listDirectory,checkUtils,
|
||||
+ MAGIC_COMPRESS,MAGIC_SYMLINK,MAGIC_CONTINUE)
|
||||
from calculate.lib.utils.common import getTupleVersion,cmpVersion
|
||||
from calculate.lib.utils.device import (detectDeviceForPartition,
|
||||
getUdevDeviceInfo, countPartitions,
|
||||
@@ -114,7 +115,7 @@ class Distributive(object):
|
||||
def fromFile(cls,filename):
|
||||
"""Get Distributive object by filename"""
|
||||
# MAGIC_COMPRESS 0x000004 Check inside compressed files
|
||||
- tf = typeFile(magic=0x6)
|
||||
+ tf = typeFile(magic=MAGIC_COMPRESS|MAGIC_SYMLINK|MAGIC_CONTINUE)
|
||||
ftype = tf.getMType(filename)
|
||||
if ftype:
|
||||
if "block special" in ftype:
|
||||
@@ -1095,7 +1096,7 @@ class IsoDistributive(Distributive):
|
||||
self.compress = compress
|
||||
|
||||
def getType(self):
|
||||
- tf = typeFile(magic=0x6)
|
||||
+ tf = typeFile(magic=MAGIC_COMPRESS|MAGIC_SYMLINK|MAGIC_CONTINUE)
|
||||
ftype = tf.getMType(self.file)
|
||||
if "block special" in ftype:
|
||||
return _("live image %s")%self.file
|
||||
@@ -1116,7 +1117,7 @@ class IsoDistributive(Distributive):
|
||||
def _mountIso(self,file,directory):
|
||||
if self.file != self.mdirectory:
|
||||
self._makeDirectory(directory)
|
||||
- tf = typeFile(magic=0x6)
|
||||
+ tf = typeFile(magic=MAGIC_COMPRESS|MAGIC_SYMLINK|MAGIC_CONTINUE)
|
||||
ftype = tf.getMType(file)
|
||||
if "block special" in ftype:
|
||||
mopts = "-o ro"
|
||||
diff --git install/install.py install/install.py
|
||||
index fdd6b04..c3e0c7e 100644
|
||||
--- install/install.py
|
||||
+++ install/install.py
|
||||
@@ -28,7 +28,8 @@ from shutil import copy2
|
||||
from calculate.core.server.func import safetyWrapper
|
||||
from calculate.lib.utils.files import (runOsCommand,pathJoin,
|
||||
isMount,process,listDirectory,STDOUT,
|
||||
- checkUtils,readFile,find,copyWithPath)
|
||||
+ checkUtils,readFile,find,copyWithPath,
|
||||
+ readLinesFile)
|
||||
from calculate.lib.utils.common import (appendProgramToEnvFile,
|
||||
removeProgramToEnvFile, getTupleVersion,
|
||||
cmpVersion,getUserPassword,
|
||||
@@ -350,7 +351,7 @@ class Install:
|
||||
newModuleName = defaultGL
|
||||
curModuleName = map(lambda x:x.strip().rpartition('=')[-1].strip('"\''),
|
||||
filter(lambda x: x.startswith("OPENGL_PROFILE="),
|
||||
- readFile(openGLenv)))
|
||||
+ readLinesFile(openGLenv)))
|
||||
curModuleName = curModuleName[-1] if curModuleName else ""
|
||||
if curModuleName == newModuleName:
|
||||
return True
|
||||
diff --git install/variables/disk.py install/variables/disk.py
|
||||
index ef0f9e2..14462e7 100644
|
||||
--- install/variables/disk.py
|
||||
+++ install/variables/disk.py
|
||||
@@ -31,7 +31,7 @@ from calculate.lib.utils.device import (getUdevDeviceInfo,getDeviceType,
|
||||
getUUIDDict,getCommonDeviceName)
|
||||
from calculate.install.variables.autopartition import Sizes
|
||||
from calculate.lib.utils.files import (listDirectory,pathJoin,readFile,FStab,
|
||||
- isMount)
|
||||
+ isMount,getProgPath)
|
||||
from calculate.install.distr import PartitionDistributive
|
||||
from calculate.install.fs_manager import FileSystemManager
|
||||
|
||||
@@ -110,7 +110,8 @@ class VariableOsDeviceDev(ReadonlyVariable,DeviceHelper):
|
||||
"""Get device /dev name"""
|
||||
if self.master is None:
|
||||
self.master,slave = pty.openpty()
|
||||
- self.monitor = Popen(["/sbin/udevadm","monitor","--kernel",
|
||||
+ udevAdm = getProgPath('/sbin/udevadm')
|
||||
+ self.monitor = Popen([udevAdm,"monitor","--kernel",
|
||||
"--subsystem-match=block"],stdout=slave,
|
||||
close_fds=True)
|
||||
os.close(slave)
|
||||
@@ -1834,7 +1835,7 @@ class VariableOsInstallFstabMountConf(ReadonlyVariable,DeviceHelper):
|
||||
'os_install_disk_mount',
|
||||
'os_install_disk_format',
|
||||
'os_install_disk_options',
|
||||
- 'os_disk_dev'],
|
||||
+ 'os_install_disk_dev'],
|
||||
where='os_install_disk_mount',
|
||||
func=lambda x:x[0] != "" and x[0] != "swap"),
|
||||
lambda x,y: cmp(self.separateDevice(x[1]),
|
||||
diff --git install/variables/kernel.py install/variables/kernel.py
|
||||
index 2e844ac..42ee87a 100644
|
||||
--- install/variables/kernel.py
|
||||
+++ install/variables/kernel.py
|
||||
@@ -19,7 +19,8 @@ import sys
|
||||
import re
|
||||
from os import path
|
||||
from calculate.lib.datavars import Variable,VariableError,ReadonlyVariable
|
||||
-from calculate.lib.utils.files import typeFile,process,listDirectory
|
||||
+from calculate.lib.utils.files import (
|
||||
+ typeFile,process,listDirectory,MAGIC_SYMLINK,MAGIC_COMPRESS)
|
||||
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
setLocalTranslate('cl_install3',sys.modules[__name__])
|
||||
@@ -137,7 +138,7 @@ class KernelHelper:
|
||||
def getFilesByType(self,pathname,descr):
|
||||
"""Get files from "pathname" has "descr" in descriptions"""
|
||||
filelist = map(lambda x:path.join(pathname,x),os.listdir(pathname))
|
||||
- ftype = typeFile(magic=0x4).getMType
|
||||
+ ftype = typeFile(magic=MAGIC_COMPRESS|MAGIC_SYMLINK).getMType
|
||||
filesWithType = map(lambda x:(x,ftype(x)), filelist)
|
||||
return filter(lambda x:descr in x[1],filesWithType)
|
||||
|
||||
@@ -150,7 +151,7 @@ class KernelHelper:
|
||||
return resInitrdVer.groups()[1]
|
||||
return ""
|
||||
|
||||
- ftype = typeFile(magic=0x4).getMType
|
||||
+ ftype = typeFile(magic=MAGIC_COMPRESS|MAGIC_SYMLINK).getMType
|
||||
kernelfile = path.join(chroot,'boot',kernel)
|
||||
typeKernelFile = ftype(kernelfile)
|
||||
if typeKernelFile == None:
|
@ -0,0 +1,36 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
PYTHON_DEPEND="2:2.7"
|
||||
RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="The library for Calculate 3"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="minimal"
|
||||
DEPEND="!minimal? ( dev-python/py-smbpasswd )
|
||||
>=dev-python/pyxml-0.8
|
||||
sys-apps/iproute2
|
||||
sys-apps/pciutils
|
||||
sys-fs/lvm2
|
||||
sys-fs/mdadm
|
||||
dev-python/pyinotify
|
||||
sys-apps/file[python]"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-lib-3.1.9-r7.patch"
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=4
|
||||
|
||||
DESCRIPTION="Calculate Utilities meta package"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="cl_consolegui cl_client cl_desktop cl_console"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
=sys-apps/calculate-install-3.1.9-r4
|
||||
=sys-apps/calculate-i18n-3.1.9
|
||||
=sys-apps/calculate-lib-3.1.9-r7
|
||||
=sys-apps/calculate-core-3.1.9-r4
|
||||
=sys-apps/calculate-update-3.1.9
|
||||
cl_client? ( =sys-apps/calculate-client-3.1.9-r2 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-3.1.9-r4 )
|
||||
cl_consolegui? ( =sys-apps/calculate-console-gui-3.1.9-r1 )
|
||||
cl_console? ( =sys-apps/calculate-console-3.1.9-r1 )
|
||||
"
|
Loading…
Reference in new issue