]> Pileus Git - ~andy/sunrise/blob - sys-auth/pam_sotp/pam_sotp-0.3.3.ebuild
cd45c01e25dca2b0c9a8ecff55517b8180393705
[~andy/sunrise] / sys-auth / pam_sotp / pam_sotp-0.3.3.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils pam
6
7 DESCRIPTION="pam module for simple one time password authentication"
8 HOMEPAGE="http://www.cavecanen.org/cs/projects/pam_sotp/"
9 SRC_URI="http://www.cavecanen.org/cs/projects/pam_sotp/dl/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="debug urandom"
15
16 DEPEND=">=sys-libs/pam-0.78-r3"
17 RDEPEND="${DEPEND}"
18
19 pkg_setup() {
20         enewgroup shadow
21 }
22
23 src_compile() {
24         myconf=""
25         use urandom && myconf="--with-randomdev=/dev/urandom"
26         econf --libdir="/$(get_libdir)" $(use_enable debug) ${myconf} || die "econf failed"
27         emake || die "emake failed"
28 }
29
30 src_install() {
31         dopamd etc/pam.d/otppasswd
32         dopammod src/pam/${PN}.so
33         diropts -m0770 -o root -g shadow
34         keepdir /etc/sotp
35         
36         dobin src/utils/otppasswd
37         fowners root:shadow /usr/bin/otppasswd
38         fperms 2755 /usr/bin/otppasswd
39
40         dodoc AUTHORS ChangeLog NEWS README
41         dohtml doc/manual/html/*
42 }