diff options
Diffstat (limited to 'meta/recipes-extended/pam/libpam_1.1.6.bb')
-rw-r--r-- | meta/recipes-extended/pam/libpam_1.1.6.bb | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/meta/recipes-extended/pam/libpam_1.1.6.bb b/meta/recipes-extended/pam/libpam_1.1.6.bb new file mode 100644 index 0000000000..dd03df106d --- /dev/null +++ b/meta/recipes-extended/pam/libpam_1.1.6.bb | |||
@@ -0,0 +1,88 @@ | |||
1 | SUMMARY = "Linux-PAM (Pluggable Authentication Modules)" | ||
2 | DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users" | ||
3 | HOMEPAGE = "https://fedorahosted.org/linux-pam/" | ||
4 | BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket" | ||
5 | SECTION = "base" | ||
6 | # PAM is dual licensed under GPL and BSD. | ||
7 | # /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time | ||
8 | # libpam-runtime-1.0.1 is GPLv2+), by openembedded | ||
9 | LICENSE = "GPLv2+ | BSD" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3" | ||
11 | |||
12 | SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \ | ||
13 | file://99_pam \ | ||
14 | file://pam.d/* \ | ||
15 | file://libpam-xtests.patch \ | ||
16 | " | ||
17 | SRC_URI[md5sum] = "7b73e58b7ce79ffa321d408de06db2c4" | ||
18 | SRC_URI[sha256sum] = "bab887d6280f47fc3963df3b95735a27a16f0f663636163ddf3acab5f1149fc2" | ||
19 | |||
20 | SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch" | ||
21 | |||
22 | DEPENDS = "bison flex flex-native cracklib" | ||
23 | |||
24 | EXTRA_OECONF = "--with-db-uniquename=_pam \ | ||
25 | --includedir=${includedir}/security \ | ||
26 | --libdir=${base_libdir} \ | ||
27 | --disable-nis \ | ||
28 | --disable-regenerate-docu" | ||
29 | |||
30 | CFLAGS_append = " -fPIC " | ||
31 | |||
32 | S = "${WORKDIR}/Linux-PAM-${PV}" | ||
33 | |||
34 | inherit autotools gettext | ||
35 | |||
36 | PACKAGES += "${PN}-runtime ${PN}-xtests" | ||
37 | FILES_${PN} = "${base_libdir}/lib*${SOLIBS}" | ||
38 | FILES_${PN}-dbg += "${base_libdir}/security/.debug \ | ||
39 | ${base_libdir}/security/pam_filter/.debug \ | ||
40 | ${datadir}/Linux-PAM/xtests/.debug" | ||
41 | |||
42 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}" | ||
43 | FILES_${PN}-runtime = "${sysconfdir}" | ||
44 | FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests" | ||
45 | |||
46 | PACKAGES_DYNAMIC += " pam-plugin-*" | ||
47 | |||
48 | RDEPENDS_${PN}-runtime = "libpam pam-plugin-deny pam-plugin-permit pam-plugin-warn pam-plugin-unix" | ||
49 | RDEPENDS_${PN}-xtests = "libpam pam-plugin-access pam-plugin-debug pam-plugin-cracklib pam-plugin-pwhistory pam-plugin-succeed-if pam-plugin-time coreutils" | ||
50 | RRECOMMENDS_${PN} = "libpam-runtime" | ||
51 | |||
52 | python populate_packages_prepend () { | ||
53 | def pam_plugin_append_file(pn, dir, file): | ||
54 | nf = os.path.join(dir, file) | ||
55 | of = d.getVar('FILES_' + pn, True) | ||
56 | if of: | ||
57 | nf = of + " " + nf | ||
58 | d.setVar('FILES_' + pn, nf) | ||
59 | |||
60 | dvar = bb.data.expand('${WORKDIR}/package', d, True) | ||
61 | pam_libdir = d.expand('${base_libdir}/security') | ||
62 | pam_sbindir = d.expand('${sbindir}') | ||
63 | pam_filterdir = d.expand('${base_libdir}/security/pam_filter') | ||
64 | |||
65 | do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', extra_depends='') | ||
66 | pam_plugin_append_file('pam-plugin-unix', pam_sbindir, 'unix_chkpwd') | ||
67 | pam_plugin_append_file('pam-plugin-unix', pam_sbindir, 'unix_update') | ||
68 | pam_plugin_append_file('pam-plugin-tally', pam_sbindir, 'pam_tally') | ||
69 | pam_plugin_append_file('pam-plugin-tally2', pam_sbindir, 'pam_tally2') | ||
70 | pam_plugin_append_file('pam-plugin-timestamp', pam_sbindir, 'pam_timestamp_check') | ||
71 | pam_plugin_append_file('pam-plugin-mkhomedir', pam_sbindir, 'mkhomedir_helper') | ||
72 | do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') | ||
73 | } | ||
74 | |||
75 | do_install() { | ||
76 | autotools_do_install | ||
77 | |||
78 | # don't install /var/run when populating rootfs. Do it through volatile | ||
79 | rm -rf ${D}${localstatedir} | ||
80 | install -d ${D}${sysconfdir}/default/volatiles | ||
81 | install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles | ||
82 | |||
83 | install -d ${D}${sysconfdir}/pam.d/ | ||
84 | install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ | ||
85 | |||
86 | # The lsb requires unix_chkpwd has setuid permission | ||
87 | chmod 4755 ${D}${sbindir}/unix_chkpwd | ||
88 | } | ||