2 ## Copyright (C) 2019 Wind River Systems, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 The ldapscripts are originally designed to be used within Samba 3.x's \
18 smb.conf file. They allow to manipulate POSIX entries for users, groups \
19 and machines in an LDAP directory. They are written in shell and need ldap \
20 client commands to work correctly (ldapadd, ldapdelete, ldapmodify, \
21 ldapsearch). Other scripts also are provided as simple tools to (manually) \
22 query your LDAP directory : ldapfinger, ldapid, lsldap (...). \
24 They are designed to be used under GNU/Linux or FreeBSD (any other \
25 recent UNIX-like should also work) and require several binaries that should \
26 come with your OS (uuencode, getent/pw, date, grep, sed, cut...). \
28 Latest version available on http://contribs.martymac.org \
31 SUMMARY = "Shell scripts to manage POSIX accounts in LDAP"
36 LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
41 SRCREV = "0bf4b546df8c7fdec8cfc6cb6f71b9609ee54306"
44 https://downloads.sourceforge.net/project/ldapscripts/ldapscripts/ldapscripts-2.0.8/ldapscripts-2.0.8.tgz \
45 git://opendev.org/starlingx/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH};destsuffix=stx-patches;subpath=ldap/ldapscripts/files \
47 SRC_URI[md5sum] = "99a7222215eaea2c8bc790d0437f22ea"
48 SRC_URI[sha256sum] = "7db3848501f257a10417c9bcfc0b70b76d0a8093eb993f2354925e156c3419ff"
51 bb.build.exec_func('stx_do_patch', d)
56 patch -p1 < ${WORKDIR}/stx-patches/sudo-support.patch
57 patch -p1 < ${WORKDIR}/stx-patches/sudo-delete-support.patch
58 patch -p1 < ${WORKDIR}/stx-patches/log_timestamp.patch
59 patch -p1 < ${WORKDIR}/stx-patches/ldap-user-setup-support.patch
60 patch -p1 < ${WORKDIR}/stx-patches/allow-anonymous-bind-for-ldap-search.patch
63 SOURCE1 = "${WORKDIR}/stx-patches/ldapscripts.conf.cgcs"
64 SOURCE2 = "${WORKDIR}/stx-patches/ldapadduser.template.cgcs"
65 SOURCE3 = "${WORKDIR}/stx-patches/ldapaddgroup.template.cgcs"
66 SOURCE4 = "${WORKDIR}/stx-patches/ldapmoduser.template.cgcs"
67 SOURCE5 = "${WORKDIR}/stx-patches/ldapaddsudo.template.cgcs"
68 SOURCE6 = "${WORKDIR}/stx-patches/ldapmodsudo.template.cgcs"
69 SOURCE7 = "${WORKDIR}/stx-patches/ldapscripts.passwd"
73 oe_runmake -e configure
82 oe_runmake -e DESTDIR=${D} SBINDIR=${sbindir} \
83 MANDIR=${mandir} ETCDIR=${sysconfdir}/ldapscripts \
84 LIBDIR=${libdir} install
86 rm -Rf ${D}${mandir}/*
87 rm -f ${D}${sbindir}/*machine*
88 rm -f ${D}${sysconfdir}//ldapscripts/ldapaddmachine.template.sample
89 install -m 644 ${SOURCE1} ${D}${sysconfdir}/ldapscripts/ldapscripts.conf
90 install -m 644 ${SOURCE2} ${D}${sysconfdir}/ldapscripts/ldapadduser.template.cgcs
91 install -m 644 ${SOURCE3} ${D}${sysconfdir}/ldapscripts/ldapaddgroup.template.cgcs
92 install -m 644 ${SOURCE4} ${D}${sysconfdir}/ldapscripts/ldapmoduser.template.cgcs
93 install -m 644 ${SOURCE5} ${D}${sysconfdir}/ldapscripts/ldapaddsudo.template.cgcs
94 install -m 644 ${SOURCE6} ${D}${sysconfdir}/ldapscripts/ldapmodsudo.template.cgcs
95 install -m 600 ${SOURCE7} ${D}${sysconfdir}/ldapscripts/ldapscripts.passwd
98 FILES_${PN}_append = " ${libdir}/runtime \