sys-apps/calculate-utils: обновление

* добавлена работа утилит с sys-apps/portage без python2.7
mhiretskiy
parent dbcbf86c75
commit f67dcef390

@ -0,0 +1,317 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# @ECLASS: calculate-utils-r8.eclass
# @MAINTAINER:
# support@calculate.ru
# @AUTHOR:
# Author: Mir Calculate
# @BLURB: Functions for calculate-utils
# @DESCRIPTION:
# This eclass use for calculate-utils ebuild
PYTHON_COMPAT=(python2_7)
inherit distutils-r1 eutils
EXPORTED_FUNCTIONS="src_compile src_install pkg_preinst"
CALCULATE_URI="ftp://ftp.calculate-linux.org/calculate/source/calculate3"
MIRROR_URI="http://mirror.yandex.ru/calculate/source/calculate3"
# @ECLASS-VARIABLE: CALCULATE_MODULES
# @DESCRIPTION:
# Associative array module names and versions
# Example:
# declare -A CALCULATE_MODULES=(
# ["console-gui"]="3.2.3.4"
# )
# @ECLASS-VARIABLE: CALCULATE_MODULES_USE
# @DESCRIPTION:
# Associative array module names and use for IUSE
# Example:
# declare -A CALCULATE_MODULES_USE=(
# ["console-gui"]=""
# )
# @ECLASS-VARIABLE: CALCULATE_TARBALL
# @DESCRIPTION:
# Associative array module names and tarball archive name
# Example:
# declare -A CALCULATE_TARBALL=( ["lib"]="calculate-lib-3.2.3-r1.tar.bz2" )
# @ECLASS-VARIABLE: UTILS_PV
# @DESCRIPTION:
# Default version of all components
# Example:
: ${UTILS_PV:=$(ver_cut 1-3 ${PV})}
declare -g -A CALCULATE_TARBALL_=()
declare -g -A CALCULATE_MODULES_=(
["lib"]="$UTILS_PV"
["builder"]="$UTILS_PV"
["install"]="$UTILS_PV"
["core"]="$UTILS_PV"
["i18n"]="$UTILS_PV"
["update"]="$UTILS_PV"
["desktop"]="$UTILS_PV"
["client"]="$UTILS_PV"
["console-gui"]="$UTILS_PV"
["console"]="$UTILS_PV"
["server"]="$UTILS_PV"
["ldap"]="$UTILS_PV"
["unix"]="$UTILS_PV")
declare -g -A CALCULATE_MODULES_USE_=(
["desktop"]="desktop"
["client"]="client"
["console-gui"]="qt5"
["console"]="console"
["server"]="server"
["ldap"]="server"
["unix"]="server"
)
EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
# @FUNCTION: prepare_variables
# @DESCRIPTION:
# Prepare variables for ebuild
prepare_variables() {
for module in ${!CALCULATE_MODULES[@]}
do
CALCULATE_MODULES_[$module]=${CALCULATE_MODULES[$module]}
done
for module in ${!CALCULATE_MODULES_USE[@]}
do
CALCULATE_MODULES_USE_[$module]=${CALCULATE_MODULES_USE[$module]}
done
for module in ${!CALCULATE_MODULES_[@]}
do
MODULE_PN=calculate-${module}
MODULE_PV=${CALCULATE_MODULES_[$module]}
if [[ -n ${CALCULATE_TARBALL[$module]} ]]
then
CALCULATE_TARBALL_[$module]="${MODULE_PN}/${CALCULATE_TARBALL[$module]}"
else
CALCULATE_TARBALL_[$module]="${MODULE_PN}/${MODULE_PN}-${MODULE_PV}.tar.bz2"
fi
done
for module in ${!CALCULATE_MODULES_[@]}
do
MODULE_USE=${CALCULATE_MODULES_USE_[$module]}
MODULE_URI=""
for URI in $CALCULATE_URI $MIRROR_URI
do
MODULE_URI="${MODULE_URI} ${URI}/${CALCULATE_TARBALL_[$module]}"
done
if [[ -n $MODULE_USE ]]
then
MODULE_URI="${MODULE_USE}? ( $MODULE_URI )"
fi
SRC_URI="$SRC_URI $MODULE_URI"
done
IUSE="+install dbus +gpg minimal pxe backup ${CALCULATE_MODULES_USE_[@]}"
S="${WORKDIR}"
}
# @FUNCTION: prepare_module_info
# @DESCRIPTION:
# Prepare module info for compile and install
prepare_module_info() {
MODULE_INFO=()
for module in ${!CALCULATE_MODULES_[@]}
do
MODULE_USE=${CALCULATE_MODULES_USE_[$module]}
if [[ -z $MODULE_USE ]] || use $MODULE_USE
then
MODULE_INFO+=("calculate-$module ${CALCULATE_MODULES_[$module]}")
fi
done
}
prepare_variables
RDEPEND="
install? ( >=app-cdr/cdrtools-3.01_alpha13
>=sys-boot/grub-2.00-r3
>=sys-boot/syslinux-5
sys-fs/squashfs-tools
sys-fs/dosfstools
sys-block/parted
sys-apps/gptfdisk
sys-fs/lvm2
sys-fs/mdadm
)
!minimal? (
dev-python/passlib[python_targets_python2_7]
>=sys-apps/util-linux-2.19.1
net-misc/rsync
dev-python/sudsds[python_targets_python2_7]
net-libs/dslib[python_targets_python2_7]
>=dev-python/pyopenssl-0.14[python_targets_python2_7]
dev-libs/openssl
dev-python/m2crypto[python_targets_python2_7]
dev-python/pytz[python_targets_python2_7]
)
gpg? (
app-crypt/gnupg
app-crypt/openpgp-keys-calculate-release
)
>=dev-python/pyxml-0.8[python_targets_python2_7]
sys-apps/iproute2[-minimal]
sys-apps/pciutils
app-arch/xz-utils
dev-python/pyinotify[python_targets_python2_7]
sys-apps/file[python,python_targets_python2_7]
app-eselect/eselect-repository
|| (
sys-apps/portage[python_targets_python3_6]
sys-apps/portage[python_targets_python3_7]
sys-apps/portage[python_targets_python3_8]
)
dev-python/pyxattr[python_targets_python2_7]
>=virtual/udev-197
!app-misc/livecd-tools
sys-apps/coreutils[xattr]
pxe? ( sys-apps/calculate-server
net-ftp/tftp-hpa
net-misc/dhcp
net-fs/nfs-utils
)
>=dev-python/soaplib-1.0
!<sys-apps/calculate-server-2.1.18-r1
desktop? (
media-gfx/feh
x11-apps/xmessage
sys-apps/keyutils
sys-auth/pam_keystore
dev-lang/swig
dev-qt/qdbus:5
)
server? (
sys-auth/pam_ldap
sys-auth/nss_ldap
dev-python/python-ldap
)
client? (
dev-python/py-smbpasswd
>=dev-python/python-ldap-2.0[ssl,python_targets_python2_7]
sys-auth/pam_client
>=sys-auth/pam_ldap-180[ssl]
>=sys-auth/nss_ldap-239
)
qt5? (
dev-python/dbus-python[python_targets_python2_7]
|| (
dev-python/pillow[python_targets_python2_7]
dev-python/imaging[python_targets_python2_7]
)
dev-python/PyQt5[python_targets_python2_7]
)
dbus? (
dev-python/dbus-python
)
dev-python/pexpect[python_targets_python2_7]
!<sys-apps/calculate-lib-2.1.12
!sys-apps/calculate-lib:3
!sys-apps/calculate-i18n:3
!sys-apps/calculate-client:3
!sys-apps/calculate-desktop:3
!sys-apps/calculate-console:3
!sys-apps/calculate-console-gui:3
!sys-apps/calculate-update:3
!sys-apps/calculate-install:3
!sys-apps/calculate-core:3
server? ( !sys-apps/calculate-server )
backup? ( !sys-apps/calculate-server )
"
DEPEND="sys-devel/gettext"
REQUIRED_USE="client? ( desktop )"
# @FUNCTION: calculate-utils-r8_src_compile
# @DESCRIPTION:
# Compile all modules of calculate utils
calculate-utils-r8_src_compile() {
if ! use backup
then
sed -ir "s/'cl-backup'/None/" calculate-core-*/pym/core/wsdl_core.py
sed -ir "s/'cl-backup-restore'/None/" calculate-core-*/pym/core/wsdl_core.py
sed -ir "s/__('Backup')/None/g" calculate-core-*/pym/core/wsdl_core.py
fi
prepare_module_info
for MODULE in "${MODULE_INFO[@]}"
do
MODULE_DATA=( $MODULE )
MODULE_PN=${MODULE_DATA[0]}
MODULE_PV=${MODULE_DATA[1]}
S="${WORKDIR}/${MODULE_PN}-${MODULE_PV}"
cd $S
if [[ $MODULE_PN == "calculate-lib" ]]
then
sed -ri "/class VariableClVer/{N;N;N;N;s/value = \".*?\"/value = \"${PV}\"/;}" \
pym/calculate/lib/variables/__init__.py
fi
distutils-r1_src_compile
done
}
# @FUNCTION: calculate-utils-r8_src_install
# @DESCRIPTION:
# Install all modules of calculate utils
calculate-utils-r8_src_install() {
prepare_module_info
for MODULE in "${MODULE_INFO[@]}"
do
MODULE_DATA=( $MODULE )
MODULE_PN=${MODULE_DATA[0]}
MODULE_PV=${MODULE_DATA[1]}
S="${WORKDIR}/${MODULE_PN}-${MODULE_PV}"
cd $S
distutils-r1_src_install
done
}
python_install() {
PYTHON_INSTALL_PARAMS=
if [[ $MODULE_PN == "calculate-client" ]]
then
PYTHON_INSTALL_PARAMS="--install-scripts=/usr/sbin"
fi
if [[ $MODULE_PN == "calculate-core" ]] && use dbus
then
PYTHON_INSTALL_PARAMS="$PYTHON_INSTALL_PARAMS --dbus"
fi
distutils-r1_python_install $PYTHON_INSTALL_PARAMS
}
calculate-utils-r8_pkg_preinst() {
dosym /usr/libexec/calculate/cl-core-wrapper /usr/bin/cl-core-setup
dosym /usr/libexec/calculate/cl-core-wrapper /usr/bin/cl-core-patch
dosym /usr/libexec/calculate/cl-core-wrapper /usr/bin/cl-update
dosym /usr/libexec/calculate/cl-core-wrapper /usr/bin/cl-update-profile
if use qt5
then
dosym /usr/lib/python-exec/python2.7/cl-console-gui /usr/bin/cl-console-gui-install
dosym /usr/lib/python-exec/python2.7/cl-console-gui /usr/bin/cl-console-gui-update
fi
}

