summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2021-11-02 19:51:42 +0100
committerKhem Raj <raj.khem@gmail.com>2021-11-03 06:57:49 -0700
commit563577f4882c3a1ccb96d92e3c85a1eb3fba0bb9 (patch)
tree105f95b7c11bc41d4b0b0025569953a0390fcc13
parentc386e5ab799ef1812a1b787b30c229fbded7db61 (diff)
downloadmeta-openembedded-563577f4882c3a1ccb96d92e3c85a1eb3fba0bb9.tar.gz
mongodb: A little clean up
This cleans up whitespace, and avoids using ${...} for shell variables. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb57
1 files changed, 26 insertions, 31 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 eff014a4c..461a1d007 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
@@ -43,7 +43,6 @@ SRC_URI:append:toolchain-clang = "\
43 file://0001-asio-Dont-use-experimental-with-clang.patch \ 43 file://0001-asio-Dont-use-experimental-with-clang.patch \
44 " 44 "
45 45
46
47S = "${WORKDIR}/git" 46S = "${WORKDIR}/git"
48 47
49COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux' 48COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux'
@@ -83,44 +82,40 @@ EXTRA_OESCONS = "PREFIX=${prefix} \
83 --separate-debug \ 82 --separate-debug \
84 ${PACKAGECONFIG_CONFARGS}" 83 ${PACKAGECONFIG_CONFARGS}"
85 84
86
87USERADD_PACKAGES = "${PN}" 85USERADD_PACKAGES = "${PN}"
88USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/${BPN} --shell /bin/false --user-group ${BPN}" 86USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/${BPN} --shell /bin/false --user-group ${BPN}"
89 87
90
91scons_do_compile() { 88scons_do_compile() {
92 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} install-core || \ 89 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} install-core ||
93 die "scons build execution failed." 90 die "scons build execution failed."
94} 91}
95 92
96scons_do_install() { 93scons_do_install() {
97 # install binaries 94 # install binaries
98 install -d ${D}${bindir} 95 install -d ${D}${bindir}
99 for i in mongod mongos mongo 96 for i in mongod mongos mongo; do
100 do 97 if [ -f ${B}/build/opt/mongo/$i ]; then
101 if [ -f ${B}/build/opt/mongo/${i} ] 98 install -m 0755 ${B}/build/opt/mongo/$i ${D}${bindir}
102 then 99 else
103 install -m 0755 ${B}/build/opt/mongo/${i} ${D}${bindir}/${i} 100 bbnote "$i does not exist"
104 else 101 fi
105 bbnote "${i} does not exist" 102 done
106 fi 103
107 done 104 # install config
108 105 install -d ${D}${sysconfdir}
109 # install config 106 install -m 0644 ${S}/debian/mongod.conf ${D}${sysconfdir}
110 install -d ${D}${sysconfdir} 107
111 install -m 0644 ${S}/debian/mongod.conf ${D}${sysconfdir}/ 108 # install systemd service
112 109 install -d ${D}${systemd_system_unitdir}
113 # install systemd service 110 install -m 0644 ${S}/debian/mongod.service ${D}${systemd_system_unitdir}
114 install -d ${D}${systemd_system_unitdir} 111
115 install -m 0644 ${S}/debian/mongod.service ${D}${systemd_system_unitdir} 112 # install mongo data folder
116 113 install -m 755 -d ${D}${localstatedir}/lib/${BPN}
117 # install mongo data folder 114 chown ${PN}:${PN} ${D}${localstatedir}/lib/${BPN}
118 install -m 755 -d ${D}${localstatedir}/lib/${BPN} 115
119 chown ${PN}:${PN} ${D}${localstatedir}/lib/${BPN} 116 # Log files
120 117 install -m 755 -d ${D}${localstatedir}/log/${BPN}
121 # Log files 118 chown ${PN}:${PN} ${D}${localstatedir}/log/${BPN}
122 install -m 755 -d ${D}${localstatedir}/log/${BPN}
123 chown ${PN}:${PN} ${D}${localstatedir}/log/${BPN}
124} 119}
125 120
126CONFFILES:${PN} = "${sysconfdir}/mongod.conf" 121CONFFILES:${PN} = "${sysconfdir}/mongod.conf"