2 # Copyright (C) 2006-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=google-authenticator
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
18 PKG_SOURCE_URL
:=http
://code.google.com
/p
/google-authenticator
/
19 PKG_SOURCE_VERSION
:=$(PKG_REV
)
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/libpam-google-authenticator
26 DEPENDS
:=+libpam
+libqrencode
27 TITLE
:=Googles
2-step verification PAM library
28 URL
:=http
://code.google.com
/p
/google-authenticator
/
31 define Package
/libpam-google-authenticator
/description
32 The Google Authenticator project includes implementations of one-time
33 passcode generators for several mobile platforms
, as well
as a pluggable
34 authentication module
(PAM
). One-time passcodes are generated using open
35 standards developed by the Initiative for Open Authentication
(OATH
)
36 (which is unrelated to OAuth
).
38 These implementations support the HMAC-Based One-time Password
(HOTP
)
39 algorithm specified in RFC
4226 and the Time-based One-time Password
40 (TOTP
) algorithm specified in RFC
6238.
43 define Build
/Configure
46 TARGET_CFLAGS
+= -I
$(STAGING_DIR
)/usr
/include
50 $(MAKE
) -C
$(PKG_BUILD_DIR
)/libpam \
51 $(TARGET_CONFIGURE_OPTS
) \
52 CFLAGS
="$(TARGET_CFLAGS)" \
53 LDFLAGS
="$(TARGET_LDFLAGS)" \
57 define Package
/libpam-google-authenticator
/install
58 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/lib
/security
59 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/libpam
/google-authenticator
$(1)/usr
/sbin
/
60 $(CP
) $(PKG_BUILD_DIR
)/libpam
/pam_google_authenticator.so
$(1)/lib
/security
/
63 $(eval
$(call BuildPackage
,libpam-google-authenticator
))