20421c24b0c75dcfd320b980f01ff8ecba9f78e5
[packages.git] / libs / openldap / Makefile
1
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=openldap
12 PKG_VERSION:=2.2.29
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
16 PKG_SOURCE_URL:=ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ \
17         ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/openldap-release/ \
18         ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/ \
19         ftp://ftp.plig.org/pub/OpenLDAP/openldap-release/
20 PKG_MD5SUM:=6c4c72a1336aa45b463e738034c078d6
21
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/openldap/Default
28   TITLE:=LDAP implementation
29   URL:=http://www.openldap.org/
30 endef
31
32 define Package/libopenldap
33   $(call Package/openldap/Default)
34   SECTION:=libs
35   CATEGORY:=Libraries
36   DEPENDS:=+libopenssl +libsasl2
37   TITLE+= (libraries)
38 endef
39
40 define Package/libopenldap/description
41 =
42         OpenLDAP Software is an open source implementation of the 
43         Lightweight Directory Access Protocol (LDAP).   
44         This package contains the shared LDAP client libraries, needed by other programs.
45 endef
46
47 define Package/libopenldap/conffiles
48 /etc/openldap/ldap.conf
49 endef
50
51 define Package/openldap-utils
52   $(call Package/openldap/Default)
53   SECTION:=utils
54   CATEGORY:=Utilities
55   DEPENDS:=+libopenldap
56   TITLE+= (utilities)
57 endef
58
59 define Package/openldap-utils/description
60 =
61         OpenLDAP Software is an open source implementation of the 
62         Lightweight Directory Access Protocol (LDAP).   
63         This package contains client programs required to access LDAP servers.
64 endef
65
66 CONFIGURE_ARGS += \
67         --enable-shared \
68         --enable-static \
69         --disable-debug \
70         --enable-dynamic \
71         --enable-syslog \
72         --disable-local \
73         --disable-slapd \
74         --disable-slurpd \
75         --with-cyrus-sasl \
76         --without-fetch \
77         --with-threads \
78         --with-tls \
79         --with-yielding_select="yes" \
80         --without-cyrus-sasl \
81         --without-threads \
82         --without-tls 
83
84
85 define Build/Compile
86         $(MAKE) -C $(PKG_BUILD_DIR) \
87                 DESTDIR="$(PKG_INSTALL_DIR)" \
88                 HOSTCC="$(HOSTCC)" \
89                 depend all install
90 endef
91
92 define Build/InstallDev
93         mkdir -p $(1)/usr/include
94         $(CP) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(1)/usr/include/
95         mkdir -p $(1)/usr/lib/
96         $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(1)/usr/lib/
97 endef
98         
99 define Build/UninstallDev
100         rm -rf  $(STAGING_DIR)/usr/include/{lber,ldap}*.h \
101                 $(STAGING_DIR)/usr/lib/lib{lber,ldap}*.{a,so*}
102 endef
103
104 define Package/libopenldap/install
105         $(INSTALL_DIR) $(1)/etc/openldap
106         $(CP) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(1)/etc/openldap/
107         $(INSTALL_DIR) $(1)/usr/lib
108         $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(1)/usr/lib/
109         $(INSTALL_DIR) $(1)/usr/share/openldap
110         $(CP) $(PKG_INSTALL_DIR)/usr/share/openldap/* $(1)/usr/share/openldap/
111 endef
112         
113 define Package/openldap-utils/install
114         $(INSTALL_DIR) $(1)/usr/bin
115         $(CP) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/
116 endef
117
118 $(eval $(call BuildPackage,libopenldap))
119 $(eval $(call BuildPackage,openldap-utils))