]> Pileus Git - ~andy/sunrise/commitdiff
sys-auth/google-authenticator: New Ebuild for bug #419177, thanks to hasufell, floppym.
authorManuel Rüger (mrueg) <gentoo@rueg.eu>
Mon, 9 Jul 2012 22:01:51 +0000 (00:01 +0200)
committerManuel Rüger (mrueg) <gentoo@rueg.eu>
Mon, 9 Jul 2012 22:01:51 +0000 (00:01 +0200)
sys-auth/google-authenticator/ChangeLog [new file with mode: 0644]
sys-auth/google-authenticator/Manifest [new file with mode: 0644]
sys-auth/google-authenticator/files/google-authenticator-1.0-Makefile.patch [new file with mode: 0644]
sys-auth/google-authenticator/google-authenticator-1.0.ebuild [new file with mode: 0644]
sys-auth/google-authenticator/metadata.xml [new file with mode: 0644]

diff --git a/sys-auth/google-authenticator/ChangeLog b/sys-auth/google-authenticator/ChangeLog
new file mode 100644 (file)
index 0000000..1bf8ad9
--- /dev/null
@@ -0,0 +1,11 @@
+# ChangeLog for sys-auth/google-authenticator
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*google-authenticator-1.0 (09 Jul 2012)
+
+  09 Jul 2012; Manuel Rüger (mrueg) gentoo@rueg.eu
+  +google-authenticator-1.0.ebuild,
+  +files/google-authenticator-1.0-Makefile.patch, +metadata.xml:
+  New Ebuild for bug #419177, thanks to hasufell, floppym.
+
diff --git a/sys-auth/google-authenticator/Manifest b/sys-auth/google-authenticator/Manifest
new file mode 100644 (file)
index 0000000..2fd3a40
--- /dev/null
@@ -0,0 +1,5 @@
+AUX google-authenticator-1.0-Makefile.patch 2371 SHA256 d560e4099ce24535637a0841247db49837f2f91b26b47f36dd82d277e5e5a43a SHA512 761986713c7b4ebd25fd12d1ea926ff281f064a9f33ac904dd0ef055b588b67945d1cc03a90ecac185f4879c24615c77cd36a9137a2bbdc16d75f4cf63bca2ec WHIRLPOOL 1f5ca70527c8e4e69997ea20e1bcd92f99baeebd4e2f5f512bc956c4a4b6a822088340da8c46f65b52084358496291b07412f8c6fdbbdc1240439633f15aa278
+DIST libpam-google-authenticator-1.0-source.tar.bz2 32708 SHA256 80426045d13ce7a2bf56c692ccfb1751cef3c7484752ad40738facf729264d4b SHA512 92ec473b07e2e46f969cd0a1a6f5707892800418442ad7d046ebc1195bbd1654e396f53245056c7eee38decaeb1997102f9aa988b7da1d734dcd2b104402ef8c WHIRLPOOL fff94006035d0751ff690f81d827a33c5d304f86a48809fa889138bb29ae1f9c47315fb0c3548d29dae545cac63db9f35a9bb6e439f49cd4a6571241a43e4c6a
+EBUILD google-authenticator-1.0.ebuild 1170 SHA256 1054a7ea5d170462a15b393055f2c3b834d3d204378c08699b33c7fe5a42fe21 SHA512 b151a79887dc39902af32812cbe17d2afbaf54062d385880c7732a442f0e132fdb050fa53806d4b55bc261354e296f52a204010dba47d7b9c89dd857400f4752 WHIRLPOOL 97bd32b0b543efc157573c72813d90acb2419a53836175d2a8be477861225e14bae5d3f5820dd451e4a39f981235e2934ac9c50062c573cb0b017a0545831c10
+MISC ChangeLog 384 SHA256 8ccb6dfb3908278ed0b70c4befbdabb0007d8c62de43fb4ea8be4f2c02d92fb3 SHA512 1c56a4f198073d9f156967773438aa7756aa594a7606655e614f44bb68dbe0842d4b857a5d1b2f2f1d6c4ca7bb9f00ef450ab738b298916ee318242e9cba9caa WHIRLPOOL 19dcf9eeee530142f49408b197d036e64d136a44ce91266f52a1cc006c694443f2b7ae95fd543637853a586f133fdcace5f383f5438bce6deda3a352c8a023a4
+MISC metadata.xml 214 SHA256 c1f09dc7d5313cd2da7b82259c7846ed23144d62b15e59680ada90e2b6b4d154 SHA512 aeb2fb354a9ddf41c45a071091a58b91eaf8b25d6d2c49e3e3daa547b591a54530144de4533573160b48dc356289c909612c4e3c80e387f081f88cb39263e130 WHIRLPOOL 54d8861daedd18ca38e4ada0fb71026c612b63946d47a9b34de90d1d6d85c8ce05c0a4b97730f554ea637d73ccce8ed207d33e707c2b8c1dd28af24cf44dd186
diff --git a/sys-auth/google-authenticator/files/google-authenticator-1.0-Makefile.patch b/sys-auth/google-authenticator/files/google-authenticator-1.0-Makefile.patch
new file mode 100644 (file)
index 0000000..b44e568
--- /dev/null
@@ -0,0 +1,58 @@
+Sa 7. Jul 19:54:31 CEST 2012
+Manuel Rueger (gentoo@rueg.eu)
+Make CC overwritable
+Drop -g and -O2
+
+--- Makefile.old       2012-06-02 08:10:18.115493988 +0200
++++ Makefile   2012-07-07 18:51:19.923536018 +0200
+@@ -18,9 +18,7 @@
+ .SUFFIXES: .so
+-ifeq ($(origin CC), default)
+-  CC := gcc
+-endif
++CC ?= gcc
+ DEF_CFLAGS := $(shell [ `uname` = SunOS ] &&                                  \
+                 echo ' -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT')              \
+@@ -70,14 +68,14 @@
+                      libpam-google-authenticator-*-source.tar.bz2
+ google-authenticator: google-authenticator.o base32.o hmac.o sha1.o
+-      $(CC) -g $(DEF_LDFLAGS) -o $@ $+ $(LDL_LDFLAGS)
++      $(CC) $(DEF_LDFLAGS) -o $@ $+ $(LDL_LDFLAGS)
+ demo: demo.o pam_google_authenticator_demo.o base32.o hmac.o sha1.o
+-      $(CC) -g $(DEF_LDFLAGS) -rdynamic -o $@ $+ $(LDL_LDFLAGS)
++      $(CC) $(DEF_LDFLAGS) -rdynamic -o $@ $+ $(LDL_LDFLAGS)
+ pam_google_authenticator_unittest: pam_google_authenticator_unittest.o        \
+                                    base32.o hmac.o sha1.o
+-      $(CC) -g $(DEF_LDFLAGS) -rdynamic -o $@ $+ -lc $(LDL_LDFLAGS)
++      $(CC) $(DEF_LDFLAGS) -rdynamic -o $@ $+ -lc $(LDL_LDFLAGS)
+ pam_google_authenticator.so: base32.o hmac.o sha1.o
+ pam_google_authenticator_testing.so: base32.o hmac.o sha1.o
+@@ -85,10 +83,10 @@
+ pam_google_authenticator.o: pam_google_authenticator.c base32.h hmac.h sha1.h
+ pam_google_authenticator_demo.o: pam_google_authenticator.c base32.h hmac.h   \
+                                sha1.h
+-      $(CC) -DDEMO --std=gnu99 -Wall -O2 -g -fPIC -c $(DEF_CFLAGS) -o $@ $<
++      $(CC) -DDEMO --std=gnu99 -Wall -fPIC -c $(DEF_CFLAGS) -o $@ $<
+ pam_google_authenticator_testing.o: pam_google_authenticator.c base32.h       \
+                                     hmac.h sha1.h
+-      $(CC) -DTESTING --std=gnu99 -Wall -O2 -g -fPIC -c $(DEF_CFLAGS)       \
++      $(CC) -DTESTING --std=gnu99 -Wall -fPIC -c $(DEF_CFLAGS)       \
+               -o $@ $<
+ pam_google_authenticator_unittest.o: pam_google_authenticator_unittest.c      \
+                                      pam_google_authenticator_testing.so      \
+@@ -100,6 +98,6 @@
+ sha1.o: sha1.c sha1.h
+ .c.o:
+-      $(CC) --std=gnu99 -Wall -O2 -g -fPIC -c $(DEF_CFLAGS) -o $@ $<
++      $(CC) --std=gnu99 -Wall -fPIC -c $(DEF_CFLAGS) -o $@ $<
+ .o.so:
+-      $(CC) -shared -g $(DEF_LDFLAGS) -o $@ $+ -lpam
++      $(CC) -shared $(DEF_LDFLAGS) -o $@ $+ -lpam
diff --git a/sys-auth/google-authenticator/google-authenticator-1.0.ebuild b/sys-auth/google-authenticator/google-authenticator-1.0.ebuild
new file mode 100644 (file)
index 0000000..6ba2648
--- /dev/null
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils toolchain-funcs multilib
+
+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 ~x86"
+IUSE=""
+
+DEPEND="virtual/pam"
+
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+# Test fails with:
+# pam_google_authenticator_unittest: pam_google_authenticator_unittest.c:317: main: Assertion `pam_sm_open_session(((void *)0), 0, targc, targv) == 0' failed.
+# No user name available when checking verification code
+
+S=${WORKDIR}/libpam-${P}
+
+src_prepare(){
+       epatch "${FILESDIR}"/${P}-Makefile.patch
+       tc-export CC
+}
+
+src_install(){
+       dodoc README
+       insinto $(get_libdir)/security
+       doins 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"
+       elog ""
+       elog "If you want support for QR-Codes, install media-gfx/qrencode."
+}
diff --git a/sys-auth/google-authenticator/metadata.xml b/sys-auth/google-authenticator/metadata.xml
new file mode 100644 (file)
index 0000000..cc3fe24
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer>
+               <email>maintainer-wanted@gentoo.org</email>
+       </maintainer>
+</pkgmetadata>