diff options
author | 2012-06-06 14:47:46 -0400 | |
---|---|---|
committer | 2012-06-06 14:47:46 -0400 | |
commit | ed09a11925db43f27ff9010f6328510aab34fa0b (patch) | |
tree | 4909d0df41073f8f08998ad1e65d430a821505c6 | |
parent | Drop sabnzbd. (diff) | |
download | c1pher-ed09a11925db43f27ff9010f6328510aab34fa0b.tar.gz c1pher-ed09a11925db43f27ff9010f6328510aab34fa0b.tar.bz2 c1pher-ed09a11925db43f27ff9010f6328510aab34fa0b.zip |
google-authenticator PAM module.
3 files changed, 78 insertions, 0 deletions
diff --git a/sys-auth/libpam-google-authenticator/Manifest b/sys-auth/libpam-google-authenticator/Manifest new file mode 100644 index 0000000..d892652 --- /dev/null +++ b/sys-auth/libpam-google-authenticator/Manifest @@ -0,0 +1,3 @@ +AUX makefile.patch 2387 RMD160 0b70faa355d224525a428f465e7b9642f531823b SHA1 736e82dabf41b0deb58bc7725cc990abe1246864 SHA256 71c866cad836492f35bbc2fde24e6fc2430181de31421af8a97305eec3b82842 +DIST libpam-google-authenticator-1.0-source.tar.bz2 32708 RMD160 ce26a2f805f36a82a7ab3d930116a73fb444e037 SHA1 017b7d89989f1624e360abe02d6b27a6298d285d SHA256 80426045d13ce7a2bf56c692ccfb1751cef3c7484752ad40738facf729264d4b +EBUILD libpam-google-authenticator-1.0.ebuild 682 RMD160 e73b10b6b01e92569cafc0904f3b94cee53a2afa SHA1 9e47403d126dc7c48ee6d367c3b4483b34292f6a SHA256 238d96809743c8f3a1e58f5838e95f617af12ff604c6b0b89a2d79bd927bcca0 diff --git a/sys-auth/libpam-google-authenticator/files/makefile.patch b/sys-auth/libpam-google-authenticator/files/makefile.patch new file mode 100644 index 0000000..2792456 --- /dev/null +++ b/sys-auth/libpam-google-authenticator/files/makefile.patch @@ -0,0 +1,41 @@ +--- Makefile 2012-06-06 14:39:56.000000000 -0400 ++++ Makefile.new 2012-06-06 14:40:05.000000000 -0400 +@@ -28,6 +28,7 @@ + DEF_LDFLAGS := $(shell [ `uname` = SunOS ] && echo ' -mimpure-text') $(LDFLAGS) + LDL_LDFLAGS := $(shell $(CC) -shared -ldl -xc -o /dev/null /dev/null \ + >/dev/null 2>&1 && echo ' -ldl') ++DESTDIR := + + all: google-authenticator pam_google_authenticator.so demo \ + pam_google_authenticator_unittest +@@ -43,26 +44,11 @@ + *.c *.h *.html Makefile FILEFORMAT README utc-time + + install: all +- @dst="`find /lib*/security /lib*/*/security -maxdepth 1 \ +- -name pam_unix.so -printf '%H' -quit 2>/dev/null`"; \ +- [ -d "$${dst}" ] || dst=/lib/security; \ +- [ -d "$${dst}" ] || dst=/usr/lib; \ +- sudo=; if [ $$(id -u) -ne 0 ]; then \ +- echo "You need to be root to install this module."; \ +- if [ -x /usr/bin/sudo ]; then \ +- echo "Invoking sudo:"; \ +- sudo=sudo; \ +- else \ +- exit 1; \ +- fi; \ +- fi; \ +- echo cp pam_google_authenticator.so $${dst}; \ +- tar fc - pam_google_authenticator.so | $${sudo} tar ofxC - $${dst}; \ ++ echo install -m 755 pam_google_authenticator.so ${DESTDIR}; \ ++ install -m 755 pam_google_authenticator.so ${DESTDIR}; \ + \ +- echo cp google-authenticator /usr/local/bin; \ +- tar fc - google-authenticator | $${sudo} tar ofxC - /usr/local/bin; \ +- $${sudo} chmod 755 $${dst}/pam_google_authenticator.so \ +- /usr/local/bin/google-authenticator ++ echo install -m 755 google-authenticator ${DESTDIR}; \ ++ install -m 755 google-authenticator ${DESTDIR}; \ + + clean: + $(RM) *.o *.so core google-authenticator demo \ diff --git a/sys-auth/libpam-google-authenticator/libpam-google-authenticator-1.0.ebuild b/sys-auth/libpam-google-authenticator/libpam-google-authenticator-1.0.ebuild new file mode 100644 index 0000000..2c67ddf --- /dev/null +++ b/sys-auth/libpam-google-authenticator/libpam-google-authenticator-1.0.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 +inherit pam + +DESCRIPTION="Google Authentiator PAM plugin" +HOMEPAGE="http://code.google.com/p/google-authenticator/" +SRC_URI="http://google-authenticator.googlecode.com/files/${P}-source.tar.bz2" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="sys-libs/pam" +RDEPEND="${DEPEND}" + +src_prepare(){ + epatch "${FILESDIR}/makefile.patch" +} + +src_install(){ + insinto $(getpam_mod_dir) + doins pam_google_authenticator.so + dobin google-authenticator + + dodoc README +} + +pkg_postinst(){ + elog "For setup information check the installed README" +} |