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

* использование python3 DBus сервиса для запуска cl-core
master 2172
parent accb214e27
commit 25047d8a88

@ -0,0 +1,327 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# @ECLASS: calculate-utils-r9.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
|| (
dev-python/pygobject[python_targets_python3_7]
dev-python/pygobject[python_targets_python3_6]
dev-python/pygobject[python_targets_python3_8]
)
|| (
dev-python/dbus-python[python_targets_python3_7]
dev-python/dbus-python[python_targets_python3_6]
dev-python/dbus-python[python_targets_python3_8]
)
)
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-r9_src_compile
# @DESCRIPTION:
# Compile all modules of calculate utils
calculate-utils-r9_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-r9_src_install
# @DESCRIPTION:
# Install all modules of calculate utils
calculate-utils-r9_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-r9_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
}

@ -10,9 +10,11 @@ DIST calculate-console-gui-3.6.7.tar.bz2 415026 BLAKE2B 43f4a62f7fcfa465f4d6f9c4
DIST calculate-console-gui-3.6.8.tar.bz2 414915 BLAKE2B a58033e66144fd9a7808210c32d16e1cb1e5ee8664f2d331f0ba803d64f36db956694c78922db9093fcc46f442eac029d4fbcf880dec10bd863d428eff56c2d1 SHA512 6ff64cb511adbcdafbc48854d43a250bc27fb6a8bd36bb74a4edd37453b6bb3335b7ec8860e52acb7902a50a791cd354cbdf3a45e2710e4833be23ebcb7d3c5e
DIST calculate-core-3.6.7.4.tar.bz2 99063 BLAKE2B 4988983a1ac130893ca84ac886f2b4ea9c8ffb65520c0280d72bb0f509176af086bf07948d005aad4dcf9308232741ed828867216f01cb9509c4980afbf72c77 SHA512 74e08246edaf348d631aa432439b1878598097a546c3fe3ec84cf53f58a9874fcbc42cf097667030dcc134861c0e90f666f5ce1cba0ff5d66f7f7461b58a6f55
DIST calculate-core-3.6.7.5.tar.bz2 98967 BLAKE2B ba5731a73e7d2f9b3b1c1f6a02f32a950e901116630338770a0b176cea2855eec7a5f88feea82c137a36718a0d08efc65b2541094468b01505780ba51b168c9b SHA512 15ea8c48969da76ba508ac9efc398d8c02d41937eeec8e5625e5bc942e11a4f47619d046ad8c8b7c5689dc3f1b64406b350591c73750c75eaaea9427030521e7
DIST calculate-core-3.6.8.1.tar.bz2 99172 BLAKE2B 10436841eb23c2d5ac05f57ff9b80cd2824f2817860288e8b0c3dad101119dd177c02212a6552b2014df0d0a3eb0c76b0f5c4a5930396973f6d1c74e895fcdec SHA512 ede9b910c9f8d880caceb7782e1d17c37530323f05d85cddf741b6616f3ce2ca8806a54ebb5a0f50a7603d7506478d47c0dc8a089b9e252443a352b93a364319
DIST calculate-core-3.6.8.tar.bz2 99061 BLAKE2B ede44f0aef88c0e22c65d78e478d74ead8eb98096221ba2e4c6b3275019460177c6c2febec3e5b860bf8413b2701991067fdb9e772d502e0b42b7b5fff97306a SHA512 c4d1d5a1d6c607cc95ca610958363cb9294ac1dc76def65ffff84b4d1e0ae3caea4cffcba04fced2cb33a076f7ef407991f5848d3f24d8d29ee85e086e4bf4ac
DIST calculate-desktop-3.6.7.2.tar.bz2 18676 BLAKE2B 54a6b102c2dce801912c1f7bb035640316f68e43cc1953c05b7d94c187490889b8e60f0f2520d651bd705e71c404ad4dacd7702da9e67d9cf34e7b0ea1d5ca4a SHA512 a096c7e686d470c543cb12e79b31d84cf72f178cbde26a2960491aca0d09af7bbcd832c828463ba56d273ed640c26cdc6cdfd790e8473b2de8a4d737479f0738
DIST calculate-desktop-3.6.7.tar.bz2 18600 BLAKE2B 042e570e8d2be2784ffcb20b2725062e290f6732183d412bea9e35d7cc1588c1705424d41d86a16625d932174b3eaed64af76d39576d251ecc7db1abc176e688 SHA512 090c5a7faf34b86fb89ec889c4cc77005451deb895e1d536f501f41e0c63d7c1bf1b4de93b88d18d9b1e50b46d14806999468771c062954fa9ae4ffac68795d1
DIST calculate-desktop-3.6.8.6.tar.bz2 19026 BLAKE2B 98be46d6246c6402b65cc800a2618b80b95cc761931bc19fe146347a1ef29e7a19597f559d47823c3d8200b4e1cfb9355d2d95f508e726ec1b0550578a600951 SHA512 cd0f44855f4ec0ca402ed2d952677b6c065811d2d31a1a65c0b025bccaa0bfc31e4e692658cd4ae25b4325660f58b712953ab50ca90d422446a9fab154ff386f
DIST calculate-desktop-3.6.8.tar.bz2 18658 BLAKE2B edca8d8f2dcd7178d3b4c7902f2d7df55a59bf8f9523391033da31ebaf10b357824a222735da3e7cb0810fcfa76b6c94ad16aa7c07ec6b4f9c633a87521063fd SHA512 83fd6ec63d3a5a97a386e36fa035c3c8ac9d08e00f51993966169ccb0e3b4c1dbac2286c05bb143cb17e811fee64403c95b76c4ff9c6a267eab61bef3299269b
DIST calculate-i18n-3.6.7.12.tar.bz2 795314 BLAKE2B 359bc6de9821b1fcc69814d312978ff606b78c77502b28ea504b15c0851536f5f044bb03ae22edde5da302ce5d1aeac4389a6a00b8fe7cd57b7ef9161dd4c4a6 SHA512 27f2db6d2ce0e525e3150ec1867bc646fe9bcb3281d943cf09d8cf55fae8c9f994b9fb3168223918877bc3d361a6d413ccdd6ebe08b2ffd1db1db818b890f10b
DIST calculate-i18n-3.6.7.9.tar.bz2 791410 BLAKE2B 3ed3329285e188244503f4a98dacc3833a1b4a9316f021583f5e637f922468fa6c54bf0da99a08135415ac87fb98c7a939180749ec14b01dfc302ca01ace822b SHA512 a0d06050b8a1c1ed9b559f183c585fbb051126564decaa3ebc6e7707a8824d05d0a86f1e62139f97e85a60a38cc0f20b493390c73c5739c274a9fc809f346bc5

@ -0,0 +1,21 @@
# 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=(
["core"]="3.6.8.1"
["desktop"]="3.6.8.6"
)
inherit calculate-utils-r9
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