1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 DESCRIPTION="Leverage the OpenPGP web of trust for OpenSSH and Web authentication"
8 HOMEPAGE="http://web.monkeysphere.info/"
13 SRC_URI="mirror://debian/pool/monkeysphere/m/monkeysphere/monkeysphere_${PV}.orig.tar.gz"
14 KEYWORDS="~amd64 ~arm ~x86"
16 DOCS=( README Changelog )
18 # Tests fail upstream for SSH connection. Issue has been reported.
21 DEPEND="app-crypt/gnupg
23 dev-perl/Crypt-OpenSSL-RSA
25 app-misc/lockfile-progs"
31 einfo "Creating named group and user"
32 enewgroup monkeysphere
33 enewuser monkeysphere -1 -1 /var/lib/monkeysphere monkeysphere
34 # Using fperms and fowner in src_install leave unusable config with error
35 # Authentication refused: bad ownership or modes for directory /var/lib/monkeysphere
36 chown root:monkeysphere /var/lib/monkeysphere
37 chmod 751 /var/lib/monkeysphere
42 epatch "${FILESDIR}/${P}_default_shell.patch"\
43 "${FILESDIR}/${P}_non_default_port.patch"\
44 "${FILESDIR}/${P}_userid_empty_line.patch"\
45 "${FILESDIR}/${P}_openpgp2ssh_sanity_check.patch"\
46 "${FILESDIR}/${P}_hd_od.patch"
48 sed -i "s#share/doc/monkeysphere#share/doc/${PF}#" Makefile || die
50 # Output format of gpg --check-sigs differ between 1.4 and 2.0 so test
51 # needs to be updated if 2.0 is used
52 if has_version '>=app-crypt/gnupg-2.0.0:0'; then
53 epatch "${FILESDIR}/${P}_tests_gnupg2.patch"
60 dodir /var/lib/monkeysphere
65 #This function is idempotent, make sure it is run at least once.
66 monkeysphere-authentication setup || die