# Copyright 1999-2005 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.3.2.ebuild,v 1.3 2005/09/16 11:16:21 agriffis Exp $ inherit eutils pam DESCRIPTION="PAM X509 password-less authentication module" SRC_URI="http://dside.dyndns.org/files/darklin/darksoft/${P}.tar.bz2" HOMEPAGE="http://pam-x509.sourceforge.net/" IUSE="bluetooth" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 x86" DEPEND="dev-libs/openssl sys-libs/pam bluetooth? ( net-wireless/bluez-libs net-wireless/bluez-utils dev-libs/openobex app-mobilephone/obexftp sys-apps/hotplug-base ) dev-lang/perl" src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/pam_x509-ds-compile2.patch || die epatch ${FILESDIR}/pam_x509-ds_syslog.patch || die if use bluetooth; then perl -pi -e "s|BT=\w+|BT=yes|g" Makefile else perl -pi -e "s|BT=\w+|BT=no|g" Makefile fi } src_compile() { emake || die "make failed" } src_install() { cd ${S} dodir /etc/hotplug.d /etc/pam.d /etc/pam_usb dodir /lib/security /etc/pam.d /var/spool/x509 /mnt/auth || die install -c -m 755 pam_x509.so ${D}/lib/security || die install -m 644 ${FILESDIR}/x509-auth ${D}/etc/pam.d || die install -m 644 ${FILESDIR}/x509.config ${D}/etc || die ln -s securetty ${D}/etc/x509.securetty || die }