[packages] openldap: install an empty ldif directory (#6509)
[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:=2
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 define Package/openldap-server/conffiles
77 /etc/openldap/slapd.conf
78 endef
79
80 TARGET_CFLAGS += $(FPIC)
81
82 CONFIGURE_ARGS += \
83 --enable-shared \
84 --enable-static \
85 --disable-debug \
86 --enable-dynamic \
87 --enable-syslog \
88 --disable-local \
89 --disable-slurpd \
90 --with-cyrus-sasl \
91 --without-fetch \
92 --with-threads \
93 --with-tls \
94 --with-yielding_select="yes" \
95 --without-cyrus-sasl \
96 --without-threads \
97 --without-tls \
98 --enable-null \
99 --disable-bdb \
100 --disable-hdb \
101 --disable-monitor \
102 --disable-relay
103
104 define Build/Compile
105 $(MAKE) -C $(PKG_BUILD_DIR) \
106 DESTDIR="$(PKG_INSTALL_DIR)" \
107 HOSTCC="$(HOSTCC)" \
108 depend all install
109 endef
110
111 define Build/InstallDev
112 $(INSTALL_DIR) $(1)/usr/include
113 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(1)/usr/include/
114 $(INSTALL_DIR) $(1)/usr/lib/
115 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(1)/usr/lib/
116 endef
117
118 define Package/libopenldap/install
119 $(INSTALL_DIR) $(1)/etc/openldap
120 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(1)/etc/openldap/
121 $(INSTALL_DIR) $(1)/usr/lib
122 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(1)/usr/lib/
123 endef
124
125 define Package/openldap-utils/install
126 $(INSTALL_DIR) $(1)/usr/bin
127 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/
128 endef
129
130 define Package/openldap-server/install
131 $(INSTALL_DIR) $(1)/etc/init.d
132 $(INSTALL_BIN) ./files/ldap.init $(1)/etc/init.d/ldap
133 $(INSTALL_DIR) $(1)/etc/openldap/ldif
134 $(INSTALL_DIR) $(1)/etc/openldap/schema
135 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/schema/* $(1)/etc/openldap/schema/
136 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/slapd.conf $(1)/etc/openldap/
137 $(INSTALL_DIR) $(1)/usr/sbin
138 # OpenLDAP installs slapd into libexecdir, not sbindir:
139 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/slapd $(1)/usr/sbin/
140 endef
141
142 $(eval $(call BuildPackage,libopenldap))
143 $(eval $(call BuildPackage,openldap-utils))
144 $(eval $(call BuildPackage,openldap-server))