Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-support / ldapscripts / ldapscripts_2.0.8.bb
1 #
2 ## Copyright (C) 2019 Wind River Systems, Inc.
3 #
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
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15
16 DESCRIPTION = " \
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 (...). \
23  \
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...). \
27  \
28 Latest version available on http://contribs.martymac.org \
29 "
30
31 SUMMARY = "Shell scripts to manage POSIX accounts in LDAP"
32
33 SECTION = "base"
34 LICENSE = "GPLv2"
35
36 LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
37
38 SRC_URI = "https://downloads.sourceforge.net/project/ldapscripts/ldapscripts/ldapscripts-2.0.8/ldapscripts-2.0.8.tgz"
39 SRC_URI[md5sum] = "99a7222215eaea2c8bc790d0437f22ea"
40 SRC_URI[sha256sum] = "7db3848501f257a10417c9bcfc0b70b76d0a8093eb993f2354925e156c3419ff"
41
42 SRC_URI += " file://sudo-support.patch \
43              file://sudo-delete-support.patch \
44              file://log_timestamp.patch \
45              file://ldap-user-setup-support.patch \
46              file://allow-anonymous-bind-for-ldap-search.patch \
47              file://ldapscripts.conf.cgcs \
48         file://ldapadduser.template.cgcs \
49         file://ldapaddgroup.template.cgcs \
50         file://ldapmoduser.template.cgcs \
51         file://ldapaddsudo.template.cgcs \
52         file://ldapmodsudo.template.cgcs \
53         file://ldapscripts.passwd \
54 "
55
56 SOURCE1 = "${WORKDIR}/ldapscripts.conf.cgcs"
57 SOURCE2 = "${WORKDIR}/ldapadduser.template.cgcs"
58 SOURCE3 = "${WORKDIR}/ldapaddgroup.template.cgcs"
59 SOURCE4 = "${WORKDIR}/ldapmoduser.template.cgcs"
60 SOURCE5 = "${WORKDIR}/ldapaddsudo.template.cgcs"
61 SOURCE6 = "${WORKDIR}/ldapmodsudo.template.cgcs"
62 SOURCE7 = "${WORKDIR}/ldapscripts.passwd"
63
64 do_configure () {
65         cd ${S}
66         oe_runmake -e configure
67 }
68
69 do_compile () {
70         :
71 }
72
73 do_install () {
74         cd ${S}
75         oe_runmake -e DESTDIR=${D} SBINDIR=${sbindir} \
76                 MANDIR=${mandir} ETCDIR=${sysconfdir}/ldapscripts \
77                 LIBDIR=${libdir} install
78
79         rm -Rf ${D}${mandir}/*
80         rm -f ${D}${sbindir}/*machine*
81         rm -f ${D}${sysconfdir}//ldapscripts/ldapaddmachine.template.sample
82         install -m 644 ${SOURCE1} ${D}${sysconfdir}/ldapscripts/ldapscripts.conf
83         install -m 644 ${SOURCE2} ${D}${sysconfdir}/ldapscripts/ldapadduser.template.cgcs
84         install -m 644 ${SOURCE3} ${D}${sysconfdir}/ldapscripts/ldapaddgroup.template.cgcs
85         install -m 644 ${SOURCE4} ${D}${sysconfdir}/ldapscripts/ldapmoduser.template.cgcs
86         install -m 644 ${SOURCE5} ${D}${sysconfdir}/ldapscripts/ldapaddsudo.template.cgcs
87         install -m 644 ${SOURCE6} ${D}${sysconfdir}/ldapscripts/ldapmodsudo.template.cgcs
88         install -m 600 ${SOURCE7} ${D}${sysconfdir}/ldapscripts/ldapscripts.passwd
89 }
90
91 FILES_${PN}_append = " ${libdir}/runtime \
92                        ${sysconfdir} \
93 "