tkurbad-overlay/net-misc/flexget/flexget-3.3.21.ebuild
2022-07-22 16:59:57 +02:00

166 lines
7.0 KiB
Bash

# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=7
PYTHON_COMPAT=( python3_{9,10} )
inherit distutils-r1 eutils systemd user
if [[ ${PV} != 9999 ]]; then
MY_P="FlexGet-${PV}"
SRC_URI="mirror://pypi/F/FlexGet/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~x86"
else
inherit git-r3
EGIT_REPO_URI="git://github.com/Flexget/Flexget.git
https://github.com/Flexget/Flexget.git"
fi
DESCRIPTION="Multipurpose automation tool for content like torrents, nzbs, podcasts, comics"
HOMEPAGE="http://flexget.com/"
LICENSE="MIT"
SLOT="0"
IUSE="systemd test transmission"
RESTRICT="nomirror"
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
~dev-python/aniso8601-9.0.1[${PYTHON_USEDEP}]
~dev-python/APScheduler-3.9.1[${PYTHON_USEDEP}]
~dev-python/attrs-21.4.0[${PYTHON_USEDEP}]
~dev-python/babelfish-0.6.0[${PYTHON_USEDEP}]
~dev-python/beautifulsoup4-4.11.1[${PYTHON_USEDEP}]
~dev-python/certifi-3021.3.16[${PYTHON_USEDEP}]
~dev-python/charset_normalizer-2.1.0[${PYTHON_USEDEP}]
~dev-python/cheroot-8.6.0[${PYTHON_USEDEP}]
~dev-python/cherrypy-18.6.1[${PYTHON_USEDEP}]
~dev-python/click-8.1.3[${PYTHON_USEDEP}]
~dev-python/colorama-0.4.4[${PYTHON_USEDEP}]
~dev-python/commonmark-0.9.1[${PYTHON_USEDEP}]
~dev-python/feedparser-6.0.10[${PYTHON_USEDEP}]
~dev-python/flask-2.1.3[${PYTHON_USEDEP}]
~dev-python/flask-compress-1.12[${PYTHON_USEDEP}]
~dev-python/flask-cors-3.0.10[${PYTHON_USEDEP}]
~dev-python/flask-login-0.6.1[${PYTHON_USEDEP}]
~dev-python/flask-restful-0.3.9[${PYTHON_USEDEP}]
~dev-python/flask-restx-0.5.1[${PYTHON_USEDEP}]
~dev-python/greenlet-1.1.2[${PYTHON_USEDEP}]
~dev-python/guessit-3.4.3[${PYTHON_USEDEP}]
~dev-python/html5lib-1.1[${PYTHON_USEDEP}]
~dev-python/idna-3.3[${PYTHON_USEDEP}]
~dev-python/itsdangerous-2.1.2[${PYTHON_USEDEP}]
~dev-python/jaraco-classes-3.2.2[${PYTHON_USEDEP}]
~dev-python/jaraco-collections-3.5.2[${PYTHON_USEDEP}]
~dev-python/jaraco-context-4.1.2[${PYTHON_USEDEP}]
~dev-python/jaraco-functools-3.5.1[${PYTHON_USEDEP}]
~dev-python/jaraco-text-3.8.1[${PYTHON_USEDEP}]
~dev-python/jinja-3.1.2[${PYTHON_USEDEP}]
~dev-python/jsonschema-4.7.2[${PYTHON_USEDEP}]
~dev-python/loguru-0.6.0[${PYTHON_USEDEP}]
~dev-python/markupsafe-2.1.1[${PYTHON_USEDEP}]
~dev-python/more-itertools-8.13.0[${PYTHON_USEDEP}]
~dev-python/plumbum-1.7.2[${PYTHON_USEDEP}]
~dev-python/portend-3.1.0[${PYTHON_USEDEP}]
~dev-python/psutil-5.9.1[${PYTHON_USEDEP}]
~dev-python/pygments-2.12.0[${PYTHON_USEDEP}]
~dev-python/pynzb-0.1.0[${PYTHON_USEDEP}]
~dev-python/pyparsing-3.0.9[${PYTHON_USEDEP}]
~dev-python/pyrsistent-0.18.1[${PYTHON_USEDEP}]
~dev-python/PyRSS2Gen-1.1[${PYTHON_USEDEP}]
~dev-python/python-dateutil-2.8.2[${PYTHON_USEDEP}]
~dev-python/pytz-2022.1[${PYTHON_USEDEP}]
~dev-python/pyyaml-6.0[${PYTHON_USEDEP}]
~dev-python/rebulk-3.1.0[${PYTHON_USEDEP}]
~dev-python/requests-2.28.1[${PYTHON_USEDEP}]
~dev-python/rich-12.5.1[${PYTHON_USEDEP}]
~dev-python/rpyc-5.1.0[${PYTHON_USEDEP}]
~dev-python/sgmllib3k-1.0.0[${PYTHON_USEDEP}]
~dev-python/six-1.16.0[${PYTHON_USEDEP}]
~dev-python/soupsieve-2.3.2_p1[${PYTHON_USEDEP}]
~dev-python/sqlalchemy-1.4.39[${PYTHON_USEDEP}]
~dev-python/tempora-5.0.2[${PYTHON_USEDEP}]
~dev-python/tzdata-2022.1[${PYTHON_USEDEP}]
~dev-python/tzlocal-4.2[${PYTHON_USEDEP}]
~dev-python/urllib3-1.26.10[${PYTHON_USEDEP}]
~dev-python/webencodings-0.5.1[${PYTHON_USEDEP}]
~dev-python/werkzeug-2.1.2[${PYTHON_USEDEP}]
~dev-python/zc-lockfile-2.0[${PYTHON_USEDEP}]
~dev-python/zxcvbn-4.4.28[${PYTHON_USEDEP}]
"
RDEPEND="${DEPEND}
transmission? ( dev-python/transmissionrpc[${PYTHON_USEDEP}] )
"
DEPEND+=" test? ( dev-python/nose[${PYTHON_USEDEP}] )"
if [[ ${PV} == 9999 ]]; then
DEPEND+=" dev-python/paver[${PYTHON_USEDEP}]"
else
S="${WORKDIR}/${MY_P}"
fi
python_test() {
cp -lr tests setup.cfg "${BUILD_DIR}" || die
run_in_build_dir nosetests -v --attr=!online > "${T}/tests-${EPYTHON}.log" \
|| die "Tests fail with ${EPYTHON}"
}
pkg_setup() {
enewgroup ${PN}
enewuser ${PN} -1 -1 ${PN}
}
src_prepare() {
distutils-r1_src_prepare
sed -i -e "s/^beautifulsoup4==4.10.0/beautifulsoup4==4.11.1/" ${S}/requirements.txt || die
sed -i -e "s/^certifi==2021.10.8/certifi==3021.3.16/" ${S}/requirements.txt || die
sed -i -e "s/^charset-normalizer==2.0.12/charset-normalizer==2.1.0/" ${S}/requirements.txt || die
sed -i -e "s/^click==8.0.4/click==8.1.3/" ${S}/requirements.txt || die
sed -i -e "s/^colorama==0.4.5/colorama==0.4.4/" ${S}/requirements.txt || die
sed -i -e "s/^feedparser==6.0.8/feedparser==6.0.10/" ${S}/requirements.txt || die
sed -i -e "s/^flask==2.0.3/flask==2.1.3/" ${S}/requirements.txt || die
sed -i -e "s/^flask-compress==1.11/flask-compress==1.12/" ${S}/requirements.txt || die
sed -i -e "s/^flask-login==0.5.0/flask-login==0.6.1/" ${S}/requirements.txt || die
sed -i -e "s/^itsdangerous==2.0.1/itsdangerous==2.1.2/" ${S}/requirements.txt || die
sed -i -e "s/^jaraco.classes==3.2.1/jaraco.classes==3.2.2/" ${S}/requirements.txt || die
sed -i -e "s/^jaraco.collections==3.4.0/jaraco.collections==3.5.2/" ${S}/requirements.txt || die
sed -i -e "s/^jaraco.context==4.1.1/jaraco.context==4.1.2/" ${S}/requirements.txt || die
sed -i -e "s/^jaraco.functools==3.4.0/jaraco.functools==3.5.1/" ${S}/requirements.txt || die
sed -i -e "s/^jaraco.text==3.7.0/jaraco.text==3.8.1/" ${S}/requirements.txt || die
sed -i -e "s/^jinja2==3.0.3/jinja2==3.1.2/" ${S}/requirements.txt || die
sed -i -e "s/^jsonschema==3.2.0/jsonschema==4.7.2/" ${S}/requirements.txt || die
sed -i -e "s/^markupsafe==2.0.1/markupsafe==2.1.1/" ${S}/requirements.txt || die
sed -i -e "s/^more-itertools==8.12.0/more-itertools==8.13.0/" ${S}/requirements.txt || die
sed -i -e "s/^portend==3.0.0/portend==3.1.0/" ${S}/requirements.txt || die
sed -i -e "s/^psutil==5.9.0/psutil==5.9.1/" ${S}/requirements.txt || die
sed -i -e "s/^pygments==2.11.2/pygments==2.12.0/" ${S}/requirements.txt || die
sed -i -e "s/^pyparsing==2.4.7/pyparsing==3.0.9/" ${S}/requirements.txt || die
sed -i -e "s/^pyrsistent==0.18.0/pyrsistent==0.18.1/" ${S}/requirements.txt || die
sed -i -e "s/^requests==2.27.1/requests==2.28.1/" ${S}/requirements.txt || die
sed -i -e "s/^rich==12.0.1/rich==12.5.0/" ${S}/requirements.txt || die
sed -i -e "s/^rpyc==5.0.1/rpyc==5.1.0/" ${S}/requirements.txt || die
sed -i -e "s/^soupsieve==2.3.1/soupsieve==2.3.2.post1/" ${S}/requirements.txt || die
sed -i -e "s/^sqlalchemy==1.4.32/sqlalchemy==1.4.39/" ${S}/requirements.txt || die
sed -i -e "s/^tempora==4.1.2/tempora==5.0.2/" ${S}/requirements.txt || die
sed -i -e "s/^tzlocal==4.1/tzlocal==4.2/" ${S}/requirements.txt || die
sed -i -e "s/^urllib3==1.26.9/urllib3==1.26.10/" ${S}/requirements.txt || die
sed -i -e "s/^werkzeug==2.0.3/werkzeug==2.1.2/" ${S}/requirements.txt || die
sed -i -e "s/^zc-lockfile==2.0/zc.lockfile==2.0/" ${S}/requirements.txt || die
sed -i -e "s/^zxcvbn-python==4.4.24/zxcvbn==4.4.28/" ${S}/requirements.txt || die
}
src_install() {
distutils-r1_src_install
keepdir /var/log/${PN}
fowners ${PN}:${PN} /var/log/${PN}
fperms 755 /var/log/${PN}
if use systemd; then
systemd_dounit "${FILESDIR}"/flexget.service
fi
}