summaryrefslogtreecommitdiffstats
path: root/meta-oe/classes/waf-samba.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/classes/waf-samba.bbclass')
-rw-r--r--meta-oe/classes/waf-samba.bbclass51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-oe/classes/waf-samba.bbclass b/meta-oe/classes/waf-samba.bbclass
new file mode 100644
index 000000000..23c55567d
--- /dev/null
+++ b/meta-oe/classes/waf-samba.bbclass
@@ -0,0 +1,51 @@
1# waf is a build system which is used by samba related project.
2# Obtain details from https://wiki.samba.org/index.php/Waf
3#
4inherit qemu pythonnative
5
6DEPENDS += "qemu-native libxslt-native docbook-xsl-stylesheets-native python"
7
8CONFIGUREOPTS = " --prefix=${prefix} \
9 --bindir=${bindir} \
10 --sbindir=${sbindir} \
11 --libexecdir=${libexecdir} \
12 --datadir=${datadir} \
13 --sysconfdir=${sysconfdir} \
14 --sharedstatedir=${sharedstatedir} \
15 --localstatedir=${localstatedir} \
16 --libdir=${libdir} \
17 --includedir=${includedir} \
18 --oldincludedir=${oldincludedir} \
19 --infodir=${infodir} \
20 --mandir=${mandir} \
21 "
22
23do_configure() {
24 qemu_binary="${@qemu_target_binary(d)}"
25 if [ ${qemu_binary} == "qemu-allarch" ]; then
26 qemu_binary="qemuwrapper"
27 fi
28
29 libdir_qemu="${STAGING_DIR_HOST}/${libdir}"
30 base_libdir_qemu="${STAGING_DIR_HOST}/${base_libdir}"
31 oldest_kernel_qemu=${OLDEST_KERNEL}
32
33 CROSS_EXEC="${qemu_binary} \
34 -r ${oldest_kernel_qemu} \
35 -L ${STAGING_DIR_HOST} \
36 -E LD_LIBRARY_PATH=${libdir_qemu}:${base_libdir_qemu}"
37
38 export BUILD_SYS=${BUILD_SYS}
39 export HOST_SYS=${HOST_SYS}
40 export BUILD_ARCH=${BUILD_ARCH}
41 export HOST_ARCH=${HOST_ARCH}
42 export STAGING_LIBDIR=${STAGING_LIBDIR}
43 export STAGING_INCDIR=${STAGING_INCDIR}
44 export PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
45
46 ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF} --cross-compile --cross-execute="${CROSS_EXEC}"
47}
48
49do_install() {
50 oe_runmake install DESTDIR=${D}
51}