Update vpnc to 0.4.0, thanks to Swen Kuhnlein
[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 # $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 PKG_CAT:=zcat
22
23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
24 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/openldap/Default
29 TITLE:=LDAP implementation
30 DESCRIPTION:=\
31 OpenLDAP Software is an open source implementation of the \\\
32 Lightweight Directory Access Protocol (LDAP).
33 URL:=http://www.openldap.org/
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 DESCRIPTION+=\\\
43 \\\
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 DESCRIPTION+=\\\
58 \\\
59 This package contains client programs required to access LDAP servers.
60 endef
61
62 PKG_CONFIGURE_OPTIONS = \
63 --enable-shared \
64 --enable-static \
65 --disable-debug \
66 --enable-dynamic \
67 --enable-syslog \
68 --disable-local \
69 --disable-slapd \
70 --disable-slurpd \
71 --with-cyrus-sasl \
72 --without-fetch \
73 --with-threads \
74 --with-tls \
75 --with-yielding_select="yes" \
76
77 define Build/Configure
78 endef
79
80 define Build/Compile
81 rm -rf $(PKG_INSTALL_DIR)
82 mkdir -p $(PKG_INSTALL_DIR)
83 -$(MAKE) -C $(PKG_BUILD_DIR) \
84 DESTDIR="$(PKG_INSTALL_DIR)" \
85 distclean
86 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
87 ./configure \
88 --target=$(GNU_HOST_NAME) \
89 --host=$(GNU_HOST_NAME) \
90 --build=$(GNU_HOST_NAME) \
91 --program-prefix="" \
92 --program-suffix="" \
93 --prefix=/usr \
94 --exec-prefix=/usr \
95 --bindir=/usr/bin \
96 --datadir=/usr/share \
97 --includedir=/usr/include \
98 --libdir=/usr/lib \
99 --libexecdir=/usr/lib \
100 --localstatedir=/var \
101 --mandir=/usr/share/man \
102 --sbindir=/usr/sbin \
103 --sysconfdir=/etc \
104 $(DISABLE_LARGEFILE) \
105 $(DISABLE_NLS) \
106 $(PKG_CONFIGURE_OPTIONS) \
107 --without-cyrus-sasl \
108 --without-threads \
109 --without-tls \
110 );
111 $(MAKE) -C $(PKG_BUILD_DIR) depend
112 $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblutil
113 $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblber
114 $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblunicode
115 $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblber clean
116 $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblutil clean
117 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
118 $(TARGET_CONFIGURE_OPTS) \
119 CFLAGS="$(TARGET_CFLAGS)" \
120 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
121 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib " \
122 ./configure \
123 --target=$(GNU_TARGET_NAME) \
124 --host=$(GNU_TARGET_NAME) \
125 --build=$(GNU_HOST_NAME) \
126 --program-prefix="" \
127 --program-suffix="" \
128 --prefix=/usr \
129 --exec-prefix=/usr \
130 --bindir=/usr/bin \
131 --datadir=/usr/share \
132 --includedir=/usr/include \
133 --libdir=/usr/lib \
134 --libexecdir=/usr/lib \
135 --localstatedir=/var \
136 --mandir=/usr/share/man \
137 --sbindir=/usr/sbin \
138 --sysconfdir=/etc \
139 $(DISABLE_LARGEFILE) \
140 $(DISABLE_NLS) \
141 $(PKG_CONFIGURE_OPTIONS) \
142 );
143 $(MAKE) -C $(PKG_BUILD_DIR) \
144 DESTDIR="$(PKG_INSTALL_DIR)" \
145 all install
146 endef
147
148 define Build/InstallDev
149 mkdir -p $(STAGING_DIR)/usr/include
150 $(CP) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(STAGING_DIR)/usr/include/
151 mkdir -p $(STAGING_DIR)/usr/lib/
152 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(STAGING_DIR)/usr/lib/
153 endef
154
155 define Build/UninstallDev
156 rm -rf $(STAGING_DIR)/usr/include/{lber,ldap}*.h \
157 $(STAGING_DIR)/usr/lib/lib{lber,ldap}*.{a,so*}
158 endef
159
160 define Package/libopenldap/install
161 $(INSTALL_DIR) $(1)/etc/openldap
162 $(CP) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(1)/etc/openldap/
163 $(INSTALL_DIR) $(1)/usr/lib
164 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(1)/usr/lib/
165 $(INSTALL_DIR) $(1)/usr/share/openldap
166 $(CP) $(PKG_INSTALL_DIR)/usr/share/openldap/* $(1)/usr/share/openldap/
167 endef
168
169 define Package/openldap-utils/install
170 $(INSTALL_DIR) $(1)/usr/bin
171 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/
172 endef
173
174 $(eval $(call BuildPackage,libopenldap))
175 $(eval $(call BuildPackage,openldap-utils))