2020-09-08 16:56:41 +02:00
|
|
|
# Copyright 1999-2018 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Id$
|
|
|
|
|
2022-08-12 18:34:13 +02:00
|
|
|
EAPI=8
|
2020-09-08 16:56:41 +02:00
|
|
|
|
2022-08-12 18:34:13 +02:00
|
|
|
DISTUTILS_USE_PEP517=setuptools
|
|
|
|
PYTHON_COMPAT=( python3_{8..11} )
|
2020-09-08 16:56:41 +02:00
|
|
|
|
2022-08-12 18:34:13 +02:00
|
|
|
inherit distutils-r1
|
2020-09-08 16:56:41 +02:00
|
|
|
|
2022-08-12 18:34:13 +02:00
|
|
|
VRADIUS="3.4.2"
|
2021-04-06 19:10:43 +02:00
|
|
|
VWEBAUTHN="0.1.0"
|
2020-09-08 16:56:41 +02:00
|
|
|
|
|
|
|
DESCRIPTION="privacyIDEA is a modular authentication system"
|
|
|
|
HOMEPAGE="https://www.privacyidea.org/"
|
|
|
|
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
2021-04-06 19:10:43 +02:00
|
|
|
https://github.com/${PN}/webauthn-client/archive/v${VWEBAUTHN}.tar.gz
|
2020-09-08 16:56:41 +02:00
|
|
|
https://github.com/${PN}/FreeRADIUS/archive/v${VRADIUS}.tar.gz -> ${PN}-FreeRADIUS-${VRADIUS}.tar.gz"
|
|
|
|
|
|
|
|
LICENSE="GPL-3"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="amd64 x86"
|
|
|
|
IUSE="+mysql postgres sqlite -translation"
|
|
|
|
|
|
|
|
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
|
|
|
translation? ( net-libs/nodejs[npm]
|
|
|
|
app-i18n/poedit )"
|
|
|
|
RDEPEND="
|
2022-08-12 18:34:13 +02:00
|
|
|
acct-group/privacyidea
|
|
|
|
acct-user/privacyidea
|
2020-09-08 16:56:41 +02:00
|
|
|
mysql? ( dev-python/mysqlclient[${PYTHON_USEDEP}] )
|
|
|
|
postgres? ( dev-python/psycopg[${PYTHON_USEDEP}] )
|
|
|
|
sqlite? ( dev-python/sqlalchemy[${PYTHON_USEDEP}] )
|
|
|
|
dev-perl/Config-IniFiles
|
|
|
|
dev-perl/Crypt-SSLeay
|
|
|
|
dev-perl/Data-Dump
|
|
|
|
dev-perl/JSON
|
|
|
|
dev-perl/Net-SSLeay
|
2022-08-12 18:34:13 +02:00
|
|
|
virtual/perl-Time-HiRes
|
2020-09-08 16:56:41 +02:00
|
|
|
dev-perl/Try-Tiny
|
2022-08-12 18:34:13 +02:00
|
|
|
dev-perl/URI-Encode
|
2020-09-08 16:56:41 +02:00
|
|
|
dev-perl/libwww-perl
|
2022-08-12 18:34:13 +02:00
|
|
|
dev-python/argon2-cffi[${PYTHON_USEDEP}]
|
2020-09-08 16:56:41 +02:00
|
|
|
dev-python/bcrypt[${PYTHON_USEDEP}]
|
2022-08-12 18:34:13 +02:00
|
|
|
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
2021-04-06 19:10:43 +02:00
|
|
|
dev-python/cbor2[${PYTHON_USEDEP}]
|
2020-09-08 16:56:41 +02:00
|
|
|
dev-python/configobj[${PYTHON_USEDEP}]
|
|
|
|
dev-python/croniter[${PYTHON_USEDEP}]
|
|
|
|
dev-python/defusedxml[${PYTHON_USEDEP}]
|
2020-09-14 12:03:08 +02:00
|
|
|
dev-python/docutils[${PYTHON_USEDEP}]
|
2022-08-12 18:34:13 +02:00
|
|
|
<dev-python/flask-2[${PYTHON_USEDEP}]
|
2020-09-08 16:56:41 +02:00
|
|
|
dev-python/flask-babel[${PYTHON_USEDEP}]
|
2022-08-12 18:34:13 +02:00
|
|
|
<dev-python/flask-migrate-3[${PYTHON_USEDEP}]
|
2020-09-08 16:56:41 +02:00
|
|
|
dev-python/flask-script[${PYTHON_USEDEP}]
|
2020-09-14 12:03:08 +02:00
|
|
|
dev-python/flask-versioned[${PYTHON_USEDEP}]
|
2020-09-08 16:56:41 +02:00
|
|
|
dev-python/funcparserlib[${PYTHON_USEDEP}]
|
2022-08-12 18:34:13 +02:00
|
|
|
dev-python/google-auth[${PYTHON_USEDEP}]
|
|
|
|
dev-python/grpcio[${PYTHON_USEDEP}]
|
|
|
|
dev-python/grpcio-tools[${PYTHON_USEDEP}]
|
2020-09-08 16:56:41 +02:00
|
|
|
dev-python/huey[${PYTHON_USEDEP}]
|
2022-08-12 18:34:13 +02:00
|
|
|
dev-python/importlib_metadata[${PYTHON_USEDEP}]
|
2020-09-08 16:56:41 +02:00
|
|
|
dev-python/itsdangerous[${PYTHON_USEDEP}]
|
|
|
|
dev-python/ldap3[${PYTHON_USEDEP}]
|
|
|
|
dev-python/netaddr[${PYTHON_USEDEP}]
|
2022-08-12 18:34:13 +02:00
|
|
|
dev-python/natsort[${PYTHON_USEDEP}]
|
2020-09-08 16:56:41 +02:00
|
|
|
dev-python/passlib[${PYTHON_USEDEP}]
|
2022-08-12 18:34:13 +02:00
|
|
|
dev-python/pydash[${PYTHON_USEDEP}]
|
2020-09-08 16:56:41 +02:00
|
|
|
dev-python/pyjwt[${PYTHON_USEDEP}]
|
|
|
|
dev-python/pyrad[${PYTHON_USEDEP}]
|
|
|
|
dev-python/python-gnupg[${PYTHON_USEDEP}]
|
|
|
|
dev-python/pyusb[${PYTHON_USEDEP}]
|
|
|
|
dev-python/pyyaml[${PYTHON_USEDEP}]
|
|
|
|
dev-python/qrcode[${PYTHON_USEDEP}]
|
|
|
|
dev-python/requests[${PYTHON_USEDEP}]
|
|
|
|
dev-python/smpplib[${PYTHON_USEDEP}]
|
2020-09-14 12:03:08 +02:00
|
|
|
dev-python/sphinxcontrib-applehelp[${PYTHON_USEDEP}]
|
|
|
|
dev-python/sphinxcontrib-devhelp[${PYTHON_USEDEP}]
|
|
|
|
dev-python/sphinxcontrib-htmlhelp[${PYTHON_USEDEP}]
|
|
|
|
dev-python/sphinxcontrib-httpdomain[${PYTHON_USEDEP}]
|
|
|
|
dev-python/sphinxcontrib-spelling[${PYTHON_USEDEP}]
|
2020-09-08 16:56:41 +02:00
|
|
|
dev-python/sqlsoup[${PYTHON_USEDEP}]
|
|
|
|
dev-python/urllib3[${PYTHON_USEDEP}]
|
|
|
|
dev-python/werkzeug[${PYTHON_USEDEP}]
|
|
|
|
www-apache/mod_wsgi
|
|
|
|
www-servers/gunicorn
|
|
|
|
"
|
|
|
|
REQUIRED_USE="|| ( mysql postgres sqlite )"
|
|
|
|
|
|
|
|
python_prepare_all() {
|
|
|
|
rm -rf tests
|
|
|
|
|
2021-04-06 19:10:43 +02:00
|
|
|
cp ${WORKDIR}/webauthn-client-${VWEBAUTHN}/pi-webauthn.js ${WORKDIR}/${P}/privacyidea/static/contrib/js/webauthn-client/
|
|
|
|
|
2020-09-08 16:56:41 +02:00
|
|
|
if use translation; then
|
|
|
|
npm install grunt --save-dev
|
|
|
|
npm install grunt-angular-gettext --save-dev
|
|
|
|
make translate
|
|
|
|
fi
|
|
|
|
|
|
|
|
distutils-r1_python_prepare_all
|
|
|
|
}
|
|
|
|
|
|
|
|
python_install_all() {
|
|
|
|
distutils-r1_python_install_all
|
|
|
|
|
|
|
|
mv ${D}/usr/etc ${D}/etc
|
|
|
|
|
|
|
|
insinto /etc/privacyidea
|
2022-08-12 18:34:13 +02:00
|
|
|
doins ${FILESDIR}/logging.yaml
|
2020-09-08 16:56:41 +02:00
|
|
|
doins deploy/pi.cfg
|
2022-08-12 18:34:13 +02:00
|
|
|
echo "PI_LOGCONFIG = '/etc/privacyidea/logging.yaml'" >> /$D/etc/privacyidea/pi.cfg
|
2020-09-08 16:56:41 +02:00
|
|
|
doins deploy/privacyidea/NetKnights.pem
|
|
|
|
doins deploy/privacyidea/enckey
|
|
|
|
doins deploy/privacyidea/private.pem
|
|
|
|
doins deploy/privacyidea/public.pem
|
2020-09-14 12:03:08 +02:00
|
|
|
doins ../FreeRADIUS-${VRADIUS}/rlm_perl.ini
|
|
|
|
doins ../FreeRADIUS-${VRADIUS}/dictionary.netknights
|
|
|
|
|
|
|
|
insinto /etc/privacyidea/freeradius2
|
|
|
|
doins ../FreeRADIUS-${VRADIUS}/config/freeradius2/mods-perl-privacyidea
|
|
|
|
doins ../FreeRADIUS-${VRADIUS}/config/freeradius2/privacyidea
|
|
|
|
insinto /etc/privacyidea/freeradius3
|
|
|
|
doins ../FreeRADIUS-${VRADIUS}/config/freeradius3/mods-perl-privacyidea
|
|
|
|
doins ../FreeRADIUS-${VRADIUS}/config/freeradius3/privacyidea
|
|
|
|
|
|
|
|
insinto /usr/share/privacyidea/freeradius
|
|
|
|
doins ../FreeRADIUS-${VRADIUS}/privacyidea_radius.pm
|
2020-09-08 16:56:41 +02:00
|
|
|
|
|
|
|
fowners -R ${PN}:root /etc/privacyidea
|
|
|
|
fperms 600 /etc/privacyidea/enckey \
|
|
|
|
/etc/privacyidea/private.pem
|
|
|
|
|
|
|
|
diropts -o privacyidea -g root
|
|
|
|
keepdir /var/log/privacyidea
|
2020-09-14 12:03:08 +02:00
|
|
|
|
|
|
|
diropts -o privacyidea -g privacyidea
|
|
|
|
keepdir /var/lib/privacyidea/home
|
2020-09-08 16:56:41 +02:00
|
|
|
}
|