# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 inherit eutils pam DESCRIPTION="A PAM module that can mount volumes for a user session e.g. encrypted home directories" HOMEPAGE="pam-mount.souceforge.net" #go get the source from sourceforge! SRC_URI="${P}.tbz2" RESTRICT="fetch" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~ppc ~sparc ~alpha ~amd64" IUSE="crypt" DEPEND=">=sys-libs/pam-0.72 >=openssl-0.9.7c-r2 >=glib-2.0.0" RDEPEND="$DEPEND crypt? ( >=sys-fs/cryptsetup-0.1 )" pkg_nofetch() { local SF_URL="http://prdownloads.sourceforge.net/pam-mount/pam_mount-0.11.0.tbz2?download"; einfo "Please download $SRC_URI from:" einfo ${SF_URL} einfo "and place it in ${DISTDIR}." } src_unpack() { unpack ${A} cd ${S} # Gentoo installs cryptsetup in /bin, this patches the relevant # locations, in srcipts/(u)mount.crypt and adds gentoo specific # comments to pam_mount.conf epatch ${FILESDIR}/pam_mount-0.11.0.patch } src_compile() { econf \ --libdir=/lib \ "--with-pam-dir=$(getpam_mod_dir)" || die "econf failed" emake || die "make failed" } src_install() { einstall || die "make install failed" insinto /etc/security insopts -m0644 doins ${S}/config/pam_mount.conf #insinto /etc/pam.d #doins ${FILESDIR}/login ${FILESDIR}/kde dodir /sbin dosym /usr/bin/mount.crypt /sbin/mount.crypt dodoc README TODO AUTHORS ChangeLog FAQ INSTALL NEWS ${FILESDIR}/login ${FILESDIR}/kde }