summaryrefslogtreecommitdiff
blob: 93147d723fbb623e53a7a7e3e8a83d28ead0d740 (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
45
46
47
48
49
50
51
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-auth/pam_usb/pam_usb-0.4.2.ebuild,v 1.4 2008/08/27 18:53:48 armin76 Exp $

inherit eutils pam

DESCRIPTION="pam_usb provides hardware authentication for Linux using ordinary USB Flash Drives."
SRC_URI="mirror://sourceforge/pamusb/${P}.tar.gz"
HOMEPAGE="http://www.pamusb.org/"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"

RDEPEND="
	dev-libs/libxml2
	virtual/pam
	>=sys-apps/dbus-0.62-r2
	>=sys-apps/hal-0.5.7.1-r3
	>=sys-apps/pmount-0.9.13
	>=dev-python/celementtree-1.0.2
	>=dev-python/dbus-python-0.71
	>=dev-python/pygobject-2.12.3"

DEPEND="
	${RDEPEND}
	dev-util/pkgconfig"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}/${P}-openpam.patch"
}

src_install() {
	dodir $(getpam_mod_dir) /usr/bin

	einstall DESTDIR="${D}" PAM_MODULES="${D}/$(getpam_mod_dir)" \
		DOCS_DEST="${D}usr/share/doc/${PF}/" || die "einstall failed"
	dodoc ChangeLog || die
}

pkg_postinst() {
	elog "There are major between 0.3* and 0.4*. Here are the steps from"
	elog "/usr/share/doc/${PF}/UPGRADING that apply on Gentoo:"
	elog "1. Remove .auth directories from home directories"
	elog "2. rm -rf /etc/pam_usb (now as /etc/pamusb.conf)"
	elog "3. now you can use pamusb.conf to disable pamusb for individual"
	elog "   services so check how you want to implement your pam config."
	elog "   (/usr/share/doc/${PF}/CONFIGURATION)"
}