e9430452ff4acbd29c5add90ed1a78e4ce526f2d
[portage-overlay.git] / app-crypt / monkeysphere / monkeysphere-0.37.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6 inherit eutils user
7
8 DESCRIPTION="Leverage the OpenPGP web of trust for OpenSSH and Web authentication"
9 HOMEPAGE="http://web.monkeysphere.info/"
10
11 LICENSE="GPL-3"
12 SLOT="0/0"
13 IUSE=""
14 SRC_URI="mirror://debian/pool/monkeysphere/m/monkeysphere/monkeysphere_${PV}.orig.tar.gz http://archive.monkeysphere.info/debian/pool/monkeysphere/m/monkeysphere/monkeysphere_${PV}.orig.tar.gz"
15 KEYWORDS="~amd64 ~x86"
16
17 DOCS=( README Changelog )
18
19 # Tests fail upstream for SSH connection. Issue has been reported.
20 RESTRICT="test"
21
22 DEPEND="app-crypt/gnupg:0=
23         net-misc/socat:0=
24         dev-perl/Crypt-OpenSSL-RSA:0=
25         dev-perl/Digest-SHA1:0=
26         app-misc/lockfile-progs:0="
27
28 RDEPEND="${DEPEND}"
29
30 pkg_setup()
31 {
32         einfo "Creating named group and user"
33         enewgroup monkeysphere
34         enewuser monkeysphere -1 -1 /var/lib/monkeysphere monkeysphere
35         # Using fperms and fowner in src_install leave unusable config with error
36         # Authentication refused: bad ownership or modes for directory /var/lib/monkeysphere
37         chown root:monkeysphere /var/lib/monkeysphere
38         chmod 751 /var/lib/monkeysphere
39 }
40
41 src_prepare()
42 {
43         epatch "${FILESDIR}/${P}_default_shell.patch"\
44                "${FILESDIR}/${P}_hd_od.patch"
45
46         sed -i "s#share/doc/monkeysphere#share/doc/${PF}#" Makefile || die
47 }
48
49 src_install()
50 {
51         default
52         dodir /var/lib/monkeysphere
53 }
54
55 pkg_postinst()
56 {
57         monkeysphere-authentication setup || die
58 }