sys-apps/calculate-utils: passlib перенесён в проект

mhiretskiy
parent 929fef6ed8
commit 3ecd9e4080

@ -0,0 +1,326 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# @ECLASS: calculate-utils-r10.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? (
>=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-r10_src_compile
# @DESCRIPTION:
# Compile all modules of calculate utils
calculate-utils-r10_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-r10_src_install
# @DESCRIPTION:
# Install all modules of calculate utils
calculate-utils-r10_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-r10_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
}

@ -21,10 +21,6 @@ change_permissions() {
then
setfacl -R -m d:u:900:rwx,u:900:rwx $directory
fi
if ! (grep -q "owner: portage" <<<$out )
then
chown 900 $directory
fi
addwrite ${directory}
# get owner from parent directory

@ -28,6 +28,7 @@ DIST calculate-ldap-3.6.7.tar.bz2 11916 BLAKE2B 00ce9c810a85ab806d023797ea1b04b4
DIST calculate-ldap-3.6.8.tar.bz2 11923 BLAKE2B 473714789c6583bf577dca15cc60c125e6ffdb0f8d1fdc14e33209fc76540c380552cbd2064d97ce6c36fd3009b0acfd628360a09006c4a96fb14a735eac53f1 SHA512 aa84559b6571367946b46ad708a9dcad49afc92ad7d2cbf4e24d9665d4482007d66f80e39e988ed7ab79f2da367ca27923fe88ed3918ef4d82fe9493a438beaf
DIST calculate-lib-3.6.7.18.tar.bz2 378586 BLAKE2B 246431ee193ff099ef61bf9c142f363f799918d500e06d04b034bf129f8f05185f3c892c07b73e97de84474b17b978e34f7d8801909090dcfb6c3d292e33293f SHA512 20a16a52f470e947bbbc09d4a36c8290c10413845d25a2e4beb093ed76bb3f0a28b1803b4bb27a059b34b9e78b8b490b76247f729adcad92ee0d03a85e8019ba
DIST calculate-lib-3.6.7.22.tar.bz2 379556 BLAKE2B 6288199c7d39e5465c851f8bcdab067da352b92c3cabc9fb6befbda4108176185d24b30e8451dacd78e3f27c4407b71242c1439a0c0cf610f8d1db85cbf3c0db SHA512 b3ac228c3335a7c8a36a7c1e7db1c367d562c68fe6e62abcc6feb0a8fb1127926b1cb2432411c711fa30bbfdff64ac85687126c8be76ed2de708aedb99194c69
DIST calculate-lib-3.6.8.2.tar.bz2 617422 BLAKE2B 98c78b1391a9c755386bb3dd87239ca21bbf522f389cc7fa0631dc9bd0b79095acc59d948c62a10babfbcd40772f0a987f2e61c55151d53631d58fd7b88499a1 SHA512 f301d19e1e045ebc1077f4115990181e4301dd1f385f5de76bdc2373e6a693f4156ec424a8827d32718146746e0f8964d4567b606b3416ade0a60d0df00b7999
DIST calculate-lib-3.6.8.tar.bz2 379164 BLAKE2B 586757a466d878982f0f687fc76509776032fbf453c5376ba287468d6174b8ca20c7a48c97a4a38a65b05896ad79e66549b8f17bcd2e86550aee475387de15e2 SHA512 2b0f38e0acd82e22d53e24e8591ff92dff4ec7373df01b367e8e3f8aec4a3e39e11c9fd2a7cb8dcc19aa932a35d18a25654b37501b2abf1cc89f59573fcef12a
DIST calculate-server-3.6.7.tar.bz2 6637 BLAKE2B 2b071f241b712466667fd1757b59955a8345257ce9c44e6f870ef02b754a34260c605391dec9956349c43b8d869b8020662a54b44d89570f6483dce55d796c36 SHA512 1ccd1ce1acea05acaef14bb1341d91551a5d9e7bfa997c94bf441862dcdc4df64bf3c83b1c033ce841178809f2ab709fee2ace3ea43c34199085b216eb7db563
DIST calculate-server-3.6.8.tar.bz2 6646 BLAKE2B e8900478cac290c3d3de491e505ea1b691907dbf3b37d959177e191d89360d52e1a4c46cb2e6be4f629aad2ae34c81b3372c47805c2842f766540af86103b039 SHA512 e88163b35a868295cb16a485dbe8d0eb50f11eb67ee34e02d3b27dccb394887cb9448e124767caaa3fefd2776b9e3ae5e31a9ec7af74d5da81635386f7a6ea7b

@ -0,0 +1,23 @@
# 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.8.2"
["core"]="3.6.8.2"
["client"]="3.6.8.1"
["desktop"]="3.6.8.6"
)
inherit calculate-utils-r10
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