125 lines
2.8 KiB
Bash
125 lines
2.8 KiB
Bash
# Copyright 1999-2017 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="f5d2e0f8637c6d233a9a4fd97f1ad666d340b75b"
|
|
VADMIN="d1de48361b5e145957a3b95db3de63d234e8b832"
|
|
|
|
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}.zip -> ${PN}-FreeRADIUS-${PV}.zip"
|
|
|
|
LICENSE="GPL-3"
|
|
SLOT="0"
|
|
KEYWORDS="amd64 x86"
|
|
IUSE="+mysql postgres sqlite -translation"
|
|
|
|
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
|
translation? ( dev-nodejs/grunt-cli )"
|
|
RDEPEND="
|
|
mysql? ( dev-python/mysql-python
|
|
>=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/ecdsa
|
|
dev-python/flask
|
|
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
|
|
|
|
make translate
|
|
|
|
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
|
|
}
|