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
12 PKG_RELEASE
:=$(AUTORELEASE
)
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).tgz
15 PKG_SOURCE_URL
:=https
://gpl.savoirfairelinux.net
/pub
/mirrors
/openldap
/openldap-release
/ \
16 http
://mirror.eu.oneandone.net
/software
/openldap
/openldap-release
/ \
17 http
://mirror.switch.ch
/ftp
/software
/mirror
/OpenLDAP
/openldap-release
/ \
18 https
://www.openldap.org
/software
/download
/OpenLDAP
/openldap-release
/
19 PKG_HASH
:=b71c580eac573e9aba15d95f33dd4dd08f2ed4f0d7fc09e08ad4be7ed1e41a4f
20 PKG_LICENSE
:=OLDAP-2.8
21 PKG_LICENSE_FILES
:=LICENSE
22 PKG_CPE_ID
:=cpe
:/a
:openldap
:openldap
26 # Fixes the following:
27 # libtool: Version mismatch error. This is libtool 2.4.2, but the
28 # libtool: definition of this LT_INIT comes from libtool 2.4.6.
29 # libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2
30 # libtool: and run autoconf again.
31 PKG_REMOVE_FILES
:=build
/ltversion.m4
33 PKG_CONFIG_DEPENDS
:= \
34 CONFIG_OPENLDAP_DEBUG \
35 CONFIG_OPENLDAP_CRYPT \
36 CONFIG_OPENLDAP_MONITOR \
37 CONFIG_OPENLDAP_DB47 \
40 include $(INCLUDE_DIR
)/package.mk
42 define Package
/libopenldap
/Default
46 TITLE
:=LDAP directory suite
47 URL
:=http
://www.openldap.org
/
48 MAINTAINER
:=W. Michael Petullo
<mike@flyn.org
>
51 define Package
/libopenldap
52 $(call Package
/libopenldap
/Default
)
54 DEPENDS
:=+libopenssl
+libsasl2
+libpthread
+libuuid
+OPENLDAP_DB47
:libdb47
+OPENLDAP_ICU
:icu
58 define Package
/openldap
/config
59 source
"$(SOURCE)/Config.in"
62 define Package
/libopenldap
/description
63 OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol
(LDAP
). This package contains the shared LDAP client libraries
, needed by other programs.
66 define Package
/libopenldap
/conffiles
67 /etc
/openldap
/ldap.conf
70 define Package
/openldap-utils
71 $(call Package
/libopenldap
/Default
)
76 define Package
/openldap-utils
/description
77 This package contains client programs required to access LDAP servers.
80 define Package
/openldap-server
81 $(call Package
/libopenldap
/Default
)
82 DEPENDS
:=+libopenldap
+libuuid
86 define Package
/openldap-server
/description
87 This package contains server programs required to provide LDAP services.
90 define Package
/openldap-server
/conffiles
91 /etc
/openldap
/slapd.conf
95 TARGET_CFLAGS
+= $(FPIC
) -lpthread \
96 -DURANDOM_DEVICE
=\\\"/dev
/urandom
\\\"
106 --with-yielding_select
="yes" \
111 ifdef CONFIG_OPENLDAP_CRYPT
112 CONFIGURE_ARGS
+= --enable-crypt
114 CONFIGURE_ARGS
+= --disable-crypt
117 ifdef CONFIG_OPENLDAP_MONITOR
118 CONFIGURE_ARGS
+= --enable-monitor
120 CONFIGURE_ARGS
+= --disable-monitor
123 ifdef CONFIG_OPENLDAP_DEBUG
124 CONFIGURE_ARGS
+= --enable-debug
126 CONFIGURE_ARGS
+= --disable-debug
129 ifdef CONFIG_OPENLDAP_DB47
139 ifndef CONFIG_OPENLDAP_ICU
145 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
146 DESTDIR
="$(PKG_INSTALL_DIR)" \
149 cd
$(PKG_BUILD_DIR
)/libraries
/liblmdb
&& $(MAKE
) $(CONFIGURE_VARS
)
152 define Build
/InstallDev
153 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
154 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/{lber
,ldap
}*.h
$(1)/usr
/include/
155 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{lber
,ldap
}*.
{a
,so
*} $(1)/usr
/lib
/
158 define Package
/libopenldap
/install
159 $(INSTALL_DIR
) $(1)/etc
/openldap
$(1)/usr
/lib
160 $(CP
) $(PKG_INSTALL_DIR
)/etc
/openldap
/ldap.conf
$(1)/etc
/openldap
/
161 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{lber
,ldap
}*.so.
* $(1)/usr
/lib
/
164 define Package
/openldap-utils
/install
165 $(INSTALL_DIR
) $(1)/usr
/bin
166 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ldap
* $(1)/usr
/bin
/
169 define Package
/openldap-server
/install
170 $(INSTALL_DIR
) $(1)/etc
/init.d
171 $(INSTALL_BIN
) .
/files
/ldap.init
$(1)/etc
/init.d
/ldap
172 $(INSTALL_DIR
) $(1)/etc
/openldap
/schema
173 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/openldap
/schema
/* $(1)/etc
/openldap
/schema
/
174 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/openldap
/slapd.conf
$(1)/etc
/openldap
/
175 $(INSTALL_DIR
) $(1)/usr
/sbin
176 # NB: OpenLDAP installs slapd into libexecdir, not sbindir
177 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/slapd
$(1)/usr
/sbin
/
178 $(eval SLAPTOOLS
:= slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl slapschema
)
179 for i in
$(SLAPTOOLS
); do \
180 $(LN
) .
/slapd
$(1)/usr
/sbin
/$$$$i; \
184 $(eval
$(call BuildPackage
,libopenldap
))
185 $(eval
$(call BuildPackage
,openldap-utils
))
186 $(eval
$(call BuildPackage
,openldap-server
))