diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
commit | 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch) | |
tree | 0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-oe/recipes-support/openldap | |
download | meta-openembedded-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-support/openldap')
5 files changed, 306 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.23/initscript b/meta-oe/recipes-support/openldap/openldap-2.4.23/initscript new file mode 100644 index 0000000000..40881cd6d7 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.23/initscript | |||
@@ -0,0 +1,29 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # This is an init script for openembedded | ||
4 | # Copy it to /etc/init.d/openldap and type | ||
5 | # > update-rc.d openldap defaults 60 | ||
6 | # | ||
7 | |||
8 | |||
9 | slapd=/usr/libexec/slapd | ||
10 | test -x "$slapd" || exit 0 | ||
11 | |||
12 | |||
13 | case "$1" in | ||
14 | start) | ||
15 | echo -n "Starting OpenLDAP: " | ||
16 | start-stop-daemon --start --quiet --exec $slapd | ||
17 | echo "." | ||
18 | ;; | ||
19 | stop) | ||
20 | echo -n "Stopping OpenLDAP: " | ||
21 | start-stop-daemon --stop --quiet --pidfile /var/run/slapd.pid | ||
22 | echo "." | ||
23 | ;; | ||
24 | *) | ||
25 | echo "Usage: /etc/init.d/openldap {start|stop}" | ||
26 | exit 1 | ||
27 | esac | ||
28 | |||
29 | exit 0 \ No newline at end of file | ||
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.23/install-strip.patch b/meta-oe/recipes-support/openldap/openldap-2.4.23/install-strip.patch new file mode 100644 index 0000000000..2992b7030d --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.23/install-strip.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | # This patch ensures that the install operations which strip | ||
2 | # programs and libraries (LTINSTALL) work in a cross build | ||
3 | # environment. | ||
4 | --- openldap-2.2.24/.pc/install-strip.patch/build/top.mk 2005-01-20 09:00:55.000000000 -0800 | ||
5 | +++ openldap-2.2.24/build/top.mk 2005-04-16 13:48:20.536710376 -0700 | ||
6 | @@ -116,7 +116,7 @@ | ||
7 | LTLINK_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=link \ | ||
8 | $(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_MOD) | ||
9 | |||
10 | -LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) | ||
11 | +LTINSTALL = STRIPPROG="" $(LIBTOOL) --mode=install $(top_srcdir)/contrib/ldapc++/install-sh -c | ||
12 | LTFINISH = $(LIBTOOL) --mode=finish | ||
13 | |||
14 | # Misc UNIX commands used in build environment | ||
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.23/kill-icu.patch b/meta-oe/recipes-support/openldap/openldap-2.4.23/kill-icu.patch new file mode 100644 index 0000000000..dcf5411372 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.23/kill-icu.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | ||
2 | |||
3 | slapd depends on ICU if it was built first. | ||
4 | |||
5 | Upstream-status: inappropiate [embedded specific] | ||
6 | --- | ||
7 | configure.in | 8 -------- | ||
8 | 1 file changed, 8 deletions(-) | ||
9 | |||
10 | --- openldap-2.4.23.orig/configure.in | ||
11 | +++ openldap-2.4.23/configure.in | ||
12 | @@ -2045,18 +2045,10 @@ if test $ol_enable_ndb != no ; then | ||
13 | SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)" | ||
14 | fi | ||
15 | fi | ||
16 | |||
17 | dnl ---------------------------------------------------------------- | ||
18 | -dnl International Components for Unicode | ||
19 | -OL_ICU | ||
20 | -if test "$ol_icu" = no ; then | ||
21 | - AC_MSG_WARN([ICU not available]) | ||
22 | -else | ||
23 | - ICU_LIBS="$ol_icu" | ||
24 | -fi | ||
25 | -dnl ---------------------------------------------------------------- | ||
26 | dnl | ||
27 | dnl Check for Cyrus SASL | ||
28 | dnl | ||
29 | WITH_SASL=no | ||
30 | ol_link_sasl=no | ||
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.23/openldap-m4-pthread.patch b/meta-oe/recipes-support/openldap/openldap-2.4.23/openldap-m4-pthread.patch new file mode 100644 index 0000000000..b669b7254d --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.23/openldap-m4-pthread.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | --- openldap-2.3.11/build/openldap.m4.orig 2005-11-11 00:11:18.604322590 -0800 | ||
2 | +++ openldap-2.3.11/build/openldap.m4 2005-11-11 00:26:21.621145856 -0800 | ||
3 | @@ -788,7 +788,7 @@ AC_DEFUN([OL_PTHREAD_TEST_FUNCTION],[[ | ||
4 | ]]) | ||
5 | |||
6 | AC_DEFUN([OL_PTHREAD_TEST_PROGRAM], | ||
7 | -AC_LANG_SOURCE([OL_PTHREAD_TEST_INCLUDES | ||
8 | +[AC_LANG_SOURCE([[OL_PTHREAD_TEST_INCLUDES | ||
9 | |||
10 | int main(argc, argv) | ||
11 | int argc; | ||
12 | @@ -796,7 +796,7 @@ int main(argc, argv) | ||
13 | { | ||
14 | OL_PTHREAD_TEST_FUNCTION | ||
15 | } | ||
16 | -])) | ||
17 | +]])]) | ||
18 | dnl -------------------------------------------------------------------- | ||
19 | AC_DEFUN([OL_PTHREAD_TRY], [# Pthread try link: $1 ($2) | ||
20 | if test "$ol_link_threads" = no ; then | ||
diff --git a/meta-oe/recipes-support/openldap/openldap_2.4.23.bb b/meta-oe/recipes-support/openldap/openldap_2.4.23.bb new file mode 100644 index 0000000000..5c6f9eac65 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap_2.4.23.bb | |||
@@ -0,0 +1,213 @@ | |||
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 | # The OpenLDAP Public License - see the HOMEPAGE - defines | ||
6 | # the license. www.openldap.org claims this is Open Source | ||
7 | # (see http://www.openldap.org), the license appears to be | ||
8 | # basically BSD. opensource.org does not record this license | ||
9 | # at present (so it is apparently not OSI certified). | ||
10 | LICENSE = "OpenLDAP" | ||
11 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3d82d3085f228af211a6502c7ea7c3c7" | ||
12 | SECTION = "libs" | ||
13 | |||
14 | LDAP_VER = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}" | ||
15 | |||
16 | SRC_URI = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz \ | ||
17 | file://openldap-m4-pthread.patch \ | ||
18 | file://kill-icu.patch \ | ||
19 | file://initscript \ | ||
20 | " | ||
21 | SRC_URI[md5sum] = "90150b8c0d0192e10b30157e68844ddf" | ||
22 | SRC_URI[sha256sum] = "5a5ede91d5e8ab3c7f637620aa29a3b96eb34318a8b26c8eef2d2c789fc055e3" | ||
23 | |||
24 | DEPENDS = "util-linux groff-native" | ||
25 | |||
26 | PR = "r1" | ||
27 | # The original top.mk used INSTALL, not INSTALL_STRIP_PROGRAM when | ||
28 | # installing .so and executables, this fails in cross compilation | ||
29 | # environments | ||
30 | SRC_URI += "file://install-strip.patch" | ||
31 | |||
32 | inherit autotools-brokensep | ||
33 | |||
34 | # CV SETTINGS | ||
35 | # Required to work round AC_FUNC_MEMCMP which gets the wrong answer | ||
36 | # when cross compiling (should be in site?) | ||
37 | EXTRA_OECONF += "ac_cv_func_memcmp_working=yes" | ||
38 | |||
39 | # CONFIG DEFINITIONS | ||
40 | # The following is necessary because it cannot be determined for a | ||
41 | # cross compile automagically. Select should yield fine on all OE | ||
42 | # systems... | ||
43 | EXTRA_OECONF += "--with-yielding-select=yes" | ||
44 | # Shared libraries are nice... | ||
45 | EXTRA_OECONF += "--enable-dynamic" | ||
46 | |||
47 | PACKAGECONFIG ??= "gnutls modules \ | ||
48 | ldap meta monitor null passwd shell proxycache dnssrv \ | ||
49 | " | ||
50 | #--with-tls with TLS/SSL support auto|openssl|gnutls [auto] | ||
51 | PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls" | ||
52 | PACKAGECONFIG[openssl] = "--with-tls=openssl,,openssl" | ||
53 | |||
54 | PACKAGECONFIG[sasl] = "--with-cyrus-sasl,--without-cyrus-sasl,cyrus-sasl" | ||
55 | PACKAGECONFIG[modules] = "lt_cv_dlopen_self=yes --enable-modules,--disable-modules,libtool" | ||
56 | |||
57 | # SLAPD options | ||
58 | # | ||
59 | # UNIX crypt(3) passwd support: | ||
60 | EXTRA_OECONF += "--enable-crypt" | ||
61 | |||
62 | # SLAPD BACKEND | ||
63 | # | ||
64 | # The backend must be set by the configuration. This controls the | ||
65 | # required database, the default database, bdb, is turned off but | ||
66 | # can be turned back on again and it *is* below! The monitor backend | ||
67 | # is also disabled. If you try to change the backends but fail to | ||
68 | # enable a single one the build will fail in an obvious way. | ||
69 | # | ||
70 | EXTRA_OECONF += "--disable-bdb --disable-hdb --disable-monitor" | ||
71 | # | ||
72 | # Backends="bdb dnssrv hdb ldap ldbm meta monitor null passwd perl shell sql" | ||
73 | # | ||
74 | # Note that multiple backends can be built. The ldbm backend requires a | ||
75 | # build-time choice of database API. The bdb backend forces this to be | ||
76 | # DB4. To use the gdbm (or other) API the Berkely database module must | ||
77 | # be removed from the build. | ||
78 | md = "${libexecdir}/openldap" | ||
79 | # | ||
80 | #--enable-bdb enable Berkeley DB backend no|yes|mod yes | ||
81 | # The Berkely DB is the standard choice. This version of OpenLDAP requires | ||
82 | # the version 4 implementation or better. | ||
83 | PACKAGECONFIG[bdb] = "--enable-bdb=mod,--enable-bdb=no,db" | ||
84 | |||
85 | #--enable-dnssrv enable dnssrv backend no|yes|mod no | ||
86 | PACKAGECONFIG[dnssrv] = "--enable-dnssrv=mod,--enable-dnssrv=no" | ||
87 | |||
88 | #--enable-hdb enable Hierarchical DB backend no|yes|mod no | ||
89 | # This forces ldbm to use Berkeley too, remove to use gdbm | ||
90 | PACKAGECONFIG[hdb] = "--enable-hdb=mod,--enable-hdb=no,db" | ||
91 | |||
92 | #--enable-ldap enable ldap backend no|yes|mod no | ||
93 | PACKAGECONFIG[ldap] = "--enable-ldap=mod,--enable-ldap=no," | ||
94 | |||
95 | #--enable-ldbm enable ldbm backend no|yes|mod no | ||
96 | # ldbm requires further specification of the underlying database API, because | ||
97 | # bdb is enabled above this must be set to berkeley, however the config | ||
98 | # defaults this correctly so --with-ldbm-api is *not* set. The build will | ||
99 | # fail if bdb is removed, but no database is built to provide the | ||
100 | # support for ldbm | ||
101 | # guide.html:<P>back-ldbm was both slow and unreliable. Its byzantine indexing code was prone to spontaneous corruption, as were the underlying database libraries that were commonly used (e.g. GDBM or NDBM). back-bdb and back-hdb are superior in every aspect, with simplified indexing to avoid index corruption, fine-grained locking for greater concurrency, hierarchical caching for greater performance, streamlined on-disk format for greater efficiency and portability, and full transaction support for greater reliability.</P> | ||
102 | # configure: WARNING: unrecognized options: --disable-silent-rules, --enable-ldbm, --with-ldbm-api | ||
103 | #PACKAGECONFIG[ldbm] = "--enable-ldbm=mod --with-ldbm-api=gdbm,--enable-ldbm-no,gdbm" | ||
104 | |||
105 | #--enable-meta enable metadirectory backend no|yes|mod no | ||
106 | PACKAGECONFIG[meta] = "--enable-meta=mod,--enable-meta=no," | ||
107 | |||
108 | #--enable-monitor enable monitor backend no|yes|mod yes | ||
109 | PACKAGECONFIG[monitor] = "--enable-monitor=mod,--enable-monitor=no," | ||
110 | |||
111 | #--enable-null enable null backend no|yes|mod no | ||
112 | PACKAGECONFIG[null] = "--enable-null=mod,--enable-null=no," | ||
113 | |||
114 | #--enable-passwd enable passwd backend no|yes|mod no | ||
115 | PACKAGECONFIG[passwd] = "--enable-passwd=mod,--enable-passwd=no," | ||
116 | |||
117 | #--enable-perl enable perl backend no|yes|mod no | ||
118 | # This requires a loadable perl dynamic library, if enabled without | ||
119 | # doing something appropriate (building perl?) the build will pick | ||
120 | # up the build machine perl - not good (inherit perlnative?) | ||
121 | PACKAGECONFIG[perl] = "--enable-perl=mod,--enable-perl=no,perl" | ||
122 | |||
123 | #--enable-shell enable shell backend no|yes|mod no | ||
124 | # configure: WARNING: Use of --without-threads is recommended with back-shell | ||
125 | PACKAGECONFIG[shell] = "--enable-shell=mod --without-threads,--enable-shell=no," | ||
126 | |||
127 | #--enable-sql enable sql backend no|yes|mod no | ||
128 | # sql requires some sql backend which provides sql.h, sqlite* provides | ||
129 | # sqlite.h (which may be compatible but hasn't been tried.) | ||
130 | PACKAGECONFIG[sql] = "--enable-sql=mod,--enable-sql=no,sqlite3" | ||
131 | |||
132 | #--enable-dyngroup Dynamic Group overlay no|yes|mod no | ||
133 | # This is a demo, Proxy Cache defines init_module which conflicts with the | ||
134 | # same symbol in dyngroup | ||
135 | PACKAGECONFIG[dyngroup] = "--enable-dyngroup=mod,--enable-dyngroup=no," | ||
136 | |||
137 | #--enable-proxycache Proxy Cache overlay no|yes|mod no | ||
138 | PACKAGECONFIG[proxycache] = "--enable-proxycache=mod,--enable-proxycache=no," | ||
139 | FILES_${PN}-overlay-proxycache = "${md}/pcache-*.so.*" | ||
140 | PACKAGES += "${PN}-overlay-proxycache" | ||
141 | |||
142 | CPPFLAGS_append = " -D_GNU_SOURCE" | ||
143 | |||
144 | do_configure() { | ||
145 | cp ${STAGING_DATADIR_NATIVE}/libtool/config/ltmain.sh ${S}/build | ||
146 | rm -f ${S}/libtool | ||
147 | aclocal | ||
148 | libtoolize --force --copy | ||
149 | gnu-configize | ||
150 | autoconf | ||
151 | oe_runconf | ||
152 | } | ||
153 | |||
154 | LEAD_SONAME = "libldap-${LDAP_VER}.so.*" | ||
155 | |||
156 | # The executables go in a separate package. This allows the | ||
157 | # installation of the libraries with no daemon support. | ||
158 | # Each module also has its own package - see above. | ||
159 | PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin" | ||
160 | |||
161 | # Package contents - shift most standard contents to -bin | ||
162 | FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/openldap-data" | ||
163 | FILES_${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \ | ||
164 | ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \ | ||
165 | ${sysconfdir}/openldap/DB_CONFIG.example" | ||
166 | FILES_${PN}-slurpd = "${libexecdir}/slurpd ${localstatedir}/openldap-slurp ${localstatedir}/run ${localstatedir}/volatile/run" | ||
167 | FILES_${PN}-bin = "${bindir}" | ||
168 | FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libdir}/*.a ${libexecdir}/openldap/*.a ${libexecdir}/openldap/*.la ${libexecdir}/openldap/*.so" | ||
169 | FILES_${PN}-dbg += "${libexecdir}/openldap/.debug" | ||
170 | |||
171 | do_install_append() { | ||
172 | install -d ${D}${sysconfdir}/init.d | ||
173 | cat ${WORKDIR}/initscript > ${D}${sysconfdir}/init.d/openldap | ||
174 | chmod 755 ${D}${sysconfdir}/init.d/openldap | ||
175 | # This is duplicated in /etc/openldap and is for slapd | ||
176 | rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example | ||
177 | rmdir "${D}${localstatedir}/run" | ||
178 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" | ||
179 | } | ||
180 | |||
181 | pkg_postinst_${PN}-slapd () { | ||
182 | if test -n "${D}"; then | ||
183 | D="-r $D" | ||
184 | fi | ||
185 | update-rc.d $D openldap defaults | ||
186 | } | ||
187 | |||
188 | pkg_prerm_${PN}-slapd () { | ||
189 | if test -n "${D}"; then | ||
190 | D="-r $D" | ||
191 | fi | ||
192 | update-rc.d $D openldap remove | ||
193 | } | ||
194 | |||
195 | PACKAGES_DYNAMIC += "^openldap-backends.* ^openldap-backend-.*" | ||
196 | |||
197 | python populate_packages_prepend () { | ||
198 | backend_dir = d.expand('${libexecdir}/openldap') | ||
199 | do_split_packages(d, backend_dir, 'back_([a-z]*)\-.*\.so\..*$', 'openldap-backend-%s', 'OpenLDAP %s backend', extra_depends='', allow_links=True) | ||
200 | |||
201 | metapkg = "openldap-backends" | ||
202 | d.setVar('ALLOW_EMPTY_' + metapkg, "1") | ||
203 | d.setVar('FILES_' + metapkg, "") | ||
204 | metapkg_rdepends = [] | ||
205 | packages = d.getVar('PACKAGES', 1).split() | ||
206 | for pkg in packages[1:]: | ||
207 | if pkg.count("openldap-backend-") and not pkg in metapkg_rdepends and not pkg.count("-dev") and not pkg.count("-dbg") and not pkg.count("static") and not pkg.count("locale"): | ||
208 | metapkg_rdepends.append(pkg) | ||
209 | d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends)) | ||
210 | d.setVar('DESCRIPTION_' + metapkg, 'OpenLDAP backends meta package') | ||
211 | packages.append(metapkg) | ||
212 | d.setVar('PACKAGES', ' '.join(packages)) | ||
213 | } | ||