diff options
author | Bruno Vernay <brunovern.a@gmail.com> | 2016-01-23 22:31:31 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-02-01 15:58:05 +0100 |
commit | f3b3c1fdd88f3084c3cea11cd39e86216ba93218 (patch) | |
tree | c91be8aec9f5ae7ac03bd8521a8c4844c249cb32 | |
parent | 350ad5dd558dc7d4e6d1cb7cf1a55a58d4036924 (diff) | |
download | meta-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.bb | 28 |
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. |
148 | CPPFLAGS_append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\'" | 148 | CPPFLAGS_append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\'" |
149 | 149 | ||
150 | LDFLAGS += "-pthread" | ||
151 | |||
150 | do_configure() { | 152 | do_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.*" | |||
165 | PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin" | 167 | PACKAGES += "${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 |
168 | FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/openldap-data" | 170 | FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/${BPN}/data" |
169 | FILES_${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \ | 171 | FILES_${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 | ||
199 | INITSCRIPT_PACKAGES = "${PN}-slapd" | 213 | INITSCRIPT_PACKAGES = "${PN}-slapd" |
@@ -205,8 +219,20 @@ SYSTEMD_AUTO_ENABLE_${PN}-slapd ?= "disable" | |||
205 | 219 | ||
206 | PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*" | 220 | PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*" |
207 | 221 | ||
222 | # The modules require their .so to be dynamicaly loaded | ||
223 | INSANE_SKIP_${PN}-backend-dnssrv += "dev-so" | ||
224 | INSANE_SKIP_${PN}-backend-ldap += "dev-so" | ||
225 | INSANE_SKIP_${PN}-backend-meta += "dev-so" | ||
226 | INSANE_SKIP_${PN}-backend-mdb += "dev-so" | ||
227 | INSANE_SKIP_${PN}-backend-monitor += "dev-so" | ||
228 | INSANE_SKIP_${PN}-backend-null += "dev-so" | ||
229 | INSANE_SKIP_${PN}-backend-passwd += "dev-so" | ||
230 | INSANE_SKIP_${PN}-backend-shell += "dev-so" | ||
231 | |||
232 | |||
208 | python populate_packages_prepend () { | 233 | python 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" |