2006-05-15 21:01:23 +02:00
|
|
|
# $NetBSD: Makefile,v 1.112 2006/05/15 19:01:23 ghen Exp $
|
1999-01-07 17:49:08 +01:00
|
|
|
|
2006-05-15 21:01:23 +02:00
|
|
|
DISTNAME= openldap-2.3.21
|
2004-12-14 10:08:37 +01:00
|
|
|
SVR4_PKGNAME= oldap
|
|
|
|
CATEGORIES= databases
|
|
|
|
MASTER_SITES= ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/
|
|
|
|
EXTRACT_SUFX= .tgz
|
1999-01-07 17:49:08 +01:00
|
|
|
|
2006-03-14 17:23:46 +01:00
|
|
|
MAINTAINER= joerg@NetBSD.org
|
2004-12-14 10:08:37 +01:00
|
|
|
HOMEPAGE= http://www.OpenLDAP.org/
|
2005-10-26 17:08:13 +02:00
|
|
|
COMMENT= Lightweight Directory Access Protocol server and client
|
1999-01-07 17:49:08 +01:00
|
|
|
|
2003-09-29 19:01:24 +02:00
|
|
|
CONFLICTS+= ldapsdk-[0-9]*
|
1999-05-18 23:27:01 +02:00
|
|
|
|
2004-01-09 21:43:02 +01:00
|
|
|
PKG_INSTALLATION_TYPES= overwrite pkgviews
|
|
|
|
|
2004-07-24 05:32:24 +02:00
|
|
|
USE_LIBTOOL= yes
|
2005-01-06 12:10:55 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2003-02-17 16:27:58 +01:00
|
|
|
TEST_TARGET= test
|
1999-05-04 02:08:43 +02:00
|
|
|
|
2005-12-05 21:49:47 +01:00
|
|
|
MAKE_ENV+= LIBMODE=${LIBMODE:Q}
|
2004-07-24 05:32:24 +02:00
|
|
|
OPENLDAP_ETCDIR= ${PKG_SYSCONFDIR}/openldap
|
|
|
|
OPENLDAP_MODULEDIR= ${PREFIX}/lib/openldap
|
|
|
|
OPENLDAP_VARDIR= ${VARBASE}/openldap
|
2005-08-01 11:49:37 +02:00
|
|
|
FILES_SUBST+= OPENLDAP_ETCDIR=${OPENLDAP_ETCDIR:Q}
|
2004-03-12 04:15:18 +01:00
|
|
|
|
2004-07-24 05:32:24 +02:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
2004-08-05 05:04:33 +02:00
|
|
|
.include "options.mk"
|
2004-07-24 05:32:24 +02:00
|
|
|
|
2006-04-07 02:35:02 +02:00
|
|
|
# the internal avl_* prototypes conflict with those in <sys/avl.h> which
|
|
|
|
# is included by another system header file on Solaris, so subst them.
|
|
|
|
.if ${OPSYS} == "SunOS"
|
|
|
|
SUBST_CLASSES+= conflict
|
|
|
|
SUBST_STAGE.conflict= post-patch
|
|
|
|
SUBST_FILES.conflict= ${WRKSRC}/*/*.h
|
|
|
|
SUBST_FILES.conflict+= ${WRKSRC}/*/*/*.c ${WRKSRC}/*/*/*/*.c
|
|
|
|
SUBST_SED.conflict+= -e 's,avl_free,openldap_avl_free,g'
|
|
|
|
SUBST_SED.conflict+= -e 's,avl_insert,openldap_avl_insert,g'
|
|
|
|
SUBST_SED.conflict+= -e 's,avl_delete,openldap_avl_delete,g'
|
|
|
|
SUBST_SED.conflict+= -e 's,avl_find,openldap_avl_find,g'
|
|
|
|
SUBST_SED.conflict+= -e 's,avl_find2,openldap_avl_find2,g'
|
|
|
|
SUBST_MESSAGE.conflict= Fixing conflicting function prototypes.
|
|
|
|
.endif
|
|
|
|
|
2004-07-24 05:32:24 +02:00
|
|
|
CPPFLAGS.Darwin+= -DBIND_8_COMPAT
|
2003-09-29 19:01:24 +02:00
|
|
|
|
2005-08-01 11:49:37 +02:00
|
|
|
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
|
|
|
|
CONFIGURE_ARGS+= --localstatedir=${OPENLDAP_VARDIR:Q}
|
2004-02-21 02:55:14 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-dynamic # link servers against shared libs
|
2001-10-26 15:41:27 +02:00
|
|
|
CONFIGURE_ARGS+= --with-tls=openssl
|
2001-09-14 04:39:07 +02:00
|
|
|
|
2004-07-24 05:32:24 +02:00
|
|
|
# SLAPD options
|
|
|
|
CONFIGURE_ARGS+= --enable-crypt
|
2004-07-30 23:05:41 +02:00
|
|
|
.if !empty(PKG_OPTIONS:Msasl)
|
2002-02-01 19:32:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-spasswd
|
|
|
|
.endif
|
2004-07-24 05:32:24 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-wrappers
|
2002-02-01 19:32:34 +01:00
|
|
|
|
2005-10-26 17:08:13 +02:00
|
|
|
# SLAPD backends
|
|
|
|
CONFIGURE_ARGS+= --enable-dnssrv
|
|
|
|
CONFIGURE_ARGS+= --enable-ldap
|
|
|
|
CONFIGURE_ARGS+= --enable-ldbm
|
|
|
|
CONFIGURE_ARGS+= --enable-meta
|
|
|
|
CONFIGURE_ARGS+= --enable-monitor
|
|
|
|
CONFIGURE_ARGS+= --enable-null
|
|
|
|
CONFIGURE_ARGS+= --enable-passwd
|
|
|
|
CONFIGURE_ARGS+= --enable-shell
|
|
|
|
|
|
|
|
# SLAPD (stackable) overlays
|
|
|
|
CONFIGURE_ARGS+= --enable-overlays
|
1999-01-07 17:49:08 +01:00
|
|
|
|
2004-07-24 05:32:24 +02:00
|
|
|
OPENLDAP_FILEPERMS= ${ROOT_USER} ${ROOT_GROUP} 0600
|
|
|
|
OPENLDAP_DIRPERMS= ${ROOT_USER} ${ROOT_GROUP} 0700
|
2001-12-31 09:36:09 +01:00
|
|
|
|
2004-07-24 05:32:24 +02:00
|
|
|
EGDIR= ${PREFIX}/share/examples/openldap
|
|
|
|
MAKE_DIRS= ${OPENLDAP_ETCDIR} ${OPENLDAP_ETCDIR}/schema
|
|
|
|
OWN_DIRS= ${OPENLDAP_VARDIR} ${OPENLDAP_VARDIR}/run
|
|
|
|
OWN_DIRS_PERMS= ${OPENLDAP_VARDIR}/openldap-data ${OPENLDAP_DIRPERMS}
|
|
|
|
OWN_DIRS_PERMS+= ${OPENLDAP_VARDIR}/openldap-slurp ${OPENLDAP_DIRPERMS}
|
|
|
|
|
2005-08-01 11:49:37 +02:00
|
|
|
CNFS= ldap.conf ${CNFS_SCHEMAS_cmd:sh}
|
2005-10-26 17:08:13 +02:00
|
|
|
CNFS_SCHEMAS_cmd= ${SED} -ne "/\.ldif$$/p;/\.schema$$/p" ${PKGDIR}/PLIST | ${SED} -e "s|share/examples/openldap/||"
|
2004-07-24 05:32:24 +02:00
|
|
|
CNFS_PERMS= slapd.conf
|
2001-12-31 09:36:09 +01:00
|
|
|
|
|
|
|
CONF_FILES= # empty
|
|
|
|
CONF_FILES_PERMS= # empty
|
|
|
|
.for FILE in ${CNFS}
|
2004-07-24 05:32:24 +02:00
|
|
|
CONF_FILES+= ${EGDIR}/${FILE} ${OPENLDAP_ETCDIR}/${FILE}
|
2001-12-31 09:36:09 +01:00
|
|
|
.endfor
|
|
|
|
.for FILE in ${CNFS_PERMS}
|
2004-07-24 05:32:24 +02:00
|
|
|
CONF_FILES_PERMS+= ${EGDIR}/${FILE} ${OPENLDAP_ETCDIR}/${FILE} \
|
|
|
|
${OPENLDAP_FILEPERMS}
|
2001-12-31 09:36:09 +01:00
|
|
|
.endfor
|
2005-10-26 17:08:13 +02:00
|
|
|
CONF_FILES_PERMS+= ${EGDIR}/DB_CONFIG \
|
|
|
|
${OPENLDAP_VARDIR}/openldap-data/DB_CONFIG \
|
|
|
|
${OPENLDAP_FILEPERMS}
|
2004-02-19 15:42:39 +01:00
|
|
|
RCD_SCRIPTS= slapd
|
|
|
|
|
2005-08-01 11:49:37 +02:00
|
|
|
PTHREAD_OPTS+= require
|
2001-12-31 09:36:09 +01:00
|
|
|
|
2004-01-09 21:43:02 +01:00
|
|
|
.include "../../security/openssl/buildlink3.mk"
|
|
|
|
.include "../../security/tcp_wrappers/buildlink3.mk"
|
|
|
|
.include "../../mk/pthread.buildlink3.mk"
|
2002-08-01 07:48:00 +02:00
|
|
|
|
2004-02-14 12:31:50 +01:00
|
|
|
.if ${PTHREAD_TYPE} == "native"
|
2002-08-01 07:48:00 +02:00
|
|
|
CONFIGURE_ARGS+= --with-threads
|
2004-02-14 12:31:50 +01:00
|
|
|
.elif ${PTHREAD_TYPE} == "pth"
|
|
|
|
CONFIGURE_ARGS+= --with-threads=pth
|
2005-12-21 04:54:23 +01:00
|
|
|
#
|
|
|
|
# Don't use a larger FD_SETSIZE than GNU Pth can handle (value taken from
|
|
|
|
# pth.h header).
|
|
|
|
#
|
|
|
|
PTH_FDSETSIZE_cmd= \
|
|
|
|
if ${TEST} -f ${BUILDLINK_PREFIX.pth:Q}/include/pth.h; then \
|
|
|
|
${AWK} '/if FD_SETSIZE >/ { print $$4 }' \
|
|
|
|
${BUILDLINK_PREFIX.pth}/include/pth.h; \
|
|
|
|
else \
|
|
|
|
${ECHO} 0; \
|
|
|
|
fi
|
|
|
|
CPPFLAGS+= -DOPENLDAP_FD_SETSIZE=${PTH_FDSETSIZE_cmd:sh:Q}
|
2002-08-01 07:48:00 +02:00
|
|
|
.endif
|
2005-08-01 11:49:37 +02:00
|
|
|
RCD_SCRIPTS+= slurpd
|
|
|
|
|
|
|
|
MAKE_FLAGS+= moduledir=${OPENLDAP_MODULEDIR:Q}
|
|
|
|
INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} sysconfdir=${EGDIR:Q}
|
2002-08-01 07:48:00 +02:00
|
|
|
|
2005-08-01 11:49:37 +02:00
|
|
|
# Set the correct file modes for the example config files.
|
|
|
|
post-install:
|
|
|
|
.for _file_ in ${CNFS} ${CNFS_PERMS}
|
|
|
|
${CHMOD} ${SHAREMODE} ${EGDIR}/${_file_}
|
2005-08-19 21:59:59 +02:00
|
|
|
${RM} -f ${EGDIR}/${_file_}.default
|
2005-08-01 11:49:37 +02:00
|
|
|
.endfor
|
2005-10-26 17:08:13 +02:00
|
|
|
${CHMOD} ${SHAREMODE} ${EGDIR}/DB_CONFIG
|
2004-02-14 12:31:50 +01:00
|
|
|
|
1999-01-07 17:49:08 +01:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|