nss-localuser: Add application to localuser family
[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 S = "${WORKDIR}/git"
17
18 do_compile() {
19         make
20 }
21
22 do_install() {
23         make nssdir=${D}${libdir} install
24 }
25
26 pkg_postinst_${PN} () {
27         sed -e '/^hosts:/s/\<localuser\>\s*//' \
28                 -e 's/\(^hosts:\s\s*\)\(.*\)/\1localuser \2/' \
29                 -i $D${sysconfdir}/nsswitch.conf
30 }
31
32 pkg_prerm_${PN} () {
33         sed -e '/^hosts:/s/\<localuser\>\s*//' \
34                 -i $D${sysconfdir}/nsswitch.conf
35 }
36
37 INSANE_SKIP_${PN} = "ldflags"