2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
15 PKG_SOURCE_URL:=ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ \
16 ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/openldap-release/ \
17 ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/ \
18 ftp://ftp.plig.org/pub/OpenLDAP/openldap-release/
19 PKG_MD5SUM:=4a6dab2711fcf141f19bb680bc335887
23 include $(INCLUDE_DIR)/package.mk
25 define Package/openldap/Default
26 TITLE:=LDAP implementation
27 URL:=http://www.openldap.org/
30 define Package/libopenldap
31 $(call Package/openldap/Default)
34 DEPENDS:=+libopenssl +libsasl2
38 define Package/libopenldap/description
39 OpenLDAP Software is an open source implementation of the
40 Lightweight Directory Access Protocol (LDAP).
41 This package contains the shared LDAP client libraries, needed by other programs.
44 define Package/libopenldap/conffiles
45 /etc/openldap/ldap.conf
48 define Package/openldap-utils
49 $(call Package/openldap/Default)
56 define Package/openldap-utils/description
57 OpenLDAP Software is an open source implementation of the
58 Lightweight Directory Access Protocol (LDAP).
59 This package contains client programs required to access LDAP servers.
62 define Package/openldap-server
63 $(call Package/openldap/Default)
66 DEPENDS:=+libopenldap +libdb47
70 define Package/openldap-server/description
71 OpenLDAP Software is an open source implementation of the
72 Lightweight Directory Access Protocol (LDAP).
73 This package contains server programs required to provide LDAP services.
76 TARGET_CFLAGS += $(FPIC)
90 --with-yielding_select="yes" \
91 --without-cyrus-sasl \
97 $(MAKE) -C $(PKG_BUILD_DIR) \
98 DESTDIR="$(PKG_INSTALL_DIR)" \
103 define Build/InstallDev
104 mkdir -p $(1)/usr/include
105 $(CP) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(1)/usr/include/
106 mkdir -p $(1)/usr/lib/
107 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(1)/usr/lib/
110 define Package/libopenldap/install
111 $(INSTALL_DIR) $(1)/etc/openldap
112 $(CP) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(1)/etc/openldap/
113 $(INSTALL_DIR) $(1)/usr/lib
114 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(1)/usr/lib/
117 define Package/openldap-utils/install
118 $(INSTALL_DIR) $(1)/usr/bin
119 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/
122 define Package/openldap-server/install
123 $(INSTALL_DIR) $(1)/etc/init.d
124 $(INSTALL_BIN) ./files/ldap.init $(1)/etc/init.d/ldap
125 $(INSTALL_DIR) $(1)/etc/openldap/schema
126 $(CP) $(PKG_INSTALL_DIR)/etc/openldap/schema/* $(1)/etc/openldap/schema/
127 $(INSTALL_DIR) $(1)/usr/sbin
128 # OpenLDAP installs slapd into libexecdir, not sbindir:
129 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/slapd $(1)/usr/sbin/
132 $(eval $(call BuildPackage,libopenldap))
133 $(eval $(call BuildPackage,openldap-utils))
134 $(eval $(call BuildPackage,openldap-server))