]> Pileus Git - ~andy/sunrise/blob - sys-auth/pam_mount/pam_mount-0.13.0.ebuild
4e405aa8b277c496894a3f6a7c878f738e104587
[~andy/sunrise] / sys-auth / pam_mount / pam_mount-0.13.0.ebuild
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils pam autotools
6
7 DESCRIPTION="A PAM module that can mount volumes for a user session e.g. encrypted home directories"
8 HOMEPAGE="http://pam-mount.souceforge.net"
9 SRC_URI="mirror://sourceforge/pam-mount/${P}.tbz2"
10 RESTRICT="mirror"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~x86 ~amd64"
15 IUSE="crypt"
16
17 DEPEND=">=sys-libs/pam-0.78-r3
18         >=dev-libs/openssl-0.9.7i
19         >=dev-libs/glib-2"
20 RDEPEND="${DEPEND}
21         crypt? ( sys-fs/cryptsetup-luks )
22         sys-process/lsof"
23
24 src_unpack() {
25         unpack ${A}
26         cd "${S}"
27
28         # Gentoo installs cryptsetup in /bin, this patches the relevant 
29         # locations, in srcipts/(u)mount.crypt and adds gentoo specific
30         # comments to pam_mount.conf
31         epatch "${FILESDIR}/${PN}-gentoo-paths-and-examples.patch"
32 }
33
34 src_compile() {
35         # fixes the sanity check failure
36         _elibtoolize --copy --force
37
38         econf \
39             --libdir=/$(get_libdir) \
40                 --with-pam-dir=$(getpam_mod_dir) || die "econf failed"
41         emake || die "emake failed"
42 }
43
44 src_install() {
45         emake DESTDIR="${D}" install || die "install failed"
46
47         insinto /etc/security
48         insopts -m0644
49         doins "${S}/config/pam_mount.conf"
50         dopamd "${FILESDIR}/system-auth"
51
52         dodir /sbin
53         dosym /usr/bin/mount.crypt /sbin/mount.crypt
54
55         dodoc README TODO AUTHORS ChangeLog FAQ NEWS
56 }
57
58 pkg_postinst() {
59         einfo "In order to use pam_mount you will need to configure it."
60         einfo "After the modifications in /etc/security/pam_mount.conf you "
61         einfo "can create the encrypted directory using the mkehd command."
62         einfo "Please use mkhed -h for more informations."
63         einfo
64         einfo "If you want to encrypt the home directories you will need a "
65         einfo "kernel with device-mapper and crypto (AES or any other chipher)"
66         einfo "support."
67         einfo
68         einfo "This ebuild only modifies the /etc/pam.d/system-auth file to"
69         einfo "support pam_mount. If you have any programs that use pam with "
70         einfo "a configuration file that does NOT include system-auth you will "
71         einfo "need to modify this file too. Look at /etc/pam.d/system-auth or "
72         einfo "the /usr/share/doc/${PF}/README file for more informations."
73 }