]> Pileus Git - ~andy/sunrise/blob - sys-auth/pam_sotp/pam_sotp-0.3.3.ebuild
sci-visualization/tulip: Fix qt deps
[~andy/sunrise] / sys-auth / pam_sotp / pam_sotp-0.3.3.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit user multilib 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         local myconf=""
25
26         use urandom && myconf="--with-randomdev=/dev/urandom"
27         econf --libdir="/$(get_libdir)" $(use_enable debug) ${myconf}
28         emake || die "emake failed"
29 }
30
31 src_install() {
32         dopamd etc/pam.d/otppasswd
33         dopammod src/pam/${PN}.so
34         diropts -m0770 -o root -g shadow
35         keepdir /etc/sotp
36
37         dobin src/utils/otppasswd
38         fowners root:shadow /usr/bin/otppasswd
39         fperms 2755 /usr/bin/otppasswd
40
41         dodoc AUTHORS ChangeLog NEWS README
42         dohtml doc/manual/html/*
43 }
44
45 pkg_postinst() {
46         elog "See manual.html in /usr/share/doc/${PF}/html and otppasswd -h"
47         elog "for configuration hints."
48 }