summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/openldap/openldap_2.4.23.bb
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-oe/recipes-support/openldap/openldap_2.4.23.bb
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-support/openldap/openldap_2.4.23.bb')
-rw-r--r--meta-oe/recipes-support/openldap/openldap_2.4.23.bb213
1 files changed, 213 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/openldap/openldap_2.4.23.bb b/meta-oe/recipes-support/openldap/openldap_2.4.23.bb
new file mode 100644
index 0000000000..5c6f9eac65
--- /dev/null
+++ b/meta-oe/recipes-support/openldap/openldap_2.4.23.bb
@@ -0,0 +1,213 @@
1# OpenLDAP, a license free (see http://www.OpenLDAP.org/license.html)
2#
3DESCRIPTION = "OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol."
4HOMEPAGE = "http://www.OpenLDAP.org/license.html"
5# The OpenLDAP Public License - see the HOMEPAGE - defines
6# the license. www.openldap.org claims this is Open Source
7# (see http://www.openldap.org), the license appears to be
8# basically BSD. opensource.org does not record this license
9# at present (so it is apparently not OSI certified).
10LICENSE = "OpenLDAP"
11LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3d82d3085f228af211a6502c7ea7c3c7"
12SECTION = "libs"
13
14LDAP_VER = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
15
16SRC_URI = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz \
17 file://openldap-m4-pthread.patch \
18 file://kill-icu.patch \
19 file://initscript \
20"
21SRC_URI[md5sum] = "90150b8c0d0192e10b30157e68844ddf"
22SRC_URI[sha256sum] = "5a5ede91d5e8ab3c7f637620aa29a3b96eb34318a8b26c8eef2d2c789fc055e3"
23
24DEPENDS = "util-linux groff-native"
25
26PR = "r1"
27# The original top.mk used INSTALL, not INSTALL_STRIP_PROGRAM when
28# installing .so and executables, this fails in cross compilation
29# environments
30SRC_URI += "file://install-strip.patch"
31
32inherit autotools-brokensep
33
34# CV SETTINGS
35# Required to work round AC_FUNC_MEMCMP which gets the wrong answer
36# when cross compiling (should be in site?)
37EXTRA_OECONF += "ac_cv_func_memcmp_working=yes"
38
39# CONFIG DEFINITIONS
40# The following is necessary because it cannot be determined for a
41# cross compile automagically. Select should yield fine on all OE
42# systems...
43EXTRA_OECONF += "--with-yielding-select=yes"
44# Shared libraries are nice...
45EXTRA_OECONF += "--enable-dynamic"
46
47PACKAGECONFIG ??= "gnutls modules \
48 ldap meta monitor null passwd shell proxycache dnssrv \
49"
50#--with-tls with TLS/SSL support auto|openssl|gnutls [auto]
51PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls"
52PACKAGECONFIG[openssl] = "--with-tls=openssl,,openssl"
53
54PACKAGECONFIG[sasl] = "--with-cyrus-sasl,--without-cyrus-sasl,cyrus-sasl"
55PACKAGECONFIG[modules] = "lt_cv_dlopen_self=yes --enable-modules,--disable-modules,libtool"
56
57# SLAPD options
58#
59# UNIX crypt(3) passwd support:
60EXTRA_OECONF += "--enable-crypt"
61
62# SLAPD BACKEND
63#
64# The backend must be set by the configuration. This controls the
65# required database, the default database, bdb, is turned off but
66# can be turned back on again and it *is* below! The monitor backend
67# is also disabled. If you try to change the backends but fail to
68# enable a single one the build will fail in an obvious way.
69#
70EXTRA_OECONF += "--disable-bdb --disable-hdb --disable-monitor"
71#
72# Backends="bdb dnssrv hdb ldap ldbm meta monitor null passwd perl shell sql"
73#
74# Note that multiple backends can be built. The ldbm backend requires a
75# build-time choice of database API. The bdb backend forces this to be
76# DB4. To use the gdbm (or other) API the Berkely database module must
77# be removed from the build.
78md = "${libexecdir}/openldap"
79#
80#--enable-bdb enable Berkeley DB backend no|yes|mod yes
81# The Berkely DB is the standard choice. This version of OpenLDAP requires
82# the version 4 implementation or better.
83PACKAGECONFIG[bdb] = "--enable-bdb=mod,--enable-bdb=no,db"
84
85#--enable-dnssrv enable dnssrv backend no|yes|mod no
86PACKAGECONFIG[dnssrv] = "--enable-dnssrv=mod,--enable-dnssrv=no"
87
88#--enable-hdb enable Hierarchical DB backend no|yes|mod no
89# This forces ldbm to use Berkeley too, remove to use gdbm
90PACKAGECONFIG[hdb] = "--enable-hdb=mod,--enable-hdb=no,db"
91
92#--enable-ldap enable ldap backend no|yes|mod no
93PACKAGECONFIG[ldap] = "--enable-ldap=mod,--enable-ldap=no,"
94
95#--enable-ldbm enable ldbm backend no|yes|mod no
96# ldbm requires further specification of the underlying database API, because
97# bdb is enabled above this must be set to berkeley, however the config
98# defaults this correctly so --with-ldbm-api is *not* set. The build will
99# fail if bdb is removed, but no database is built to provide the
100# support for ldbm
101# guide.html:<P>back-ldbm was both slow and unreliable. Its byzantine indexing code was prone to spontaneous corruption, as were the underlying database libraries that were commonly used (e.g. GDBM or NDBM). back-bdb and back-hdb are superior in every aspect, with simplified indexing to avoid index corruption, fine-grained locking for greater concurrency, hierarchical caching for greater performance, streamlined on-disk format for greater efficiency and portability, and full transaction support for greater reliability.</P>
102# configure: WARNING: unrecognized options: --disable-silent-rules, --enable-ldbm, --with-ldbm-api
103#PACKAGECONFIG[ldbm] = "--enable-ldbm=mod --with-ldbm-api=gdbm,--enable-ldbm-no,gdbm"
104
105#--enable-meta enable metadirectory backend no|yes|mod no
106PACKAGECONFIG[meta] = "--enable-meta=mod,--enable-meta=no,"
107
108#--enable-monitor enable monitor backend no|yes|mod yes
109PACKAGECONFIG[monitor] = "--enable-monitor=mod,--enable-monitor=no,"
110
111#--enable-null enable null backend no|yes|mod no
112PACKAGECONFIG[null] = "--enable-null=mod,--enable-null=no,"
113
114#--enable-passwd enable passwd backend no|yes|mod no
115PACKAGECONFIG[passwd] = "--enable-passwd=mod,--enable-passwd=no,"
116
117#--enable-perl enable perl backend no|yes|mod no
118# This requires a loadable perl dynamic library, if enabled without
119# doing something appropriate (building perl?) the build will pick
120# up the build machine perl - not good (inherit perlnative?)
121PACKAGECONFIG[perl] = "--enable-perl=mod,--enable-perl=no,perl"
122
123#--enable-shell enable shell backend no|yes|mod no
124# configure: WARNING: Use of --without-threads is recommended with back-shell
125PACKAGECONFIG[shell] = "--enable-shell=mod --without-threads,--enable-shell=no,"
126
127#--enable-sql enable sql backend no|yes|mod no
128# sql requires some sql backend which provides sql.h, sqlite* provides
129# sqlite.h (which may be compatible but hasn't been tried.)
130PACKAGECONFIG[sql] = "--enable-sql=mod,--enable-sql=no,sqlite3"
131
132#--enable-dyngroup Dynamic Group overlay no|yes|mod no
133# This is a demo, Proxy Cache defines init_module which conflicts with the
134# same symbol in dyngroup
135PACKAGECONFIG[dyngroup] = "--enable-dyngroup=mod,--enable-dyngroup=no,"
136
137#--enable-proxycache Proxy Cache overlay no|yes|mod no
138PACKAGECONFIG[proxycache] = "--enable-proxycache=mod,--enable-proxycache=no,"
139FILES_${PN}-overlay-proxycache = "${md}/pcache-*.so.*"
140PACKAGES += "${PN}-overlay-proxycache"
141
142CPPFLAGS_append = " -D_GNU_SOURCE"
143
144do_configure() {
145 cp ${STAGING_DATADIR_NATIVE}/libtool/config/ltmain.sh ${S}/build
146 rm -f ${S}/libtool
147 aclocal
148 libtoolize --force --copy
149 gnu-configize
150 autoconf
151 oe_runconf
152}
153
154LEAD_SONAME = "libldap-${LDAP_VER}.so.*"
155
156# The executables go in a separate package. This allows the
157# installation of the libraries with no daemon support.
158# Each module also has its own package - see above.
159PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin"
160
161# Package contents - shift most standard contents to -bin
162FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/openldap-data"
163FILES_${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \
164 ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \
165 ${sysconfdir}/openldap/DB_CONFIG.example"
166FILES_${PN}-slurpd = "${libexecdir}/slurpd ${localstatedir}/openldap-slurp ${localstatedir}/run ${localstatedir}/volatile/run"
167FILES_${PN}-bin = "${bindir}"
168FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libdir}/*.a ${libexecdir}/openldap/*.a ${libexecdir}/openldap/*.la ${libexecdir}/openldap/*.so"
169FILES_${PN}-dbg += "${libexecdir}/openldap/.debug"
170
171do_install_append() {
172 install -d ${D}${sysconfdir}/init.d
173 cat ${WORKDIR}/initscript > ${D}${sysconfdir}/init.d/openldap
174 chmod 755 ${D}${sysconfdir}/init.d/openldap
175 # This is duplicated in /etc/openldap and is for slapd
176 rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example
177 rmdir "${D}${localstatedir}/run"
178 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
179}
180
181pkg_postinst_${PN}-slapd () {
182 if test -n "${D}"; then
183 D="-r $D"
184 fi
185 update-rc.d $D openldap defaults
186}
187
188pkg_prerm_${PN}-slapd () {
189 if test -n "${D}"; then
190 D="-r $D"
191 fi
192 update-rc.d $D openldap remove
193}
194
195PACKAGES_DYNAMIC += "^openldap-backends.* ^openldap-backend-.*"
196
197python populate_packages_prepend () {
198 backend_dir = d.expand('${libexecdir}/openldap')
199 do_split_packages(d, backend_dir, 'back_([a-z]*)\-.*\.so\..*$', 'openldap-backend-%s', 'OpenLDAP %s backend', extra_depends='', allow_links=True)
200
201 metapkg = "openldap-backends"
202 d.setVar('ALLOW_EMPTY_' + metapkg, "1")
203 d.setVar('FILES_' + metapkg, "")
204 metapkg_rdepends = []
205 packages = d.getVar('PACKAGES', 1).split()
206 for pkg in packages[1:]:
207 if pkg.count("openldap-backend-") and not pkg in metapkg_rdepends and not pkg.count("-dev") and not pkg.count("-dbg") and not pkg.count("static") and not pkg.count("locale"):
208 metapkg_rdepends.append(pkg)
209 d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends))
210 d.setVar('DESCRIPTION_' + metapkg, 'OpenLDAP backends meta package')
211 packages.append(metapkg)
212 d.setVar('PACKAGES', ' '.join(packages))
213}