summaryrefslogtreecommitdiff
path: root/package/openldap
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/openldap
Initial import
Diffstat (limited to 'package/openldap')
-rw-r--r--package/openldap/Config.in33
-rw-r--r--package/openldap/Config.in.lib15
-rw-r--r--package/openldap/Makefile82
-rw-r--r--package/openldap/files/slapd.conf30
-rw-r--r--package/openldap/files/slapd.init28
-rw-r--r--package/openldap/ipkg/libopenldap.conffiles1
-rw-r--r--package/openldap/ipkg/libopenldap.control5
-rw-r--r--package/openldap/ipkg/openldap-slapd.control5
-rw-r--r--package/openldap/ipkg/openldap-slapd.postinst5
-rw-r--r--package/openldap/ipkg/openldap-utils.control5
10 files changed, 209 insertions, 0 deletions
diff --git a/package/openldap/Config.in b/package/openldap/Config.in
new file mode 100644
index 000000000..5a3c29c6e
--- /dev/null
+++ b/package/openldap/Config.in
@@ -0,0 +1,33 @@
+config ADK_COMPILE_OPENLDAP
+ prompt "openldap.......................... OpenSource LDAP software"
+ boolean
+ default n
+
+config ADK_PACKAGE_OPENLDAP_SLAPD
+ prompt "openldap-slapd.................. OpenLDAP server"
+ tristate
+ default n
+ select ADK_PACKAGE_LIBOPENLDAP
+ select ADK_PACKAGE_LIBPTHREAD
+ select ADK_PACKAGE_LIBOPENSSL
+ select ADK_PACKAGE_LIBDB
+ select ADK_PACKAGE_LIBSASL2
+ depends on ADK_COMPILE_OPENLDAP
+ help
+ http://www.openldap.org/
+
+config ADK_PACKAGE_OPENLDAP_UTILS
+ prompt "openldap-utils.................. OpenLDAP client utilities"
+ tristate
+ default n
+ select ADK_PACKAGE_LIBOPENLDAP
+ depends on ADK_COMPILE_OPENLDAP
+ help
+
+ OpenLDAP Software is an open source implementation of the
+ Lightweight Directory Access Protocol (LDAP).
+
+ http://www.openldap.org/
+
+ This package contains client programs required to access LDAP servers.
+
diff --git a/package/openldap/Config.in.lib b/package/openldap/Config.in.lib
new file mode 100644
index 000000000..6efae3dc3
--- /dev/null
+++ b/package/openldap/Config.in.lib
@@ -0,0 +1,15 @@
+config ADK_PACKAGE_LIBOPENLDAP
+ prompt "libopenldap....................... OpenLDAP client libraries"
+ tristate
+ default n
+ depends on ADK_COMPILE_OPENLDAP
+ select ADK_PACKAGE_LIBSASL2
+ help
+
+ OpenLDAP Software is an open source implementation of the
+ Lightweight Directory Access Protocol (LDAP).
+
+ http://www.openldap.org/
+
+ This package contains the shared LDAP client libraries, needed by other programs.
+
diff --git a/package/openldap/Makefile b/package/openldap/Makefile
new file mode 100644
index 000000000..358794f0f
--- /dev/null
+++ b/package/openldap/Makefile
@@ -0,0 +1,82 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= openldap
+PKG_VERSION:= 2.4.16
+PKG_RELEASE:= 1
+PKG_MD5SUM:= ed5b86e9d2b372d10edfe3bb59fee165
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz
+MASTER_SITES:= ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ \
+ ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/openldap-release/ \
+ ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/ \
+ ftp://ftp.plig.org/pub/OpenLDAP/openldap-release/
+
+PKG_CONFIGURE_OPTIONS+= \
+ --enable-slapd \
+ --enable-bdb \
+ --disable-hdb \
+ --disable-relay \
+ --enable-dynamic \
+ --enable-syslog \
+ --enable-local \
+ --disable-syncprov \
+ --disable-slurpd \
+ --without-gssapi \
+ --without-fetch \
+ --with-cyrus-sasl \
+ --with-threads \
+ --with-tls \
+ --with-yielding_select="yes" \
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,LIBOPENLDAP,libopenldap,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,OPENLDAP_UTILS,openldap-utils,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,OPENLDAP_SLAPD,openldap-slapd,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+pre-configure:
+ (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
+ CPPFLAGS=-D_GNU_SOURCE ./configure \
+ ${PKG_CONFIGURE_OPTIONS} \
+ --disable-slapd \
+ --without-cyrus-sasl \
+ --without-threads \
+ --without-tls \
+ );
+ ${MAKE} -C ${WRKBUILD} depend
+ ${MAKE} -C ${WRKBUILD}/libraries/liblutil
+ ${MAKE} -C ${WRKBUILD}/libraries/liblber
+ ${MAKE} -C ${WRKBUILD}/libraries/liblunicode
+ ${MAKE} -C ${WRKBUILD}/libraries/liblber clean
+ ${MAKE} -C ${WRKBUILD}/libraries/liblutil clean
+ ${MAKE} -C ${WRKBUILD}/libraries/liblunicode clean
+
+CONFIGURE_STYLE= gnu
+CONFIGURE_ENV+= ac_cv_func_memcmp_working=yes
+CONFIGURE_ARGS+= ${PKG_CONFIGURE_OPTIONS}
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+XAKE_FLAGS+= STRIP=""
+
+post-install:
+ ${INSTALL_DIR} ${IDIR_LIBOPENLDAP}/etc/openldap
+ ${CP} ${WRKINST}/etc/openldap/ldap.conf ${IDIR_LIBOPENLDAP}/etc/openldap/
+ ${INSTALL_DIR} ${IDIR_LIBOPENLDAP}/usr/lib/
+ ${CP} ${WRKINST}/usr/lib/lib{lber,ldap}*.so.* ${IDIR_LIBOPENLDAP}/usr/lib/
+ ${INSTALL_DIR} ${IDIR_OPENLDAP_UTILS}/usr/bin
+ ${CP} ${WRKINST}/usr/bin/ldap* ${IDIR_OPENLDAP_UTILS}/usr/bin/
+ ${INSTALL_DIR} ${IDIR_OPENLDAP_SLAPD}/etc/openldap/schema
+ ${INSTALL_DIR} ${IDIR_OPENLDAP_SLAPD}/etc/init.d
+ ${INSTALL_DIR} ${IDIR_OPENLDAP_SLAPD}/usr/sbin
+ ${CP} ${WRKINST}/usr/sbin/slap* ${IDIR_OPENLDAP_SLAPD}/usr/sbin/
+ ${INSTALL_DATA} ${WRKINST}/etc/openldap/schema/core.schema \
+ ${IDIR_OPENLDAP_SLAPD}/etc/openldap/schema
+ ${INSTALL_DATA} ./files/slapd.conf ${IDIR_OPENLDAP_SLAPD}/etc/openldap
+ ${INSTALL_DATA} ./files/slapd.init \
+ ${IDIR_OPENLDAP_SLAPD}/etc/init.d/slapd
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/openldap/files/slapd.conf b/package/openldap/files/slapd.conf
new file mode 100644
index 000000000..d458fc495
--- /dev/null
+++ b/package/openldap/files/slapd.conf
@@ -0,0 +1,30 @@
+# See slapd.conf(5) for details on configuration options.
+# This file should NOT be world readable.
+#
+include /etc/openldap/schema/core.schema
+
+pidfile /var/run/slapd.pid
+argsfile /var/run/slapd.args
+
+# Load dynamic backend modules:
+# modulepath /usr/sbin/openldap
+# moduleload back_bdb.la
+# moduleload back_hdb.la
+# moduleload back_ldap.la
+
+#######################################################################
+# BDB database definitions
+#######################################################################
+database bdb
+suffix "dc=my-domain,dc=com"
+rootdn "cn=Manager,dc=my-domain,dc=com"
+# Cleartext passwords, especially for the rootdn, should
+# be avoid. See slappasswd(8) and slapd.conf(5) for details.
+# Use of strong authentication encouraged.
+rootpw secret
+# The database directory MUST exist prior to running slapd AND
+# should only be accessible by the slapd and slap tools.
+# Mode 700 recommended.
+directory /var/openldap-data
+# Indices to maintain
+index objectClass eq
diff --git a/package/openldap/files/slapd.init b/package/openldap/files/slapd.init
new file mode 100644
index 000000000..814345c44
--- /dev/null
+++ b/package/openldap/files/slapd.init
@@ -0,0 +1,28 @@
+#!/bin/sh
+#FWINIT 70
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ [[ $slapd = NO ]] && exit 0
+ exec sh $0 start
+ ;;
+start)
+ /usr/sbin/slapd
+ ;;
+stop)
+ if [ -e /var/run/slapd.pid ]; then
+ kill $(cat /var/run/slapd.pid)
+ fi
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/openldap/ipkg/libopenldap.conffiles b/package/openldap/ipkg/libopenldap.conffiles
new file mode 100644
index 000000000..25f44c322
--- /dev/null
+++ b/package/openldap/ipkg/libopenldap.conffiles
@@ -0,0 +1 @@
+/etc/openldap/ldap.conf
diff --git a/package/openldap/ipkg/libopenldap.control b/package/openldap/ipkg/libopenldap.control
new file mode 100644
index 000000000..84b145f58
--- /dev/null
+++ b/package/openldap/ipkg/libopenldap.control
@@ -0,0 +1,5 @@
+Package: libopenldap
+Priority: optional
+Section: libs
+Description: OpenLDAP (Lightweight Directory Access Protocol) client libraries
+Depends: libopenssl, libsasl2
diff --git a/package/openldap/ipkg/openldap-slapd.control b/package/openldap/ipkg/openldap-slapd.control
new file mode 100644
index 000000000..c5b9e12d4
--- /dev/null
+++ b/package/openldap/ipkg/openldap-slapd.control
@@ -0,0 +1,5 @@
+Package: openldap-slapd
+Priority: optional
+Section: admin
+Description: OpenLDAP server
+Depends: libopenldap, libopenssl, libsasl2, libdb, libpthread
diff --git a/package/openldap/ipkg/openldap-slapd.postinst b/package/openldap/ipkg/openldap-slapd.postinst
new file mode 100644
index 000000000..d6ecee377
--- /dev/null
+++ b/package/openldap/ipkg/openldap-slapd.postinst
@@ -0,0 +1,5 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_user slapd $(get_next_uid) $(get_next_gid) /var/run/slapd
+add_group slapd $(get_next_gid)
+add_rcconf 'use "YES" to enable' slapd NO
diff --git a/package/openldap/ipkg/openldap-utils.control b/package/openldap/ipkg/openldap-utils.control
new file mode 100644
index 000000000..3a515c69f
--- /dev/null
+++ b/package/openldap/ipkg/openldap-utils.control
@@ -0,0 +1,5 @@
+Package: openldap-utils
+Priority: optional
+Section: admin
+Description: OpenLDAP (Lightweight Directory Access Protocol) client utilities
+Depends: libopenldap, libopenssl, libsasl2