#!/bin/sh
#
# Copyright 2004 Dagmar d'Surreal <rivyqntzne@tznvy.pbz>
# Available under the terms of the GNU GPL.
#

NAME="openldap"
VERSION="2.2.30"
REVISION="1"

PKG_SOURCEURL='ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/$NAME-$VERSION.tgz'
PKG_NEEDSTATIC=y
PKG_PATCH[0]="openldap-ntlm.diff"
PKG_PATCH[1]="slapdpiddirfix.diff"

. $DLG_ROOT/config
. $DLG_ROOT/SCRIPTS/dropline-functions.sh

#configfile /etc/openldap/slapd.conf
configfile /etc/openldap/ldap.conf

cflags
prepare
applypatch 0 0
applypatch 1 1
analyzesource
configure --disable-slapd --with-threads --with-tls --enable-dynamic
#	configure --enable-ldbm --enable-wrappers --enable-crypt
#		--enable-lmpasswd --disable-debug
make
makeinstall
tidydocumentation

spewdo "chmod 755 $PKG_STAGEROOT$PKG_PREFIX/lib/lib*.so.*"
spewdo "cd $PKG_STAGEROOT$PKG_PREFIX/bin ; rm ldapadd ; ln -s ldapmodify ldapadd"
analyzebinaries
finalizepackage
packagize
cleanup
