blob: 5fcfeea1743069920c3297f14e91b93bb27cf5b1 [file] [log] [blame]
Ratan Gupta07a08c92018-09-03 08:41:52 +05301SUMMARY = "NSS and PAM module for using LDAP as a naming service"
2DESCRIPTION = "\
3 daemon for NSS and PAM lookups using LDAP \
4 This package provides a daemon for retrieving user accounts and similar \
5 system information from LDAP. It is used by the libnss-ldapd and \
6 libpam-ldapd packages but is not very useful by itself. \
7 "
8
9HOMEPAGE = "http://arthurdejong.org/nss-pam-ldapd/"
10
11LICENSE = "LGPLv2.1"
12LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
13SECTION = "base"
14
15FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
16
17SRC_URI = "\
18 http://arthurdejong.org/nss-pam-ldapd/${BPN}-${PV}.tar.gz \
19 file://nslcd.init \
20 file://nslcd.service \
21 "
22
23inherit autotools
24
25SRC_URI[md5sum] = "8c99fdc54f4bf9aca8c5f53fdb1403ff"
26SRC_URI[sha256sum] = "ef7362e7f2003da8c7beb7bcc03c30494acf712625aaac8badc6e7eb16f3453f"
27
28DEPENDS += "libpam openldap krb5"
29
30RDEPENDS_${PN} += "nscd"
31
32EXTRA_OECONF = "\
33 --disable-pynslcd \
34 --libdir=${base_libdir} \
35 --with-pam-seclib-dir=${base_libdir}/security \
36 "
37
38CONFFILES_${PN} += "${sysconfdir}/nslcd.conf"
39
40FILES_${PN} += "${base_libdir}/security ${datadir}"
41FILES_${PN}-dbg += "${base_libdir}/security/.debug"
42
43LDAP_DN ?= "dc=my-domain,dc=com"
44
45do_install_append() {
46 install -D -m 0755 ${WORKDIR}/nslcd.init ${D}${sysconfdir}/init.d/nslcd
47
48 sed -i -e 's/^uid nslcd/# uid nslcd/;' ${D}${sysconfdir}/nslcd.conf
49 sed -i -e 's/^gid nslcd/# gid nslcd/;' ${D}${sysconfdir}/nslcd.conf
50 sed -i -e 's/^base dc=example,dc=com/base ${LDAP_DN}/;' ${D}${sysconfdir}/nslcd.conf
51
52 install -d ${D}${systemd_unitdir}/system
53 install -m 0644 ${WORKDIR}/nslcd.service ${D}${systemd_unitdir}/system
54}
55
56inherit update-rc.d systemd
57
58INITSCRIPT_NAME = "nslcd"
59INITSCRIPT_PARAMS = "defaults"
60
61SYSTEMD_SERVICE_${PN} = "nslcd.service"