Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pam_googleauthenticator: new live ebuild
- Loading branch information
Showing
4 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
AUX pam_googleauthenticator-makefile.patch 535 RMD160 529323cff1e80a5a12793f76b56da4d72aff3a45 SHA1 4afb80331856120e6879b50fc4c5243c9154afbf SHA256 44349d94eb65feddf472381bc40541ce425cd93fd688a96a94c74d0a2836f344 | ||
EBUILD pam_googleauthenticator-9999.ebuild 1189 RMD160 a853e379be6b646ab618a70ca54f24987f25f68b SHA1 1472b4ac4e7053249f50210706e85c2ea802c0d1 SHA256 a4626360f3571e3d0f524d9e1e91de9b10012d257f0a8c91b9e42b189f4691db | ||
MISC metadata.xml 330 RMD160 14ce4890b11e827250d146638e723dbddfb50523 SHA1 41de878e34349b1ed0cd53d6c12234b2e5b7bb3c SHA256 5192315813b69a29ab1a5a25a219ffa4ede38837c854fee1823cdb1e76572f45 |
13 changes: 13 additions & 0 deletions
13
sys-auth/pam_googleauthenticator/files/pam_googleauthenticator-makefile.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- libpam/Makefile | ||
+++ libpam/Makefile | ||
@@ -56,8 +56,8 @@ | ||
pam_google_authenticator_unittest | ||
|
||
google-authenticator: google-authenticator.o base32.o hmac.o sha1.o | ||
- $(CC) -g $(DEF_LDFLAGS) $(shell [ -f /usr/lib/libdl.so ] && \ | ||
- echo " -ldl") -o $@ $+ | ||
+ $(CC) -o $@ $+ -g $(DEF_LDFLAGS) $(shell [ -f /usr/lib/libdl.so ] && \ | ||
+ echo " -ldl") | ||
|
||
demo: demo.o pam_google_authenticator_demo.o base32.o hmac.o sha1.o | ||
$(CC) -g $(DEF_LDFLAGS) -rdynamic \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer> | ||
<email>wired@gentoo.org</email> | ||
<name>Alex Alexander</name> | ||
</maintainer> | ||
<use> | ||
<flag name='qr'>Use libqrencode to generate a QR for Google Authenticator</flag> | ||
</use> | ||
</pkgmetadata> |
54 changes: 54 additions & 0 deletions
54
sys-auth/pam_googleauthenticator/pam_googleauthenticator-9999.ebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Copyright 1999-2011 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Header: /var/cvsroot/gentoo-x86/sys-auth/pam_mysql/pam_mysql-0.7_rc1-r3.ebuild,v 1.1 2011/09/13 07:29:13 hanno Exp $ | ||
|
||
EAPI=4 | ||
|
||
inherit mercurial pam | ||
|
||
DESCRIPTION="2-step authentication for pam using google-authenticator" | ||
HOMEPAGE="http://code.google.com/p/google-authenticator" | ||
|
||
SRC_URI="" | ||
EHG_REPO_URI="https://code.google.com/p/google-authenticator/" | ||
|
||
DEPEND=" | ||
sys-libs/pam | ||
" | ||
RDEPEND="${DEPEND} | ||
qr? ( media-gfx/qrencode ) | ||
" | ||
|
||
LICENSE="Apache-2.0" | ||
|
||
SLOT="0" | ||
KEYWORDS="" | ||
|
||
IUSE="+qr" | ||
|
||
pkg_postinst() { | ||
elog "To enable the pam module, add the following line to your" | ||
elog "PAM configuration file, i.e. /etc/pam.d/login:" | ||
ewarn " auth required pam_google_authenticator.so" | ||
elog "For more info, consult the README file." | ||
} | ||
|
||
src_prepare() { | ||
epatch "${FILESDIR}/pam_googleauthenticator-makefile.patch" | ||
} | ||
|
||
src_compile() { | ||
cd libpam | ||
emake pam_google_authenticator.so | ||
use tools && emake google-authenticator | ||
} | ||
|
||
src_install() { | ||
cd libpam | ||
insinto $(getpam_mod_dir) | ||
doins pam_google_authenticator.so | ||
if use tools; then | ||
dobin google-authenticator | ||
fi | ||
dodoc FILEFORMAT README | ||
} |