app-crypt/monkeysphere: cleanup ebuild
[portage-overlay.git] / app-crypt / monkeysphere / monkeysphere-0.36.ebuild
1 # Copyright 1999-2013 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"
13 IUSE=""
14 SRC_URI="http://archive.monkeysphere.info/debian/pool/monkeysphere/m/monkeysphere/monkeysphere_${PV}.orig.tar.gz"
15 DEPEND=""
16 KEYWORDS="~x86 ~amd64"
17 DOCS=(README Changelog)
18 RDEPEND="
19         app-crypt/gnupg
20         || ( net-analyzer/netcat net-misc/socat )
21         dev-perl/Crypt-OpenSSL-RSA
22         dev-perl/Digest-SHA1
23         app-misc/lockfile-progs"
24
25 src_prepare()
26 {
27         epatch "${FILESDIR}/${P}_default_shell.patch"
28         epatch "${FILESDIR}/${P}_non_default_port.patch"
29         epatch "${FILESDIR}/${P}_userid_empty_line.patch"
30         sed -i "s#share/doc/monkeysphere#share/doc/${PF}#" Makefile || die
31 }
32
33 pkg_postinst(){
34         ebegin "Creating named group and user"
35         enewgroup monkeysphere
36         enewuser monkeysphere -1 -1 /var/lib/monkeysphere monkeysphere
37         mkdir -p /var/lib/monkeysphere || die
38         chown root:monkeysphere /var/lib/monkeysphere || die
39         chmod 750 /var/lib/monkeysphere || die
40         eend ${?}
41
42         monkeysphere-authentication setup || die
43 }