2 # Copyright (C) 2006-2015 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_HASH
:=cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/openldap
/Default
26 TITLE
:=LDAP implementation
27 URL
:=http
://www.openldap.org
/
28 MAINTAINER
:=W. Michael Petullo
<mike@flyn.org
>
31 define Package
/openldap
/Default
/description
32 OpenLDAP Software is an open source implementation of the
33 Lightweight Directory Access Protocol
(LDAP
).
36 define Package
/libopenldap
37 $(call Package
/openldap
/Default
)
40 DEPENDS
:=+libopenssl
+libsasl2
+libpthread
44 define Package
/libopenldap
/description
45 $(call Package
/openldap
/Default
/description
)
46 This package contains the shared LDAP client libraries
, needed by other programs.
49 define Package
/libopenldap
/conffiles
50 /etc
/openldap
/ldap.conf
53 define Package
/openldap-utils
54 $(call Package
/openldap
/Default
)
61 define Package
/openldap-utils
/description
62 $(call Package
/openldap
/Default
/description
)
63 This package contains client programs required to access LDAP servers.
66 define Package
/openldap-server
67 $(call Package
/openldap
/Default
)
70 DEPENDS
:=+libopenldap
+libuuid
74 define Package
/openldap-server
/description
75 $(call Package
/openldap
/Default
/description
)
76 This package contains server programs required to provide LDAP services.
79 define Package
/openldap-server
/conffiles
80 /etc
/openldap
/slapd.conf
83 TARGET_CFLAGS
+= $(FPIC
) -lpthread
97 --with-yielding_select
="yes" \
109 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
110 DESTDIR
="$(PKG_INSTALL_DIR)" \
115 define Build
/InstallDev
116 $(INSTALL_DIR
) $(1)/usr
/include
117 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/include/{lber
,ldap
}*.h
$(1)/usr
/include/
118 $(INSTALL_DIR
) $(1)/usr
/lib
/
119 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{lber
,ldap
}*.
{a
,so
*} $(1)/usr
/lib
/
122 define Package
/libopenldap
/install
123 $(INSTALL_DIR
) $(1)/etc
/openldap
124 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/openldap
/ldap.conf
$(1)/etc
/openldap
/
125 $(INSTALL_DIR
) $(1)/usr
/lib
126 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{lber
,ldap
}*.so.
* $(1)/usr
/lib
/
129 define Package
/openldap-utils
/install
130 $(INSTALL_DIR
) $(1)/usr
/bin
131 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ldap
* $(1)/usr
/bin
/
134 define Package
/openldap-server
/install
135 $(INSTALL_DIR
) $(1)/etc
/init.d
136 $(INSTALL_BIN
) .
/files
/ldap.init
$(1)/etc
/init.d
/ldap
137 $(INSTALL_DIR
) $(1)/etc
/openldap
/schema
138 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/openldap
/schema
/* $(1)/etc
/openldap
/schema
/
139 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/openldap
/slapd.conf
$(1)/etc
/openldap
/
140 $(INSTALL_DIR
) $(1)/usr
/sbin
141 # XXX: OpenLDAP installs slapd into libexecdir, not sbindir:
142 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/slapd
$(1)/usr
/sbin
/
143 # XXX: switch default backend to ldif, since bdb is disabled
144 $(SED
) 's|^\(database\)\([ \t]\+\)bdb|\1\2ldif|g' \
145 -e
's|^\(index\)|#\1|g' \
146 $(1)/etc
/openldap
/slapd.conf
149 $(eval
$(call BuildPackage
,libopenldap
))
150 $(eval
$(call BuildPackage
,openldap-utils
))
151 $(eval
$(call BuildPackage
,openldap-server
))