[package] openldap, update to 2.4.19, package slapd, cleanup makefile
[openwrt/svn-archive/archive.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
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 +db47
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
95
96 define Build/Compile
97 $(MAKE) -C $(PKG_BUILD_DIR) \
98 DESTDIR="$(PKG_INSTALL_DIR)" \
99 HOSTCC="$(HOSTCC)" \
100 depend all install
101 endef
102
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/
108 endef
109
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/
115 endef
116
117 define Package/openldap-utils/install
118 $(INSTALL_DIR) $(1)/usr/bin
119 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/
120 endef
121
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/
130 endef
131
132 $(eval $(call BuildPackage,libopenldap))
133 $(eval $(call BuildPackage,openldap-utils))
134 $(eval $(call BuildPackage,openldap-server))