93d2a203402fad7d72bf18894a08ec5266c0b945
[AGL/meta-agl.git] / meta-app-framework / recipes-core / nss-localuser / nss-localuser_0.1.bb
1 SUMMARY = "Name Service Switch module for resolving the local user hostname"
2
3 DESCRIPTION = "plugin for the GNU Name Service Switch (NSS) \
4 functionality of the GNU C Library (`glibc`) providing host name \
5 resolution for *"localuser"* family of virtual hostnames."
6
7 HOMEPAGE = "https://git.automotivelinux.org/src/nss-localuser/"
8
9 LICENSE = "MIT"
10 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=79ad77111c398994735201536a4749ba"
11
12 SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/nss-localuser;protocol=https;branch=${AGL_BRANCH}"
13 SRCREV = "66803c6fdb609ed83a78b9194ecb23e9c1b773e7"
14 PV = "${AGL_BRANCH}+git${SRCPV}"
15
16 RDEPENDS:${PN} = "base-files"
17
18 S = "${WORKDIR}/git"
19
20 do_compile() {
21         make
22 }
23
24 do_install() {
25         make nssdir=${D}${libdir} install
26 }
27
28 pkg_postinst_ontarget:${PN} () {
29         sed -e '/^hosts:/s/\<localuser\>\s*//' \
30                 -e 's/\(^hosts:\s\s*\)\(.*\)/\1localuser \2/' \
31                 -i $D${sysconfdir}/nsswitch.conf
32 }
33
34 pkg_prerm:${PN} () {
35         sed -e '/^hosts:/s/\<localuser\>\s*//' \
36                 -i $D${sysconfdir}/nsswitch.conf
37 }
38
39 INSANE_SKIP:${PN} = "ldflags"