]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/openldap/openldap_2.2.24.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / openldap / openldap_2.2.24.bb
1 # OpenLDAP, a license free (see http://www.OpenLDAP.org/license.html)
2 #
3 DESCRIPTION = "OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol."
4 HOMEPAGE = "http://www.OpenLDAP.org/license.html"
5 MAINTAINER = "John Bowler <jbowler@acm.org>"
6 PRIORITY = "optional"
7 # The OpenLDAP Public License - see the HOMEPAGE - defines
8 # the license.  www.openldap.org claims this is Open Source
9 # (see http://www.openldap.org), the license appears to be
10 # basically BSD.  opensource.org does not record this license
11 # at present (so it is apparently not OSI certified).
12 LICENSE = "OpenLDAP"
13 SECTION = "libs"
14
15 PR = "r3"
16
17 SRC_URI = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz"
18 SRC_URI += " file://openldap-autoconf.patch;patch=1"
19 # The build tries to run a host executable, this fails.  The patch
20 # causes the executable and its data to be installed instead of
21 # the output - ucgendat must be run after the ipkg install!
22 SRC_URI += " file://ucgendat.patch;patch=1"
23 # The original top.mk used INSTALL, not INSTALL_STRIP_PROGRAM when
24 # installing .so and executables, this fails in cross compilation
25 # environments
26 SRC_URI += " file://install-strip.patch;patch=1"
27
28 inherit autotools
29
30 # OPTIONS
31 # The following two variables can be set in a distro or local.conf
32 # to switch features on.  Each feature foo defines OPENLDAP_OPTION_foo
33 # and OPENLDAP_DEPENDS_foo in this file - to include feature foo add
34 # the two variables into the setting of the options below (please use
35 # += because that means this can be done in *both* distro.conf and
36 # local.conf!
37 OPENLDAP_OPTIONS ?=
38 OPENLDAP_DEPENDS ?=
39
40 # CONFIG DEFINITIONS
41 # The following is necessary because it cannot be determined for a
42 # cross compile automagically.  Select should yield fine on all OE
43 # systems...
44 EXTRA_OECONF += " --with-yielding-select=yes"
45 # Shared libraries are nice...
46 EXTRA_OECONF += " --enable-dynamic"
47 #
48 # Disable TLS to remove the need for openssl/libcrypto
49 OPENLDAP_OPTION_tls  ?= --without-tls
50 # set the following to " openssl" to build tls support
51 OPENLDAP_DEPENDS_tls ?=
52 EXTRA_OECONF += " ${OPENLDAP_OPTION_tls}"
53 DEPENDS += ${OPENLDAP_DEPENDS_tls}
54
55 # SLAPD options
56 #
57 # UNIX crypt(3) passwd support:
58 EXTRA_OECONF += " --enable-crypt"
59 #
60 # Enable dynamic module loading.  If this is *disabled* the
61 # dependency on libtool is removed (to disable set the following
62 # to variables to "" in a .conf file).
63 OPENLDAP_OPTION_modules += "lt_cv_dlopen_self=yes --enable-modules"
64 OPENLDAP_DEPENDS_modules += libtool
65 EXTRA_OECONF += " ${OPENLDAP_OPTION_modules}"
66 DEPENDS += ${OPENLDAP_DEPENDS_modules}
67
68 # SLAPD BACKEND
69 #
70 # The backend must be set by the configuration.  This controls the
71 # required database, the default database, bdb, is turned off but
72 # can be turned back on again and it *is* below!  The monitor backend
73 # is also disabled.  If you try to change the backends but fail to
74 # enable a single one the build will fail in an obvious way.
75 #
76 EXTRA_OECONF += " --disable-bdb --disable-monitor"
77 #
78 # Backends="bdb dnssrv hdb ldap ldbm meta monitor null passwd perl shell sql"
79 #
80 # Note that multiple backends can be built.  The ldbm backend requires a
81 # build-time choice of database API.  The bdb backend forces this to be
82 # DB4.  To use the gdbm (or other) API the Berkely database module must
83 # be removed from the build.
84 md = "${libexecdir}/openldap"
85 #
86 #--enable-bdb          enable Berkeley DB backend no|yes|mod yes
87 # The Berkely DB is the standard choice.  This version of OpenLDAP requires
88 # the version 4 implementation or better.
89 # To disable this set all three of the following variables to <empty> in
90 # a .conf file (this will allow ldbm to be build with gdbm).
91 OPENLDAP_OPTION_bdb   ?= --enable-bdb=mod
92 OPENLDAP_DEPENDS_bdb  ?= db4
93 OPENLDAP_PACKAGE_bdb  ?= "${PN}-backend-bdb"
94 FILES_${PN}-backend-bdb = "${md}/back_bdb.so ${md}/back_bdb.la ${md}/back_bdb-*.so.*"
95 EXTRA_OECONF += " ${OPENLDAP_OPTION_bdb}"
96 DEPENDS += ${OPENLDAP_DEPENDS_bdb}
97 PACKAGES += " ${OPENLDAP_PACKAGE_bdb}"
98 # For the moment the db4 headers are in a sub-directory to give compatibility
99 # with the identically named db3 headers in the standard staging directory,
100 # *prepend* the subdirectory:
101 TARGET_CPPFLAGS =+ "-I${STAGING_DIR}/${TARGET_SYS}/include/db4"
102 #
103 #--enable-dnssrv       enable dnssrv backend no|yes|mod no
104 # This has no dependencies.
105 FILES_${PN}-backend-dnssrv = "${md}/back_dnssrv.so ${md}/back_dnssrv.la ${md}/back_dnssrv-*.so.*"
106 EXTRA_OECONF += " --enable-dnssrv=mod"
107 PACKAGES += " ${PN}-backend-dnssrv"
108 #
109 #--enable-hdb          enable Hierarchical DB backend no|yes|mod no
110 # This forces ldbm to use Berkeley too, remove to use gdbm
111 OPENLDAP_OPTION_hdb   ?= --enable-hdb=mod
112 OPENLDAP_DEPENDS_hdb  ?= db4
113 OPENLDAP_PACKAGE_hdb  ?= "${PN}-backend-hdb"
114 FILES_${PN}-backend-hdb = "${md}/back_hdb.so ${md}/back_hdb.la ${md}/back_hdb-*.so.*"
115 EXTRA_OECONF += " ${OPENLDAP_OPTION_hdb}"
116 DEPENDS += ${OPENLDAP_DEPENDS_hdb}
117 PACKAGES += " ${OPENLDAP_PACKAGE_hdb}"
118 #
119 #--enable-ldap         enable ldap backend no|yes|mod no
120 # This has no dependencies
121 EXTRA_OECONF += " --enable-ldap=mod"
122 FILES_${PN}-backend-ldap = "${md}/back_ldap.so ${md}/back_ldap.la ${md}/back_ldap-*.so.*"
123 PACKAGES += " ${PN}-backend-ldap"
124 #
125 #--enable-ldbm         enable ldbm backend no|yes|mod no
126 # ldbm requires further specification of the underlying database API, because
127 # bdb is enabled above this must be set to berkeley, however the config
128 # defaults this correctly so --with-ldbm-api is *not* set.  The build will
129 # fail if bdb is removed (above) but not database is built to provide the
130 # support for ldbm (because the 'DEPENDS_ldbm' is empty below.)
131 #
132 # So to use gdbm set:
133 #OPENLDAP_OPTION_ldbm = "--enable-ldbm=mod --with-ldbm-api=gdbm"
134 #OPENLDAP_DEPENDS_ldbm = gdbm
135 # And clear the bdb and hdb settings.
136 OPENLDAP_OPTION_ldbm ?= --enable-ldbm=mod
137 OPENLDAP_DEPENDS_ldbm ?=
138 OPENLDAP_PACKAGES_ldbm ?= "${PN}-backend-ldbm"
139 FILES_${PN}-backend-ldbm = "${md}/back_ldbm.so ${md}/back_ldbm.la ${md}/back_ldbm-*.so.*"
140 EXTRA_OECONF += " ${OPENLDAP_OPTION_ldbm}"
141 DEPENDS += ${OPENLDAP_DEPENDS_ldbm}
142 PACKAGES += " ${PN}-backend-ldbm"
143 #
144 #--enable-meta         enable metadirectory backend no|yes|mod no
145 # No dependencies
146 EXTRA_OECONF += " --enable-meta=mod"
147 FILES_${PN}-backend-meta = "${md}/back_meta.so ${md}/back_meta.la ${md}/back_meta-*.so.*"
148 PACKAGES += " ${PN}-backend-meta"
149 #
150 #--enable-monitor      enable monitor backend no|yes|mod yes
151 EXTRA_OECONF += " --enable-monitor=mod"
152 FILES_${PN}-backend-monitor = "${md}/back_monitor.so ${md}/back_monitor.la ${md}/back_monitor-*.so.*"
153 PACKAGES += " ${PN}-backend-monitor"
154 #
155 #--enable-null         enable null backend no|yes|mod no
156 EXTRA_OECONF += " --enable-null=mod"
157 FILES_${PN}-backend-null = "${md}/back_null.so ${md}/back_null.la ${md}/back_null-*.so.*"
158 PACKAGES += " ${PN}-backend-null"
159 #
160 #--enable-passwd       enable passwd backend no|yes|mod no
161 EXTRA_OECONF += " --enable-passwd=mod"
162 FILES_${PN}-backend-passwd = "${md}/back_passwd.so ${md}/back_passwd.la ${md}/back_passwd-*.so.*"
163 PACKAGES += " ${PN}-backend-passwd"
164 #
165 #--enable-perl         enable perl backend no|yes|mod no
166 #  This requires a loadable perl dynamic library, if enabled without
167 #  doing something appropriate (building perl?) the build will pick
168 #  up the build machine perl - not good.
169 OPENLDAP_OPTION_perl ?= --enable-perl=mod
170 OPENLDAP_DEPENDS_perl ?= perl
171 OPENLDAP_PACKAGES_perl ?= "${PN}-backend-perl"
172 FILES_${PN}-backend-perl = "${md}/back_perl.so ${md}/back_perl.la ${md}/back_perl-*.so.*"
173 #EXTRA_OECONF += " ${OPENLDAP_OPTION_perl}"
174 #DEPENDS += ${OPENLDAP_DEPENDS_perl}
175 #PACKAGES += " ${PN}-backend-perl"
176 #
177 #--enable-shell        enable shell backend no|yes|mod no
178 EXTRA_OECONF += " --enable-shell=mod"
179 FILES_${PN}-backend-shell = "${md}/back_shell.so ${md}/back_shell.la ${md}/back_shell-*.so.*"
180 PACKAGES += " ${PN}-backend-shell"
181 #
182 #--enable-sql          enable sql backend no|yes|mod no
183 # sql requires some sql backend which provides sql.h, sqlite* provides
184 # sqlite.h (which may be compatible but hasn't been tried.)
185 OPENLDAP_OPTION_sql ?= --enable-sql=mod
186 OPENLDAP_DEPENDS_sql ?= sql
187 OPENLDAP_PACKAGES_sql ?= "${PN}-backend-sql"
188 FILES_${PN}-backend-sql = "${md}/back_sql.so ${md}/back_sql.la ${md}/back_sql-*.so.*"
189 #EXTRA_OECONF += " ${OPENLDAP_OPTION_sql}"
190 #DEPENDS += ${OPENLDAP_DEPENDS_sql}
191 #PACKAGES += " ${PN}-backend-sql"
192 #
193 #--enable-dyngroup     Dynamic Group overlay no|yes|mod no
194 #  This is a demo, Proxy Cache defines init_module which conflicts with the
195 #  same symbol in dyngroup
196 #EXTRA_OECONF += " --enable-dyngroup=mod"
197 #FILES_${PN}-overlay-dyngroup = "${md}/back_dyngroup.so ${md}/back_dyngroup.la ${md}/back_dyngroup-*.so.*"
198 #PACKAGES += " ${PN}-overlay-dyngroup"
199 #
200 #--enable-proxycache   Proxy Cache overlay no|yes|mod no
201 EXTRA_OECONF += " --enable-proxycache=mod"
202 FILES_${PN}-overlay-proxycache = "${md}/pcache.so ${md}/pcache.la ${md}/pcache-*.so.*"
203 PACKAGES += " ${PN}-overlay-proxycache"
204 #
205 # LOCAL OPTION OVERRIDES
206 # The distro/lcoal options must be added in *last*
207 EXTRA_OECONF += " ${OPENLDAP_OPTIONS}"
208 DEPENDS      += ${OPENLDAP_DEPENDS}
209
210 do_stage() {
211         autotools_stage_includes
212         # Install the -2.2 versions, but link foo.so to foo-2.2.so ONLY
213         # if the do not exist!
214         oe_libinstall -so -C libraries/libldap/.libs libldap-2.2 ${STAGING_LIBDIR}
215         test -e ${STAGING_LIBDIR}/libldap.so ||
216                 ln -s $(basename ${STAGING_LIBDIR}/libldap-2.2.so.*.*.*) ${STAGING_LIBDIR}/libldap.so
217         oe_libinstall -so -C libraries/libldap_r/.libs libldap_r-2.2 ${STAGING_LIBDIR}
218         test -e ${STAGING_LIBDIR}/libldap_r.so ||
219                 ln -s $(basename ${STAGING_LIBDIR}/libldap_r-2.2.so.*.*.*) ${STAGING_LIBDIR}/libldap_r.so
220         oe_libinstall -so -C libraries/liblber/.libs liblber-2.2 ${STAGING_LIBDIR}
221         test -e ${STAGING_LIBDIR}/liblber.so ||
222                 ln -s $(basename ${STAGING_LIBDIR}/liblber-2.2.so.*.*.*) ${STAGING_LIBDIR}/liblber.so
223 }
224
225 LEAD_SONAME = "libldap-2.2.so.*"
226
227 # The executables go in a separate package.  This allows the
228 # installation of the libraries with no daemon support.
229 # Each module also has its own package - see above.
230 PACKAGES += " ${PN}-slapd ${PN}-slurpd ${PN}-bin"
231
232 # Package contents - shift most standard contents to -bin
233 FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/openldap-data"
234 FILES_${PN}-slapd = "${libexecdir}/slapd ${sbindir} ${datadir}/openldap/ucdata \
235         ${localstatedir}/run ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema"
236 FILES_${PN}-slurpd = "${libexecdir}/slurpd ${localstatedir}/openldap-slurp ${localstatedir}/run"
237 FILES_${PN}-bin = "${bindir}"
238 FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libdir}/*.a ${libexecdir}/openldap/*.a"
239
240 # Run ucgendat, and remove it.
241 # This is a painful and annoying way around the use of machine-generated
242 # tables within the build.  The alternative is to rewrite the ucgendat
243 # stuff and associated liblunicode code to use machine-independent data
244 # files - the current code seems to at least assume byte sex.
245 DATFILES = "case.dat cmbcl.dat comp.dat ctype.dat decomp.dat num.dat kdecomp.dat"
246 pkg_postinst_openldap-slapd() {
247 test -n "${DESTDIR}" -o "${BUILD_ARCH}" = "${HOST_ARCH}" || (
248         cd "${datadir}/${PN}/ucdata" &&
249         ./ucgendat UnicodeData.txt -x CompositionExclusions.txt &&
250         # This saves about 1MByte
251         rm ucgendat UnicodeData.txt CompositionExclusions.txt
252 )
253 }
254 pkg_prerm_openldap-slapd() {
255 test "${BUILD_ARCH}" = "${HOST_ARCH}" || (
256         cd "${datadir}/${PN}/ucdata" && rm ${DATFILES}
257 )
258 }