unitas/www-apps/privacyidea/privacyidea-2.23.5.ebuild

133 lines
3.0 KiB
Bash
Raw Normal View History

2019-03-06 08:32:49 +01:00
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1 user
VRADIUS="81513be16e6db775effac9ed39ab10dc381be66d"
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/${VRADIUS}.tar.gz -> ${PN}-FreeRADIUS-${PV}.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/mysql-python
dev-python/pymysql
>=virtual/mysql-5.0 )
postgres? ( dev-python/psycopg )
sqlite? ( dev-python/sqlalchemy[sqlite] )
dev-perl/Config-IniFiles
dev-perl/Data-Dump
dev-perl/JSON
dev-perl/Try-Tiny
dev-perl/libwww-perl
dev-python/alembic
dev-python/bcrypt
dev-python/beautifulsoup:4
dev-python/configobj
dev-python/cookies
dev-python/cov-core
dev-python/coverage
dev-python/croniter
dev-python/defusedxml
dev-python/ecdsa
dev-python/flask
dev-python/flask-babel
dev-python/flask-migrate
dev-python/flask-script
dev-python/flask-sqlalchemy
dev-python/funcparserlib
dev-python/imagesize
dev-python/itsdangerous
dev-python/ldap3
dev-python/lxml
dev-python/mako
dev-python/matplotlib
dev-python/mock
dev-python/netaddr
dev-python/nose
dev-python/numpy
dev-python/pandas
dev-python/passlib
dev-python/pillow
dev-python/pycrypto
dev-python/pyjwt
dev-python/pyparsing
dev-python/pytest
dev-python/pytest-cov
dev-python/pytest-runner
dev-python/python-dateutil
dev-python/python-gnupg
dev-python/pyusb
dev-python/pyyaml
dev-python/qrcode
dev-python/requests
dev-python/responses
dev-python/sphinx
dev-python/sphinxcontrib-httpdomain
dev-python/sqlalchemy
dev-python/werkzeug
dev-python/pyrad
dev-python/redis-py
dev-python/sqlsoup
www-apache/mod_wsgi
www-servers/gunicorn
"
REQUIRED_USE="|| ( mysql postgres sqlite )"
python_prepare_all() {
rm -rf tests
rmdir authmodules/FreeRADIUS
ln -s ../../FreeRADIUS-${VRADIUS} authmodules/FreeRADIUS
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/debian/pi.cfg
doins deploy/privacyidea/NetKnights.pem
doins authmodules/FreeRADIUS/rlm_perl.ini
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
}