128 lines
3.7 KiB
Bash
128 lines
3.7 KiB
Bash
|
# Copyright 1999-2018 Gentoo Foundation
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
# $Id$
|
||
|
|
||
|
EAPI=6
|
||
|
|
||
|
PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
|
||
|
|
||
|
inherit distutils-r1 user
|
||
|
|
||
|
VRADIUS="3.2"
|
||
|
|
||
|
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
|
||
|
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="
|
||
|
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
|
||
|
dev-perl/Try-Tiny
|
||
|
dev-perl/libwww-perl
|
||
|
dev-python/bcrypt[${PYTHON_USEDEP}]
|
||
|
dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
|
||
|
dev-python/configobj[${PYTHON_USEDEP}]
|
||
|
dev-python/croniter[${PYTHON_USEDEP}]
|
||
|
dev-python/defusedxml[${PYTHON_USEDEP}]
|
||
|
dev-python/ecdsa[${PYTHON_USEDEP}]
|
||
|
dev-python/flask-babel[${PYTHON_USEDEP}]
|
||
|
dev-python/flask-migrate[${PYTHON_USEDEP}]
|
||
|
dev-python/flask-script[${PYTHON_USEDEP}]
|
||
|
dev-python/flask-versioned[${PYTHON_USEDEP}]
|
||
|
dev-python/funcparserlib[${PYTHON_USEDEP}]
|
||
|
dev-python/huey[${PYTHON_USEDEP}]
|
||
|
dev-python/itsdangerous[${PYTHON_USEDEP}]
|
||
|
dev-python/ldap3[${PYTHON_USEDEP}]
|
||
|
dev-python/netaddr[${PYTHON_USEDEP}]
|
||
|
dev-python/oauth2client[${PYTHON_USEDEP}]
|
||
|
dev-python/passlib[${PYTHON_USEDEP}]
|
||
|
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}]
|
||
|
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
|
||
|
|
||
|
if use translation; then
|
||
|
npm install grunt --save-dev
|
||
|
npm install grunt-angular-gettext --save-dev
|
||
|
make translate
|
||
|
fi
|
||
|
|
||
|
distutils-r1_python_prepare_all
|
||
|
}
|
||
|
|
||
|
pkg_setup() {
|
||
|
enewgroup ${PN}
|
||
|
enewuser ${PN} -1 -1 /var/lib/${PN}/home ${PN}
|
||
|
}
|
||
|
|
||
|
python_install_all() {
|
||
|
distutils-r1_python_install_all
|
||
|
|
||
|
mv ${D}/usr/etc ${D}/etc
|
||
|
|
||
|
insinto /etc/privacyidea
|
||
|
doins deploy/pi.cfg
|
||
|
doins deploy/logging.cfg
|
||
|
doins deploy/privacyidea/NetKnights.pem
|
||
|
doins deploy/privacyidea/enckey
|
||
|
doins deploy/privacyidea/private.pem
|
||
|
doins deploy/privacyidea/public.pem
|
||
|
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
|
||
|
|
||
|
## insinto /etc/privacyidea/CA
|
||
|
## doins deploy/debian/openssl.cnf
|
||
|
|
||
|
fowners -R ${PN}:root /etc/privacyidea
|
||
|
fperms 600 /etc/privacyidea/enckey \
|
||
|
/etc/privacyidea/private.pem
|
||
|
|
||
|
## insinto /etc/logrotate.d
|
||
|
## newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
||
|
|
||
|
diropts -o privacyidea -g root
|
||
|
keepdir /var/log/privacyidea
|
||
|
|
||
|
diropts -o privacyidea -g privacyidea
|
||
|
keepdir /var/lib/privacyidea/home
|
||
|
}
|