1fe93622d5c91f8ce780c6a079dcd157f10fe3ad
[gentoo.git] / app-crypt / yubikey-manager / yubikey-manager-2.1.1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python{2_7,3_{5,6}} )
7 inherit readme.gentoo-r1 distutils-r1
8
9 DESCRIPTION="Python library and command line tool for configuring a YubiKey"
10 HOMEPAGE="https://developers.yubico.com/yubikey-manager/"
11 # Per https://github.com/Yubico/yubikey-manager/issues/217, Yubico is
12 # the official source for tarballs, not Github
13 SRC_URI="https://developers.yubico.com/${PN}/Releases/${P}.tar.gz"
14
15 LICENSE="BSD-2"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="test"
19
20 RDEPEND="
21         dev-python/click[${PYTHON_USEDEP}]
22         dev-python/cryptography[${PYTHON_USEDEP}]
23         $(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' python2_7)
24         dev-python/fido2[${PYTHON_USEDEP}]
25         dev-python/pyopenssl[${PYTHON_USEDEP}]
26         dev-python/pyscard[${PYTHON_USEDEP}]
27         dev-python/pyusb[${PYTHON_USEDEP}]
28         dev-python/six[${PYTHON_USEDEP}]
29         >=sys-auth/ykpers-1.19.0
30 "
31 DEPEND="
32         dev-python/setuptools[${PYTHON_USEDEP}]
33         test? (
34                 ${RDEPEND}
35                 $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' 'python2_7')
36         )
37 "
38
39 python_test() {
40         esetup.py test
41 }
42
43 python_install_all() {
44         local DOC_CONTENTS
45
46         distutils-r1_python_install_all
47
48         DOC_CONTENTS="
49                 The 'openpgp' command may require the package 'app-crypt/ccid'
50                 to be installed on the system. Furthermore, make sure that pcscd
51                 daemon is running and has correct access permissions to USB
52                 devices.
53         "
54         readme.gentoo_create_doc
55
56         doman "${S}"/man/ykman.1
57 }
58
59 pkg_postinst() {
60         readme.gentoo_print_elog
61 }