@ -48,6 +48,7 @@ DIST calculate-lib-3.6.7.11.tar.bz2 206744 BLAKE2B 49806843d490821aff8f446adabdb
DIST calculate-lib-3.6.7.12.tar.bz2 206789 BLAKE2B 5695b7838987a493a0d2cf9861de690636413f91ef92bbc823c40e1b38d25e645f9fba1ce015df33ae4983a64769e76060dbb96a2446ceab50e445a4afd6af42 SHA512 1b871a47b6bc55a685dcf03d37241672197f475f162b1e489144d50e17b6984ece748406f0e882259d5e1c8d8fc0adf574c5605a2251503379be52b1cba92e3c
DIST calculate-lib-3.6.7.13.tar.bz2 206528 BLAKE2B 1cbb5b51e152c1364d345d0dc6511dc9c1a23645d8f6d5e95642d2e03c83941f6b96a517008dc3f24187245693b7d546b9cf321ea47cf777cb41efb831469f7f SHA512 1658ca17ed7ce201bf971be769695617e77e14ce937b317f7563673b10715df5f61df730bf79ce95e9a23d0894274e04a219214fe9c08f75b002bd4cf2e5786f
DIST calculate-lib-3.6.7.14.tar.bz2 378647 BLAKE2B e8a49ccda5652f40bdea987336ea160f542e45cd0fc7d5d03ade5359cf9389ea631994d81a03c6045fcd846796563358d3d6555d251c3021894305b8bf5f08be SHA512 55c85ba3d200cdcd06e4595c0bab8279b7e41357c3271afeb63b51941357fb1536828d982649f5363c6fa9ebd79f0f1d88f707f92bfb30f4b05f8973d6e9334e
DIST calculate-lib-3.6.7.15.tar.bz2 378814 BLAKE2B 5ff5aed13d8b77051dde0f6d0ec8f90d5f336f14a4221b191d45121fbdd01f7a0e89241b53cf28da148290f16758cff78d655f60840e6dfc2df368e2bc380d09 SHA512 945e415edee97d17dd8148d2fb5e43529368a3c5318bc81254dbf2ec0a9b1c1fcdbae33e97b4d4ac6343d3e78b1251f40e8b53bac3f4446722c70652181ca7cd
DIST calculate-lib-3.6.7.2.tar.bz2 205548 BLAKE2B 899277a94bb0aafc5cc2bcb038395acecac2300434dfee9f1b8c17ecddc0ddaa639cee6cac84ef194af2be6d0bfc60a676023d6271e81639c4a5360c98d25119 SHA512 dcce2e6d1d0ecd08c5932df0c03fa2a9be8ed1c38423063aed4874b08379b7e62d9c5f2287932a330260b4e21fc313e1ff3741c5e7a0623c561cda93e57e73bd
DIST calculate-lib-3.6.7.3.tar.bz2 205651 BLAKE2B 98ba4803e10d5a9b86171022a2abdc9e53e427cb3b3874b7b43dc5d03ab218e094c2eeba13a45592f42e0fc692d6a90e9ee010cc75116326c9794158d52db6ab SHA512 c72975b084c688a4ce9ce0373e90eeb0fcca7dbc98ef1ec86974da9c59b410cd5ff54bd21ece2117627bbef046c047003f98a90142a1db487ec053f3e88308e9
DIST calculate-lib-3.6.7.4.tar.bz2 205935 BLAKE2B 3540f277008840fcd30b10eefe1cdcbce2b8f31a202e7383d361175f5708dad8c5257acb1657d27effd819177309f0281ffccba75c035662b1911ff1533f1c4c SHA512 9d060d4284eae2f84ffc8b9576d0c2c4c27c515d1ed12c04accb78a74bfb644ecee4b40f67a746e3233fb5e5e8e98d71c19ddd6bf3d7ebfd894cdd221b966eb8

@ -0,0 +1,25 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="7"
PYTHON_COMPAT=(python2_7)
declare -A CALCULATE_MODULES=(
["lib"]="3.6.7.15"
["install"]="3.6.7.8"
["core"]="3.6.7.4"
["i18n"]="3.6.7.7"
["update"]="3.6.7.8"
["builder"]="3.6.7.6"
)
inherit calculate-utils-r8
DESCRIPTION="A set of Calculate utilities for system installation, build and upgrade"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate_utilities"
LICENSE="Apache-2.0"
SLOT="3"
KEYWORDS="amd64"
Loading…
Cancel
Save