1*4882a593SmuzhiyunSUMMARY = "pam-ssh-agent-auth"
2*4882a593SmuzhiyunDESCRIPTION = "A PAM module which permits authentication via ssh-agent."
3*4882a593SmuzhiyunHOMEPAGE = "http://sourceforge.net/projects/pamsshagentauth/"
4*4882a593SmuzhiyunSECTION = "libs"
5*4882a593SmuzhiyunLICENSE = "OpenSSL & BSD-2-Clause & BSD-3-Clause"
6*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENSE.OpenSSL;md5=8ab01146141ded59b75f8ba7811ed05a \
7*4882a593Smuzhiyun                    file://OPENSSH_LICENSE;md5=7ae09218173be1643c998a4b71027f9b \
8*4882a593Smuzhiyun"
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunSRC_URI = "http://sourceforge.net/projects/pamsshagentauth/files/pam_ssh_agent_auth/v${PV}/pam_ssh_agent_auth-${PV}.tar.bz2 \
11*4882a593Smuzhiyun           file://0001-Adapt-to-OpenSSL-1.1.1.patch \
12*4882a593Smuzhiyun           file://0002-Check-against-the-correct-OPENSSL_VERSION_NUMBER.patch \
13*4882a593Smuzhiyun           "
14*4882a593SmuzhiyunSRC_URI[md5sum] = "8dbe90ab3625e545036333e6f51ccf1d"
15*4882a593SmuzhiyunSRC_URI[sha256sum] = "3c53d358d6eaed1b211239df017c27c6f9970995d14102ae67bae16d4f47a763"
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunDEPENDS += "libpam openssl"
18*4882a593Smuzhiyun
19*4882a593Smuzhiyuninherit features_check
20*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "pam"
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun# This gets us ssh-agent, which we are almost certain to want.
23*4882a593Smuzhiyun#
24*4882a593SmuzhiyunRDEPENDS:${PN} += "openssh-misc"
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun# Kind of unfortunate to have underscores in the name.
27*4882a593Smuzhiyun#
28*4882a593SmuzhiyunS = "${WORKDIR}/pam_ssh_agent_auth-${PV}"
29*4882a593Smuzhiyun
30*4882a593Smuzhiyuninherit autotools-brokensep perlnative
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun# Avoid autoreconf.  Override the --libexec oe_runconf specifies so that
33*4882a593Smuzhiyun# the module is put with the other pam modules.  Because it cannot, in general,
34*4882a593Smuzhiyun# do a runtime test, configure wants to use rpl_malloc() and rpl_realloc()
35*4882a593Smuzhiyun# instead of malloc() and realloc().  We set variables to tell it not to because
36*4882a593Smuzhiyun# these functions do not exist.
37*4882a593Smuzhiyun#
38*4882a593Smuzhiyundo_configure () {
39*4882a593Smuzhiyun    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
40*4882a593Smuzhiyun    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
41*4882a593Smuzhiyun    oe_runconf --without-openssl-header-check  --libexecdir=${base_libdir}/security \
42*4882a593Smuzhiyun               ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes
43*4882a593Smuzhiyun}
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun# Link with CC.  Configure cannot figure out the correct AR.
46*4882a593Smuzhiyun#
47*4882a593Smuzhiyundo_compile () {
48*4882a593Smuzhiyun    oe_runmake  LD="${CC}" AR="${AR}"
49*4882a593Smuzhiyun}
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun# This stuff is not any place looked at by default.
52*4882a593Smuzhiyun#
53*4882a593SmuzhiyunFILES:${PN} += "${base_libdir}/security/pam*"
54*4882a593SmuzhiyunFILES:${PN}-dbg += "${base_libdir}/security/.debug"
55