summaryrefslogtreecommitdiff
blob: 7cd2cadeebb7320ab201fbd7f5674742608dc7b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="3"
inherit eutils mercurial pam toolchain-funcs

DESCRIPTION="Example PAM module demonstrating two-factor authentication"
HOMEPAGE="http://code.google.com/p/google-authenticator/"
SRC_URI=""
EHG_REPO_URI="https://google-authenticator.googlecode.com/hg/libpam/"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RESTRICT="test"

DEPEND="sys-libs/pam"
RDEPEND="${DEPEND}
	media-gfx/qrencode"

S="${WORKDIR}/libpam"

src_unpack() {
	mercurial_fetch "${EHG_REPO_URI}" "$(basename "${EHG_REPO_URI}")" "${WORKDIR}"
}

src_prepare() {
	epatch "${FILESDIR}/${P}-as-needed.patch"
}

src_compile() {
	emake CC="$(tc-getCC)" || die
}

src_install() {
	dopammod pam_google_authenticator.so || die

	dobin google-authenticator || die

	dodoc README || die
}