[packages] openldap: remove dependency on db74 (#6476)
[openwrt/svn-archive/archive.git] / libs / openldap / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=openldap
11 PKG_VERSION:=2.4.19
12 PKG_RELEASE:=1
13
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
20
21 PKG_FIXUP = libtool
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/openldap/Default
26 TITLE:=LDAP implementation
27 URL:=http://www.openldap.org/
28 endef
29
30 define Package/libopenldap
31 $(call Package/openldap/Default)
32 SECTION:=libs
33 CATEGORY:=Libraries
34 DEPENDS:=+libopenssl +libsasl2
35 TITLE+= (libraries)
36 endef
37
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.
42 endef
43
44 define Package/libopenldap/conffiles
45 /etc/openldap/ldap.conf
46 endef
47
48 define Package/openldap-utils
49 $(call Package/openldap/Default)
50 SECTION:=utils
51 CATEGORY:=Utilities
52 DEPENDS:=+libopenldap
53 TITLE+= (utilities)
54 endef
55
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.
60 endef
61
62 define Package/openldap-server
63 $(call Package/openldap/Default)
64 SECTION:=net
65 CATEGORY:=Network
66 DEPENDS:=+libopenldap
67 TITLE+= (server)
68 endef
69
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.
74 endef
75
76 TARGET_CFLAGS += $(FPIC)
77
78 CONFIGURE_ARGS += \
79 --enable-shared \
80 --enable-static \
81 --disable-debug \
82 --enable-dynamic \
83 --enable-syslog \
84 --disable-local \
85 --disable-slurpd \
86 --with-cyrus-sasl \
87 --without-fetch \
88 --with-threads \
89 --with-tls \
90 --with-yielding_select="yes" \
91 --without-cyrus-sasl \
92 --without-threads \
93 --without-tls \
94 --enable-null \
95 --disable-bdb \
96 --disable-hdb \
97 --disable-monitor \
98 --disable-relay
99
100 define Build/Compile
101 $(MAKE) -C $(PKG_BUILD_DIR) \
102 DESTDIR="$(PKG_INSTALL_DIR)" \
103 HOSTCC="$(HOSTCC)" \
104 depend all install
105 endef
106
107 define Build/InstallDev
108 $(INSTALL_DIR) $(1)/usr/include
109 $(CP) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(1)/usr/include/
110 $(INSTALL_DIR) $(1)/usr/lib/
111 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(1)/usr/lib/
112 endef
113
114 define Package/libopenldap/install
115 $(INSTALL_DIR) $(1)/etc/openldap
116 $(CP) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(1)/etc/openldap/
117 $(INSTALL_DIR) $(1)/usr/lib
118 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(1)/usr/lib/
119 endef
120
121 define Package/openldap-utils/install
122 $(INSTALL_DIR) $(1)/usr/bin
123 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/
124 endef
125
126 define Package/openldap-server/install
127 $(INSTALL_DIR) $(1)/etc/init.d
128 $(INSTALL_BIN) ./files/ldap.init $(1)/etc/init.d/ldap
129 $(INSTALL_DIR) $(1)/etc/openldap/schema
130 $(CP) $(PKG_INSTALL_DIR)/etc/openldap/schema/* $(1)/etc/openldap/schema/
131 $(INSTALL_DIR) $(1)/usr/sbin
132 # OpenLDAP installs slapd into libexecdir, not sbindir:
133 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/slapd $(1)/usr/sbin/
134 endef
135
136 $(eval $(call BuildPackage,libopenldap))
137 $(eval $(call BuildPackage,openldap-utils))
138 $(eval $(call BuildPackage,openldap-server))