#!/bin/sh COMP_NAME="openldap" COMP_SOURCES="${BUILD_ROOT}/${COMP_NAME}" function _setup_build_env { set_compiler_env cd ${COMP_SOURCES}/. CFLAGS="${_cflags} -D_REENTRANT -fPIC -DLDAP_CONNECTIONLESS -Wimplicit-function-declaration" LDFLAGS="${_ldflags}" export CFLAGS LDFLAGS } function component_configure { _setup_build_env run_autogen ${COMP_SOURCES} exit_on_error $? run_configure \ --prefix=${PREFIXDIR} \ --libdir=${PREFIXDIR}/${_lib} \ --disable-static \ --enable-shared \ --without-kerberos \ --without-cyrus-sasl \ --disable-slapd \ --disable-slurpd \ --without-tls } function component_build { _setup_build_env ${MAKE} ${_mflags} } function component_install { _setup_build_env local INSTALL_ROOT="${STAGE_COMP_DIR}/${COMP_NAME}" local INSTALL_PREFIX_DIR="${INSTALL_ROOT}/${PREFIXDIR}" local STAGING_PREFIX_DIR="${STAGE_INSTALL_DIR}/${PREFIXDIR}" [ "$INSTALL_ROOT" != "/" ] && [ -z "${BUILD_PRESERVE_STAGING}" ] && rm -rf $INSTALL_ROOT mkdir -p ${INSTALL_ROOT} mkdir -p ${STAGE_INSTALL_DIR} ${MAKE} DESTDIR=${INSTALL_ROOT} install /bin/rm -rf ${INSTALL_PREFIX_DIR}/{bin,sbin,etc,share} mkdir -m 0755 -p ${STAGING_PREFIX_DIR}/include mkdir -m 0755 -p ${STAGING_PREFIX_DIR}/${_lib} rsync -a --exclude=slapi-plugin.h ${INSTALL_PREFIX_DIR}/include/ ${STAGING_PREFIX_DIR}/include/ rsync -a ${INSTALL_PREFIX_DIR}/${_lib}/ ${STAGING_PREFIX_DIR}/${_lib}/ libtool_rewrite_staging } function component_populate { local INSTALL_ROOT="${STAGE_COMP_DIR}/${COMP_NAME}" local INSTALL_PREFIX_DIR="${INSTALL_ROOT}/${PREFIXDIR}" local STAGING_PREFIX_DIR="${STAGE_INSTALL_DIR}/${PREFIXDIR}" local STAGING_SYSCONF_DIR="${STAGE_INSTALL_DIR}/${SYSCONFDIR}" local POPULATE_DIR="$1" if [ -z "${POPULATE_DIR}" ] || [ ! -d "${POPULATE_DIR}" ]; then echo "Non-existent or invalid populate dircetory given: ${POPULATE_DIR}" return 1 fi rsync -a --exclude "include" --exclude "*.la" \ ${INSTALL_ROOT}/ ${POPULATE_DIR}/ }