packages: Update s-lang library to 2.2.4
[openwrt/svn-archive/archive.git] / libs / openldap / Makefile
1 #
2 # Copyright (C) 2006-2012 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.23
12 PKG_RELEASE:=4
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:=90150b8c0d0192e10b30157e68844ddf
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 MAINTAINER:=W. Michael Petullo <mike@flyn.org>
29 endef
30
31 define Package/openldap/Default/description
32 OpenLDAP Software is an open source implementation of the
33 Lightweight Directory Access Protocol (LDAP).
34 endef
35
36 define Package/libopenldap
37 $(call Package/openldap/Default)
38 SECTION:=libs
39 CATEGORY:=Libraries
40 DEPENDS:=+libopenssl +libsasl2
41 TITLE+= (libraries)
42 endef
43
44 define Package/libopenldap/description
45 $(call Package/openldap/Default/description)
46 This package contains the shared LDAP client libraries, needed by other programs.
47 endef
48
49 define Package/libopenldap/conffiles
50 /etc/openldap/ldap.conf
51 endef
52
53 define Package/openldap-utils
54 $(call Package/openldap/Default)
55 SECTION:=utils
56 CATEGORY:=Utilities
57 DEPENDS:=+libopenldap
58 TITLE+= (utilities)
59 endef
60
61 define Package/openldap-utils/description
62 $(call Package/openldap/Default/description)
63 This package contains client programs required to access LDAP servers.
64 endef
65
66 define Package/openldap-server
67 $(call Package/openldap/Default)
68 SECTION:=net
69 CATEGORY:=Network
70 DEPENDS:=+libopenldap +libuuid
71 TITLE+= (server)
72 endef
73
74 define Package/openldap-server/description
75 $(call Package/openldap/Default/description)
76 This package contains server programs required to provide LDAP services.
77 endef
78
79 define Package/openldap-server/conffiles
80 /etc/openldap/slapd.conf
81 endef
82
83 TARGET_CFLAGS += $(FPIC)
84
85 CONFIGURE_ARGS += \
86 --enable-shared \
87 --enable-static \
88 --disable-debug \
89 --enable-dynamic \
90 --enable-syslog \
91 --disable-local \
92 --disable-slurpd \
93 --with-cyrus-sasl \
94 --without-fetch \
95 --with-threads \
96 --with-tls \
97 --with-yielding_select="yes" \
98 --without-cyrus-sasl \
99 --without-threads \
100 --without-tls \
101 --enable-null \
102 --disable-bdb \
103 --disable-hdb \
104 --disable-monitor \
105 --disable-relay
106
107 define Build/Compile
108 $(MAKE) -C $(PKG_BUILD_DIR) \
109 DESTDIR="$(PKG_INSTALL_DIR)" \
110 HOSTCC="$(HOSTCC)" \
111 depend all install
112 endef
113
114 define Build/InstallDev
115 $(INSTALL_DIR) $(1)/usr/include
116 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(1)/usr/include/
117 $(INSTALL_DIR) $(1)/usr/lib/
118 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(1)/usr/lib/
119 endef
120
121 define Package/libopenldap/install
122 $(INSTALL_DIR) $(1)/etc/openldap
123 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(1)/etc/openldap/
124 $(INSTALL_DIR) $(1)/usr/lib
125 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(1)/usr/lib/
126 endef
127
128 define Package/openldap-utils/install
129 $(INSTALL_DIR) $(1)/usr/bin
130 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/
131 endef
132
133 define Package/openldap-server/install
134 $(INSTALL_DIR) $(1)/etc/init.d
135 $(INSTALL_BIN) ./files/ldap.init $(1)/etc/init.d/ldap
136 $(INSTALL_DIR) $(1)/etc/openldap/schema
137 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/schema/* $(1)/etc/openldap/schema/
138 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/slapd.conf $(1)/etc/openldap/
139 $(INSTALL_DIR) $(1)/usr/sbin
140 # XXX: OpenLDAP installs slapd into libexecdir, not sbindir:
141 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/slapd $(1)/usr/sbin/
142 # XXX: switch default backend to ldif, since bdb is disabled
143 $(SED) 's|^\(database\)\([ \t]\+\)bdb|\1\2ldif|g' \
144 -e 's|^\(index\)|#\1|g' \
145 $(1)/etc/openldap/slapd.conf
146 endef
147
148 $(eval $(call BuildPackage,libopenldap))
149 $(eval $(call BuildPackage,openldap-utils))
150 $(eval $(call BuildPackage,openldap-server))