summaryrefslogtreecommitdiffstats
path: root/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb')
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb62
1 files changed, 51 insertions, 11 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
index 58841ef319..0606e34407 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
@@ -9,12 +9,13 @@ DEPENDS = "openssl libpcap zlib boost curl python3 \
9 python3-psutil-native python3-regex-native \ 9 python3-psutil-native python3-regex-native \
10 " 10 "
11 11
12inherit scons dos2unix siteinfo python3native 12inherit scons dos2unix siteinfo python3native systemd useradd
13 13
14PV = "4.2.2" 14PV = "4.4.1"
15#v4.2.2 15#v4.4.1
16SRCREV = "a0bbbff6ada159e19298d37946ac8dc4b497eadf" 16SRCREV = "ad91a93a5a31e175f5cbf8c69561e788bbc55ce1"
17SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.2 \ 17SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4 \
18 file://0001-kms-message-bump-libmongocrypto-to-v1.0.4.patch \
18 file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \ 19 file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
19 file://0001-Use-long-long-instead-of-int64_t.patch \ 20 file://0001-Use-long-long-instead-of-int64_t.patch \
20 file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \ 21 file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
@@ -35,6 +36,7 @@ SRC_URI_append_toolchain-clang = "\
35 file://0001-asio-Dont-use-experimental-with-clang.patch \ 36 file://0001-asio-Dont-use-experimental-with-clang.patch \
36 " 37 "
37 38
39
38S = "${WORKDIR}/git" 40S = "${WORKDIR}/git"
39 41
40COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux' 42COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux'
@@ -51,26 +53,64 @@ PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
51PACKAGECONFIG[shell] = ",--js-engine=none,," 53PACKAGECONFIG[shell] = ",--js-engine=none,,"
52PACKAGECONFIG[system-pcre] = "--use-system-pcre,,libpcre," 54PACKAGECONFIG[system-pcre] = "--use-system-pcre,,libpcre,"
53 55
54EXTRA_OESCONS = "--prefix=${D}${prefix} \ 56EXTRA_OESCONS = "PREFIX=${prefix} \
57 DESTDIR=${D} \
55 LIBPATH=${STAGING_LIBDIR} \ 58 LIBPATH=${STAGING_LIBDIR} \
56 LINKFLAGS='${LDFLAGS}' \ 59 LINKFLAGS='${LDFLAGS}' \
57 CXXFLAGS='${CXXFLAGS}' \ 60 CXXFLAGS='${CXXFLAGS}' \
58 TARGET_ARCH=${TARGET_ARCH} \ 61 TARGET_ARCH=${TARGET_ARCH} \
62 MONGO_VERSION=${PV} \
59 --ssl \ 63 --ssl \
60 --disable-warnings-as-errors \ 64 --disable-warnings-as-errors \
61 --use-system-zlib \ 65 --use-system-zlib \
62 --nostrip \ 66 --nostrip \
63 --endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ 67 --endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
64 --wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \ 68 --wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \
65 ${PACKAGECONFIG_CONFARGS} \ 69 --separate-debug \
66 core" 70 ${PACKAGECONFIG_CONFARGS}"
71
72
73USERADD_PACKAGES = "${PN}"
74USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/${BPN} --shell /bin/false --user-group ${BPN}"
75
67 76
68scons_do_compile() { 77scons_do_compile() {
69 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \ 78 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} install-core || \
70 die "scons build execution failed." 79 die "scons build execution failed."
71} 80}
72 81
73scons_do_install() { 82scons_do_install() {
74 ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \ 83 # install binaries
75 die "scons install execution failed." 84 install -d ${D}${bindir}
85 for i in mongod mongos mongo
86 do
87 if [ -f ${B}/build/opt/mongo/${i} ]
88 then
89 install -m 0755 ${B}/build/opt/mongo/${i} ${D}${bindir}/${i}
90 else
91 bbnote "${i} does not exist"
92 fi
93 done
94
95 # install config
96 install -d ${D}${sysconfdir}
97 install -m 0644 ${S}/debian/mongod.conf ${D}${sysconfdir}/
98
99 # install systemd service
100 install -d ${D}${systemd_system_unitdir}
101 install -m 0644 ${S}/debian/mongod.service ${D}${systemd_system_unitdir}
102
103 # install mongo data folder
104 install -m 755 -d ${D}${localstatedir}/lib/${BPN}
105 chown ${PN}:${PN} ${D}${localstatedir}/lib/${BPN}
106
107 # Log files
108 install -m 755 -d ${D}${localstatedir}/log/${BPN}
109 chown ${PN}:${PN} ${D}${localstatedir}/log/${BPN}
76} 110}
111
112CONFFILES_${PN} = "${sysconfdir}/mongod.conf"
113
114SYSTEMD_SERVICE_${PN} = "mongod.service"
115
116