Skip to content

Instantly share code, notes, and snippets.

@hasufell
Created July 7, 2012 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hasufell/3067467 to your computer and use it in GitHub Desktop.
Save hasufell/3067467 to your computer and use it in GitHub Desktop.
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
inherit eutils toolchain-funcs
DESCRIPTION="PAM Module for two step verification via mobile platform"
HOMEPAGE="http://code.google.com/p/google-authenticator/"
SRC_URI="http://${PN}.googlecode.com/files/libpam-${P}-source.tar.bz2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="qrcode"
RDEPEND="${DEPEND}
qrcode? ( media-libs/qrencode )"
DEPEND="virtual/pam"
S=${WORKDIR}/libpam-${P}
src_prepare(){
epatch "${FILESDIR}"/${PN}-Makefile.patch
use !qrcode && epatch "${FILESDIR}"/${PN}-dropqrencode.patch
tc-export CC
}
src_install(){
dodoc README
dolib.so pam_google_authenticator.so
dobin google-authenticator
}
pkg_postinst(){
elog "Add this line to your PAM configuration file in /etc/pam.d:"
elog "auth required pam_google_authenticator.so"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment