# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=3 inherit qt4-r2 versionator MY_PV=$(replace_version_separator 2 -) DESCRIPTION="Use Fingerprint Devices with Linux" HOMEPAGE="http://www.n-view.net/Appliance/fingerprint/" SRC_URI="http://www.n-view.net/Appliance/fingerprint/download/${PN}-${MY_PV}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" IUSE="upekbsapi" DEPEND=">=sys-auth/libfprint-0.1.0_pre2 x11-libs/libfakekey >=app-crypt/qca-2.0.0 >=app-crypt/qca-ossl-2.0.0_beta3 sys-auth/polkit-qt !sys-auth/pam_fprint !sys-auth/fprintd !sys-auth/thinkfinger || ( ( x11-libs/qt-core:4 x11-libs/qt-gui ) x11-libs/qt:4 ) " RDEPEND="${DEPEND} sys-auth/upekbsapi-bin[headers]" S=${WORKDIR}/${PN}-${MY_PV} src_prepare() { epatch "${FILESDIR}"/"${P}"-suid-pathfix.patch } src_configure() { if has_version '>=sys-auth/polkit-qt-0.99.0'; then eqmake4 LIBPOLKIT_QT=LIBPOLKIT_QT_1_1 || die "qmake4 failed" else eqmake4 || die "qmake4 failed" fi } src_install() { emake INSTALL_ROOT="${D}" DESTDIR="${D}" install || die "emake install failed" domenu bin/fingerprint-gui/fingerprint-gui.desktop dodoc CHANGELOG README IMPORTANT-UPGRADE-INFORMATION.txt\ doc/*.html } pkg_postinst() { elog "1) Please see /usr/share/doc/${P}/Install-step-by-step.html to configure your device." elog " A fast (not recommended) way to use fingerprint-gui with your pam based application" elog " you can add the following line to the first off /etc/pam.d/system-auth" elog " auth sufficient pam_fingerprint-gui.so" elog " For more security we recommend that you don't enable fingerprint-gui authentication for all pam services." elog " See Install-step-by-step.html again." elog "2) You must be in the plugdev group to use fingerprint" if use upekbsapi; then elog "3) You select to install upeks bsapi library, it's not open-sourced. Use it on your own risk." fi }