Gentoo Archives: gentoo-commits

From: Dane Smith <c1pher@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/c1pher:master commit in: sys-auth/libpam-google-authenticator/, ...
Date: Wed, 06 Jun 2012 18:48:30
Message-Id: 1339008466.ed09a11925db43f27ff9010f6328510aab34fa0b.c1pher@gentoo
1 commit: ed09a11925db43f27ff9010f6328510aab34fa0b
2 Author: Dane Smith <c1pher <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 6 18:47:46 2012 +0000
4 Commit: Dane Smith <c1pher <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 6 18:47:46 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/c1pher.git;a=commit;h=ed09a119
7
8 google-authenticator PAM module.
9
10 ---
11 sys-auth/libpam-google-authenticator/Manifest | 3 +
12 .../files/makefile.patch | 41 ++++++++++++++++++++
13 .../libpam-google-authenticator-1.0.ebuild | 34 ++++++++++++++++
14 3 files changed, 78 insertions(+), 0 deletions(-)
15
16 diff --git a/sys-auth/libpam-google-authenticator/Manifest b/sys-auth/libpam-google-authenticator/Manifest
17 new file mode 100644
18 index 0000000..d892652
19 --- /dev/null
20 +++ b/sys-auth/libpam-google-authenticator/Manifest
21 @@ -0,0 +1,3 @@
22 +AUX makefile.patch 2387 RMD160 0b70faa355d224525a428f465e7b9642f531823b SHA1 736e82dabf41b0deb58bc7725cc990abe1246864 SHA256 71c866cad836492f35bbc2fde24e6fc2430181de31421af8a97305eec3b82842
23 +DIST libpam-google-authenticator-1.0-source.tar.bz2 32708 RMD160 ce26a2f805f36a82a7ab3d930116a73fb444e037 SHA1 017b7d89989f1624e360abe02d6b27a6298d285d SHA256 80426045d13ce7a2bf56c692ccfb1751cef3c7484752ad40738facf729264d4b
24 +EBUILD libpam-google-authenticator-1.0.ebuild 682 RMD160 e73b10b6b01e92569cafc0904f3b94cee53a2afa SHA1 9e47403d126dc7c48ee6d367c3b4483b34292f6a SHA256 238d96809743c8f3a1e58f5838e95f617af12ff604c6b0b89a2d79bd927bcca0
25
26 diff --git a/sys-auth/libpam-google-authenticator/files/makefile.patch b/sys-auth/libpam-google-authenticator/files/makefile.patch
27 new file mode 100644
28 index 0000000..2792456
29 --- /dev/null
30 +++ b/sys-auth/libpam-google-authenticator/files/makefile.patch
31 @@ -0,0 +1,41 @@
32 +--- Makefile 2012-06-06 14:39:56.000000000 -0400
33 ++++ Makefile.new 2012-06-06 14:40:05.000000000 -0400
34 +@@ -28,6 +28,7 @@
35 + DEF_LDFLAGS := $(shell [ `uname` = SunOS ] && echo ' -mimpure-text') $(LDFLAGS)
36 + LDL_LDFLAGS := $(shell $(CC) -shared -ldl -xc -o /dev/null /dev/null \
37 + >/dev/null 2>&1 && echo ' -ldl')
38 ++DESTDIR :=
39 +
40 + all: google-authenticator pam_google_authenticator.so demo \
41 + pam_google_authenticator_unittest
42 +@@ -43,26 +44,11 @@
43 + *.c *.h *.html Makefile FILEFORMAT README utc-time
44 +
45 + install: all
46 +- @dst="`find /lib*/security /lib*/*/security -maxdepth 1 \
47 +- -name pam_unix.so -printf '%H' -quit 2>/dev/null`"; \
48 +- [ -d "$${dst}" ] || dst=/lib/security; \
49 +- [ -d "$${dst}" ] || dst=/usr/lib; \
50 +- sudo=; if [ $$(id -u) -ne 0 ]; then \
51 +- echo "You need to be root to install this module."; \
52 +- if [ -x /usr/bin/sudo ]; then \
53 +- echo "Invoking sudo:"; \
54 +- sudo=sudo; \
55 +- else \
56 +- exit 1; \
57 +- fi; \
58 +- fi; \
59 +- echo cp pam_google_authenticator.so $${dst}; \
60 +- tar fc - pam_google_authenticator.so | $${sudo} tar ofxC - $${dst}; \
61 ++ echo install -m 755 pam_google_authenticator.so ${DESTDIR}; \
62 ++ install -m 755 pam_google_authenticator.so ${DESTDIR}; \
63 + \
64 +- echo cp google-authenticator /usr/local/bin; \
65 +- tar fc - google-authenticator | $${sudo} tar ofxC - /usr/local/bin; \
66 +- $${sudo} chmod 755 $${dst}/pam_google_authenticator.so \
67 +- /usr/local/bin/google-authenticator
68 ++ echo install -m 755 google-authenticator ${DESTDIR}; \
69 ++ install -m 755 google-authenticator ${DESTDIR}; \
70 +
71 + clean:
72 + $(RM) *.o *.so core google-authenticator demo \
73
74 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
75 new file mode 100644
76 index 0000000..2c67ddf
77 --- /dev/null
78 +++ b/sys-auth/libpam-google-authenticator/libpam-google-authenticator-1.0.ebuild
79 @@ -0,0 +1,34 @@
80 +# Copyright 1999-2012 Gentoo Foundation
81 +# Distributed under the terms of the GNU General Public License v2
82 +# $Header: $
83 +
84 +EAPI=4
85 +inherit pam
86 +
87 +DESCRIPTION="Google Authentiator PAM plugin"
88 +HOMEPAGE="http://code.google.com/p/google-authenticator/"
89 +SRC_URI="http://google-authenticator.googlecode.com/files/${P}-source.tar.bz2"
90 +
91 +LICENSE="Apache-2.0"
92 +SLOT="0"
93 +KEYWORDS="~amd64 ~x86"
94 +IUSE=""
95 +
96 +DEPEND="sys-libs/pam"
97 +RDEPEND="${DEPEND}"
98 +
99 +src_prepare(){
100 + epatch "${FILESDIR}/makefile.patch"
101 +}
102 +
103 +src_install(){
104 + insinto $(getpam_mod_dir)
105 + doins pam_google_authenticator.so
106 + dobin google-authenticator
107 +
108 + dodoc README
109 +}
110 +
111 +pkg_postinst(){
112 + elog "For setup information check the installed README"
113 +}