anchor.diff:      install -d ${D}${systemd_unitdir}/system/
       install -m 0644 ${WORKDIR}/slapd.service ${D}${systemd_unitdir}/system/
       sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/*.service
  +
  +    # Uses mdm as the database
  +    #  and localstatedir as data directory ...
  +    sed -e 's/# modulepath/modulepath/' \
  +        -e 's/# moduleload\s*back_bdb.*/moduleload    back_mdb/' \
  +        -e 's/database\s*bdb/database        mdb/' \
  +        -e 's%^directory\s*.*%directory   ${localstatedir}/${BPN}/data/%' \
  +        -i ${D}${sysconfdir}/openldap/slapd.conf
  +
  +    mkdir -p ${D}${localstatedir}/${BPN}/data
  +
  +
   }
   
   INITSCRIPT_PACKAGES = "${PN}-slapd"
  
positive.code: 
  PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*"
  
  python populate_packages_prepend () {
      backend_dir    = d.expand('${libexecdir}/openldap')
      do_split_packages(d, backend_dir, 'back_([a-z]*)\-.*\.so\..*$', 'openldap-backend-%s', 'OpenLDAP %s backend', extra_depends='', allow_links=True)
  
      metapkg = "${PN}-backends"
  
negative.code: # it was disabled for cross-compiling.
  CPPFLAGS_append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\'"
  
  LDFLAGS += "-pthread"
  
  do_configure() {
      cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/ltmain.sh ${S}/build
      rm -f ${S}/libtool
  