summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Vernay <brunovern.a@gmail.com>2016-01-23 22:31:31 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2016-02-01 15:58:05 +0100
commitf3b3c1fdd88f3084c3cea11cd39e86216ba93218 (patch)
treec91be8aec9f5ae7ac03bd8521a8c4844c249cb32
parent350ad5dd558dc7d4e6d1cb7cf1a55a58d4036924 (diff)
downloadmeta-openembedded-f3b3c1fdd88f3084c3cea11cd39e86216ba93218.tar.gz
openldap: improve packaging of OpenLDAP modules
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-support/openldap/openldap_2.4.43.bb28
1 files changed, 27 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/openldap/openldap_2.4.43.bb b/meta-oe/recipes-support/openldap/openldap_2.4.43.bb
index c4a52b1f9..881b3a848 100644
--- a/meta-oe/recipes-support/openldap/openldap_2.4.43.bb
+++ b/meta-oe/recipes-support/openldap/openldap_2.4.43.bb
@@ -147,6 +147,8 @@ PACKAGES += "${PN}-overlay-proxycache"
147# it was disabled for cross-compiling. 147# it was disabled for cross-compiling.
148CPPFLAGS_append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\'" 148CPPFLAGS_append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\'"
149 149
150LDFLAGS += "-pthread"
151
150do_configure() { 152do_configure() {
151 cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/ltmain.sh ${S}/build 153 cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/ltmain.sh ${S}/build
152 rm -f ${S}/libtool 154 rm -f ${S}/libtool
@@ -165,7 +167,7 @@ LEAD_SONAME = "libldap-${LDAP_VER}.so.*"
165PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin" 167PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin"
166 168
167# Package contents - shift most standard contents to -bin 169# Package contents - shift most standard contents to -bin
168FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/openldap-data" 170FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/${BPN}/data"
169FILES_${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \ 171FILES_${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \
170 ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \ 172 ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \
171 ${sysconfdir}/openldap/DB_CONFIG.example ${systemd_unitdir}/system/*" 173 ${sysconfdir}/openldap/DB_CONFIG.example ${systemd_unitdir}/system/*"
@@ -194,6 +196,18 @@ do_install_append() {
194 install -d ${D}${systemd_unitdir}/system/ 196 install -d ${D}${systemd_unitdir}/system/
195 install -m 0644 ${WORKDIR}/slapd.service ${D}${systemd_unitdir}/system/ 197 install -m 0644 ${WORKDIR}/slapd.service ${D}${systemd_unitdir}/system/
196 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/*.service 198 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/*.service
199
200 # Uses mdm as the database
201 # and localstatedir as data directory ...
202 sed -e 's/# modulepath/modulepath/' \
203 -e 's/# moduleload\s*back_bdb.*/moduleload back_mdb/' \
204 -e 's/database\s*bdb/database mdb/' \
205 -e 's%^directory\s*.*%directory ${localstatedir}/${BPN}/data/%' \
206 -i ${D}${sysconfdir}/openldap/slapd.conf
207
208 mkdir -p ${D}${localstatedir}/${BPN}/data
209
210
197} 211}
198 212
199INITSCRIPT_PACKAGES = "${PN}-slapd" 213INITSCRIPT_PACKAGES = "${PN}-slapd"
@@ -205,8 +219,20 @@ SYSTEMD_AUTO_ENABLE_${PN}-slapd ?= "disable"
205 219
206PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*" 220PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*"
207 221
222# The modules require their .so to be dynamicaly loaded
223INSANE_SKIP_${PN}-backend-dnssrv += "dev-so"
224INSANE_SKIP_${PN}-backend-ldap += "dev-so"
225INSANE_SKIP_${PN}-backend-meta += "dev-so"
226INSANE_SKIP_${PN}-backend-mdb += "dev-so"
227INSANE_SKIP_${PN}-backend-monitor += "dev-so"
228INSANE_SKIP_${PN}-backend-null += "dev-so"
229INSANE_SKIP_${PN}-backend-passwd += "dev-so"
230INSANE_SKIP_${PN}-backend-shell += "dev-so"
231
232
208python populate_packages_prepend () { 233python populate_packages_prepend () {
209 backend_dir = d.expand('${libexecdir}/openldap') 234 backend_dir = d.expand('${libexecdir}/openldap')
235 do_split_packages(d, backend_dir, 'back_([a-z]*)\.so$', 'openldap-backend-%s', 'OpenLDAP %s backend', prepend=True, extra_depends='', allow_links=True)
210 do_split_packages(d, backend_dir, 'back_([a-z]*)\-.*\.so\..*$', 'openldap-backend-%s', 'OpenLDAP %s backend', extra_depends='', allow_links=True) 236 do_split_packages(d, backend_dir, 'back_([a-z]*)\-.*\.so\..*$', 'openldap-backend-%s', 'OpenLDAP %s backend', extra_depends='', allow_links=True)
211 237
212 metapkg = "${PN}-backends" 238 metapkg = "${PN}-backends"