Merge remote-tracking branch 'dm/opendreambox-1.6' into test_0701
[vuplus_openembedded] / recipes / pam / libpam_1.1.0.bb
1 DESCRIPTION = "\
2 PAM authentication library for Linux.  \
3 Linux-PAM (Pluggable Authentication Modules for Linux) is a \
4 library that enables the local system administrator to choose \
5 how individual applications authenticate users. For an \
6 overview of the Linux-PAM library see the Linux-PAM System \
7 Administrators' Guide."
8 HOMEPAGE = "http://kernel.org/pub/linux/libs/pam"
9 SECTION = "libs"
10 PRIORITY = "optional"
11 LICENSE = "GPLv2"
12
13 DEPENDS = "flex flex-native"
14
15 # PAM is not a lot of use without configuration files and the plugins
16 RRECOMMENDS_${PN} = "libpam-meta libpam-base-files"
17
18 PR = "r1"
19
20 # The project is actually called Linux-PAM but that gives
21 # a bad OE package name because of the upper case characters
22 pn = "Linux-PAM"
23 p = "${pn}-${PV}"
24 S = "${WORKDIR}/${p}"
25
26 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/pam/library/${p}.tar.bz2 \
27            file://pam-nodocs.patch;patch=1 \
28            file://fix_disabled_nls.patch;patch=1 \
29           "
30
31 UCLIBC_PATCHES = " file://pam-disable-nis-on-uclibc.patch;patch=1 \
32                    file://disable_modules_uclibc.patch;patch=1 \
33                  "
34
35 SRC_URI_append_linux-uclibc = ${UCLIBC_PATCHES}
36 SRC_URI_append_linux-uclibceabi = ${UCLIBC_PATCHES}
37
38 inherit autotools gettext
39
40 LEAD_SONAME = "libpam.so.*"
41
42 # maintain the pam default layout
43 EXTRA_OECONF += " --includedir=${includedir}/security"
44
45 PACKAGES_DYNAMIC += " libpam-meta pam-plugin-*"
46
47 python populate_packages_prepend () {
48         import os.path
49
50         pam_libdir = bb.data.expand('${libdir}/security', d)
51         pam_libdirdebug = bb.data.expand('${libdir}/security/.debug', d)
52         pam_filterdir = bb.data.expand('${libdir}/security/pam_filter', d)
53         do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', extra_depends='')
54         do_split_packages(d, pam_libdir, '^pam(.*)\.la$', 'pam-plugin%s-dev', 'PAM plugin for %s dev', extra_depends='')
55         if os.path.exists(pam_libdirdebug):
56                 do_split_packages(d, pam_libdirdebug, '^pam(.*)\.so$', 'pam-plugin%s-dbg', 'PAM plugin for %s debugging symbols', extra_depends='')
57         do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
58
59         pn = bb.data.getVar('PN', d, 1)
60         metapkg =  pn + '-meta'
61         bb.data.setVar('ALLOW_EMPTY_' + metapkg, "1", d)
62         bb.data.setVar('FILES_' + metapkg, "", d)
63         blacklist = [ pn + '-locale', pn + '-dev', pn + '-dbg', pn + '-doc' ]
64         metapkg_rdepends = []
65         packages = bb.data.getVar('PACKAGES', d, 1).split()
66         for pkg in packages[1:]:
67                 if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.count('locale') and pkg.count('plugin'):
68                         metapkg_rdepends.append(pkg)
69         bb.data.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends), d)
70         bb.data.setVar('DESCRIPTION_' + metapkg, pn + ' meta package', d)
71         packages.append(metapkg)
72         bb.data.setVar('PACKAGES', ' '.join(packages), d)
73 }
74