blob: 04e6a7e096910cb2fb607ac4a2c59e32016abfea [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
Patrick Williamsd541ec52022-04-30 07:41:26 -050011LICENSE = "LGPL-2.1-or-later"
Ratan Gupta07a08c92018-09-03 08:41:52 +053012LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
13SECTION = "base"
14
Patrick Williams12fc9392021-08-06 09:16:53 -050015FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
Ratan Gupta07a08c92018-09-03 08:41:52 +053016
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
Patrick Williams12fc9392021-08-06 09:16:53 -050030RDEPENDS:${PN} += "nscd"
Ratan Gupta07a08c92018-09-03 08:41:52 +053031
32EXTRA_OECONF = "\
33 --disable-pynslcd \
34 --libdir=${base_libdir} \
35 --with-pam-seclib-dir=${base_libdir}/security \
36 "
37
Patrick Williams12fc9392021-08-06 09:16:53 -050038CONFFILES:${PN} += "${sysconfdir}/nslcd.conf"
Ratan Gupta07a08c92018-09-03 08:41:52 +053039
Patrick Williams12fc9392021-08-06 09:16:53 -050040FILES:${PN} += "${base_libdir}/security ${datadir}"
41FILES:${PN}-dbg += "${base_libdir}/security/.debug"
Ratan Gupta07a08c92018-09-03 08:41:52 +053042
43LDAP_DN ?= "dc=my-domain,dc=com"
44
Patrick Williams12fc9392021-08-06 09:16:53 -050045do_install:append() {
Ratan Gupta07a08c92018-09-03 08:41:52 +053046 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
Brad Bishop57e15b12021-03-25 15:40:46 -040052 install -d ${D}${systemd_system_unitdir}
53 install -m 0644 ${WORKDIR}/nslcd.service ${D}${systemd_system_unitdir}
Ratan Gupta07a08c92018-09-03 08:41:52 +053054}
55
56inherit update-rc.d systemd
57
58INITSCRIPT_NAME = "nslcd"
59INITSCRIPT_PARAMS = "defaults"
60
Patrick Williams12fc9392021-08-06 09:16:53 -050061SYSTEMD_SERVICE:${PN} = "nslcd.service"