Lines 370-393
Link Here
|
370 |
} |
370 |
} |
371 |
|
371 |
|
372 |
build_contrib_module() { |
372 |
build_contrib_module() { |
373 |
# <dir> <sources> <outputname> |
373 |
# <dir> [<target>] |
374 |
cd "${S}/contrib/slapd-modules/$1" || die |
374 |
cd "${S}/contrib/slapd-modules/$1" || die |
375 |
einfo "Compiling contrib-module: $3" |
375 |
einfo "Compiling contrib-module: $1" |
376 |
# Make sure it's uppercase |
376 |
local target="${2:-all}" |
377 |
local define_name="$(echo "SLAPD_OVER_${1}" | LC_ALL=C tr '[:lower:]' '[:upper:]')" |
377 |
emake \ |
378 |
"${lt}" --mode=compile --tag=CC \ |
378 |
LDAP_BUILD="${BUILD_DIR}" prefix="${EPREFIX}/usr" \ |
379 |
"${CC}" \ |
379 |
CC="${CC}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" \ |
380 |
-D${define_name}=SLAPD_MOD_DYNAMIC \ |
380 |
"$target" |
381 |
-I"${BUILD_DIR}"/include \ |
|
|
382 |
-I../../../include -I../../../servers/slapd ${CFLAGS} \ |
383 |
-o ${2%.c}.lo -c $2 || die "compiling $3 failed" |
384 |
einfo "Linking contrib-module: $3" |
385 |
"${lt}" --mode=link --tag=CC \ |
386 |
"${CC}" -module \ |
387 |
${CFLAGS} \ |
388 |
${LDFLAGS} \ |
389 |
-rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ |
390 |
-o $3.la ${2%.c}.lo || die "linking $3 failed" |
391 |
} |
381 |
} |
392 |
|
382 |
|
393 |
src_configure() { |
383 |
src_configure() { |
Lines 575-692
Link Here
|
575 |
|
565 |
|
576 |
emake \ |
566 |
emake \ |
577 |
LDAP_BUILD="${BUILD_DIR}" \ |
567 |
LDAP_BUILD="${BUILD_DIR}" \ |
578 |
CC="${CC}" libexecdir="/usr/$(get_libdir)/openldap" |
568 |
CC="${CC}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" |
579 |
fi |
569 |
fi |
580 |
|
570 |
|
581 |
if use kerberos ; then |
571 |
if use kerberos ; then |
582 |
if use kinit ; then |
572 |
if use kinit ; then |
583 |
build_contrib_module "kinit" "kinit.c" "kinit" |
573 |
build_contrib_module "kinit" |
584 |
fi |
574 |
fi |
585 |
cd "${S}/contrib/slapd-modules/passwd" || die |
575 |
build_contrib_module "passwd" "pw-kerberos.la" |
586 |
einfo "Compiling contrib-module: pw-kerberos" |
|
|
587 |
"${lt}" --mode=compile --tag=CC \ |
588 |
"${CC}" \ |
589 |
-I"${BUILD_DIR}"/include \ |
590 |
-I../../../include \ |
591 |
${CFLAGS} \ |
592 |
$(krb5-config --cflags) \ |
593 |
-DHAVE_KRB5 \ |
594 |
-o kerberos.lo \ |
595 |
-c kerberos.c || die "compiling pw-kerberos failed" |
596 |
einfo "Linking contrib-module: pw-kerberos" |
597 |
"${lt}" --mode=link --tag=CC \ |
598 |
"${CC}" -module \ |
599 |
${CFLAGS} \ |
600 |
${LDFLAGS} \ |
601 |
-rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ |
602 |
-o pw-kerberos.la \ |
603 |
kerberos.lo || die "linking pw-kerberos failed" |
604 |
fi |
576 |
fi |
605 |
|
577 |
|
606 |
if use pbkdf2; then |
578 |
if use pbkdf2; then |
607 |
cd "${S}/contrib/slapd-modules/passwd/pbkdf2" || die |
579 |
build_contrib_module "passwd/pbkdf2" |
608 |
einfo "Compiling contrib-module: pw-pbkdf2" |
|
|
609 |
"${lt}" --mode=compile --tag=CC \ |
610 |
"${CC}" \ |
611 |
-I"${BUILD_DIR}"/include \ |
612 |
-I../../../../include \ |
613 |
${CFLAGS} \ |
614 |
-o pbkdf2.lo \ |
615 |
-c pw-pbkdf2.c || die "compiling pw-pbkdf2 failed" |
616 |
einfo "Linking contrib-module: pw-pbkdf2" |
617 |
"${lt}" --mode=link --tag=CC \ |
618 |
"${CC}" -module \ |
619 |
${CFLAGS} \ |
620 |
${LDFLAGS} \ |
621 |
-rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ |
622 |
-o pw-pbkdf2.la \ |
623 |
pbkdf2.lo || die "linking pw-pbkdf2 failed" |
624 |
fi |
580 |
fi |
625 |
|
581 |
|
626 |
if use sha2 ; then |
582 |
if use sha2 ; then |
627 |
cd "${S}/contrib/slapd-modules/passwd/sha2" || die |
583 |
build_contrib_module "passwd/sha2" |
628 |
einfo "Compiling contrib-module: pw-sha2" |
|
|
629 |
"${lt}" --mode=compile --tag=CC \ |
630 |
"${CC}" \ |
631 |
-I"${BUILD_DIR}"/include \ |
632 |
-I../../../../include \ |
633 |
${CFLAGS} \ |
634 |
-o sha2.lo \ |
635 |
-c sha2.c || die "compiling pw-sha2 failed" |
636 |
"${lt}" --mode=compile --tag=CC \ |
637 |
"${CC}" \ |
638 |
-I"${BUILD_DIR}"/include \ |
639 |
-I../../../../include \ |
640 |
${CFLAGS} \ |
641 |
-o slapd-sha2.lo \ |
642 |
-c slapd-sha2.c || die "compiling pw-sha2 failed" |
643 |
einfo "Linking contrib-module: pw-sha2" |
644 |
"${lt}" --mode=link --tag=CC \ |
645 |
"${CC}" -module \ |
646 |
${CFLAGS} \ |
647 |
${LDFLAGS} \ |
648 |
-rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ |
649 |
-o pw-sha2.la \ |
650 |
sha2.lo slapd-sha2.lo || die "linking pw-sha2 failed" |
651 |
fi |
584 |
fi |
652 |
|
585 |
|
653 |
# We could build pw-radius if GNURadius would install radlib.h |
586 |
build_contrib_module "passwd" "pw-netscape.la" |
654 |
cd "${S}/contrib/slapd-modules/passwd" || die |
587 |
#build_contrib_module "acl" # example code only |
655 |
einfo "Compiling contrib-module: pw-netscape" |
588 |
#build_contrib_module "acl" # example code only, also needs kerberos |
656 |
"${lt}" --mode=compile --tag=CC \ |
589 |
build_contrib_module "addpartial" |
657 |
"${CC}" \ |
590 |
build_contrib_module "allop" |
658 |
-I"${BUILD_DIR}"/include \ |
591 |
build_contrib_module "allowed" |
659 |
-I../../../include \ |
592 |
build_contrib_module "autogroup" |
660 |
${CFLAGS} \ |
593 |
build_contrib_module "cloak" |
661 |
-o netscape.lo \ |
594 |
# build_contrib_module "comp_match" # really complex, adds new external deps, questionable demand |
662 |
-c netscape.c || die "compiling pw-netscape failed" |
595 |
build_contrib_module "denyop" |
663 |
einfo "Linking contrib-module: pw-netscape" |
596 |
build_contrib_module "dsaschema" |
664 |
"${lt}" --mode=link --tag=CC \ |
597 |
build_contrib_module "dupent" |
665 |
"${CC}" -module \ |
598 |
build_contrib_module "lastbind" |
666 |
${CFLAGS} \ |
|
|
667 |
${LDFLAGS} \ |
668 |
-rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ |
669 |
-o pw-netscape.la \ |
670 |
netscape.lo || die "linking pw-netscape failed" |
671 |
|
672 |
#build_contrib_module "acl" "posixgroup.c" "posixGroup" # example code only |
673 |
#build_contrib_module "acl" "gssacl.c" "gss" # example code only, also needs kerberos |
674 |
build_contrib_module "addpartial" "addpartial-overlay.c" "addpartial-overlay" |
675 |
build_contrib_module "allop" "allop.c" "overlay-allop" |
676 |
build_contrib_module "allowed" "allowed.c" "allowed" |
677 |
build_contrib_module "autogroup" "autogroup.c" "autogroup" |
678 |
build_contrib_module "cloak" "cloak.c" "cloak" |
679 |
# build_contrib_module "comp_match" "comp_match.c" "comp_match" # really complex, adds new external deps, questionable demand |
680 |
build_contrib_module "denyop" "denyop.c" "denyop-overlay" |
681 |
build_contrib_module "dsaschema" "dsaschema.c" "dsaschema-plugin" |
682 |
build_contrib_module "dupent" "dupent.c" "dupent" |
683 |
build_contrib_module "lastbind" "lastbind.c" "lastbind" |
684 |
# lastmod may not play well with other overlays |
599 |
# lastmod may not play well with other overlays |
685 |
build_contrib_module "lastmod" "lastmod.c" "lastmod" |
600 |
build_contrib_module "lastmod" |
686 |
build_contrib_module "noopsrch" "noopsrch.c" "noopsrch" |
601 |
build_contrib_module "noopsrch" |
687 |
build_contrib_module "nops" "nops.c" "nops-overlay" |
602 |
build_contrib_module "nops" |
688 |
#build_contrib_module "nssov" "nssov.c" "nssov-overlay" RESO:LATER |
603 |
#build_contrib_module "nssov" RESO:LATER |
689 |
build_contrib_module "trace" "trace.c" "trace" |
604 |
build_contrib_module "trace" |
690 |
# build slapi-plugins |
605 |
# build slapi-plugins |
691 |
cd "${S}/contrib/slapi-plugins/addrdnvalues" || die |
606 |
cd "${S}/contrib/slapi-plugins/addrdnvalues" || die |
692 |
einfo "Building contrib-module: addrdnvalues plugin" |
607 |
einfo "Building contrib-module: addrdnvalues plugin" |