Add siproxd package
[openwrt.git] / openwrt / package / openldap / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=openldap
6 PKG_VERSION:=2.2.26
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=afc8700b5738da863b30208e1d3e9de8
9
10 PKG_SOURCE_URL:= \
11 ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ \
12 http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
14 PKG_CAT:=zcat
15
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
18
19 PKG_CONFIGURE_OPTIONS = \
20 --enable-shared \
21 --enable-static \
22 --disable-debug \
23 --enable-dynamic \
24 --enable-syslog \
25 --disable-local \
26 --disable-slapd \
27 --disable-slurpd \
28 --with-cyrus-sasl \
29 --without-fetch \
30 --with-threads \
31 --with-tls \
32 --with-yielding_select="yes" \
33
34 include $(TOPDIR)/package/rules.mk
35
36 $(eval $(call PKG_template,LIBOPENLDAP,libopenldap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
37 $(eval $(call PKG_template,OPENLDAP_UTILS,openldap-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
38
39 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
40 touch $(PKG_BUILD_DIR)/.configured
41
42 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
43 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
44 ./configure \
45 --target=$(GNU_HOST_NAME) \
46 --host=$(GNU_HOST_NAME) \
47 --build=$(GNU_HOST_NAME) \
48 --program-prefix="" \
49 --program-suffix="" \
50 --prefix=/usr \
51 --exec-prefix=/usr \
52 --bindir=/usr/bin \
53 --datadir=/usr/share \
54 --includedir=/usr/include \
55 --libdir=/usr/lib \
56 --libexecdir=/usr/lib \
57 --localstatedir=/var \
58 --mandir=/usr/share/man \
59 --sbindir=/usr/sbin \
60 --sysconfdir=/etc \
61 $(DISABLE_LARGEFILE) \
62 $(DISABLE_NLS) \
63 $(PKG_CONFIGURE_OPTIONS) \
64 )
65 $(MAKE) -C $(PKG_BUILD_DIR) depend
66 $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblutil
67 $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblber
68 $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblunicode
69 $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblber clean
70 $(MAKE) -C $(PKG_BUILD_DIR)/libraries/liblutil clean
71 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
72 $(TARGET_CONFIGURE_OPTS) \
73 CFLAGS="$(TARGET_CFLAGS)" \
74 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
75 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
76 ac_cv_func_memcmp_clean="yes" \
77 ./configure \
78 --target=$(GNU_TARGET_NAME) \
79 --host=$(GNU_TARGET_NAME) \
80 --build=$(GNU_HOST_NAME) \
81 --program-prefix="" \
82 --program-suffix="" \
83 --prefix=/usr \
84 --exec-prefix=/usr \
85 --bindir=/usr/bin \
86 --datadir=/usr/share \
87 --includedir=/usr/include \
88 --libdir=/usr/lib \
89 --libexecdir=/usr/lib \
90 --localstatedir=/var \
91 --mandir=/usr/share/man \
92 --sbindir=/usr/sbin \
93 --sysconfdir=/etc \
94 $(DISABLE_LARGEFILE) \
95 $(DISABLE_NLS) \
96 $(PKG_CONFIGURE_OPTIONS) \
97 )
98 $(MAKE) -C $(PKG_BUILD_DIR)
99 mkdir -p $(PKG_INSTALL_DIR)
100 $(MAKE) -C $(PKG_BUILD_DIR) \
101 DESTDIR="$(PKG_INSTALL_DIR)" \
102 install
103 touch $(PKG_BUILD_DIR)/.built
104
105
106 $(IPKG_LIBOPENLDAP):
107 mkdir -p $(IDIR_LIBOPENLDAP)/etc/openldap
108 cp -fpR $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(IDIR_LIBOPENLDAP)/etc/openldap/
109 mkdir -p $(IDIR_LIBOPENLDAP)/usr/lib/
110 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(IDIR_LIBOPENLDAP)/usr/lib/
111 mkdir -p $(IDIR_LIBOPENLDAP)/usr/share/openldap
112 cp -fpR $(PKG_INSTALL_DIR)/usr/share/openldap/* $(IDIR_LIBOPENLDAP)/usr/share/openldap/
113 $(RSTRIP) $(IDIR_LIBOPENLDAP)
114 $(IPKG_BUILD) $(IDIR_LIBOPENLDAP) $(PACKAGE_DIR)
115
116 $(IPKG_OPENLDAP_UTILS):
117 mkdir -p $(IDIR_OPENLDAP_UTILS)/usr/bin
118 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ldap* $(IDIR_OPENLDAP_UTILS)/usr/bin/
119 $(RSTRIP) $(IDIR_OPENLDAP_UTILS)
120 $(IPKG_BUILD) $(IDIR_OPENLDAP_UTILS) $(PACKAGE_DIR)
121
122 $(STAGING_DIR)/usr/lib/libldap.so: $(PKG_BUILD_DIR)/.built
123 mkdir -p $(STAGING_DIR)/usr/include
124 cp -fpR $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(STAGING_DIR)/usr/include/
125 mkdir -p $(STAGING_DIR)/usr/lib/
126 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(STAGING_DIR)/usr/lib/
127 touch $(STAGING_DIR)/usr/lib/libldap.so
128
129 install-dev: $(STAGING_DIR)/usr/lib/libldap.so
130
131 uninstall-dev:
132 rm -rf $(STAGING_DIR)/usr/include/{lber,ldap}*.h
133 rm -rf $(STAGING_DIR)/usr/lib/lib{lber,ldap}*.{a,so*}
134
135 compile: install-dev
136 clean: uninstall-dev
This page took 0.058023 seconds and 5 git commands to generate.