aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2016-12-16 08:57:16 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2016-12-16 08:57:16 +0000
commit092ccd7f65025efc1da47ff25746be014c723556 (patch)
treee49032c99152d67b0a02c3284f0ced71bea29000
parenteaf52ebb879ea1fec2e7f597cd56ed2aa9596381 (diff)
parent0f2e535b241c6d8c1cb313fb65ef22dfe8ec2cdc (diff)
Merge "Add Mongoose Embedded Web Server Library"
-rw-r--r--meta-oem-extra-libs/recipes-core/packagegroups/packagegroup-ivi-common-core-os-commonlibs.bbappend2
-rw-r--r--meta-oem-extra-libs/recipes-support/mongodb/mongoose_git.bb60
-rw-r--r--meta-oem-extra-libs/recipes-support/mongoose/README.md10
-rw-r--r--meta-oem-extra-libs/recipes-support/mongoose/mongoose_6.6.bb74
4 files changed, 84 insertions, 62 deletions
diff --git a/meta-oem-extra-libs/recipes-core/packagegroups/packagegroup-ivi-common-core-os-commonlibs.bbappend b/meta-oem-extra-libs/recipes-core/packagegroups/packagegroup-ivi-common-core-os-commonlibs.bbappend
index 397de412..82d0c61b 100644
--- a/meta-oem-extra-libs/recipes-core/packagegroups/packagegroup-ivi-common-core-os-commonlibs.bbappend
+++ b/meta-oem-extra-libs/recipes-core/packagegroups/packagegroup-ivi-common-core-os-commonlibs.bbappend
@@ -29,8 +29,6 @@ RDEPENDS_${PN} += "\
curl \
giflib \
neon \
- mongodb \
- nodejs \
mongoose \
fuse \
protobuf \
diff --git a/meta-oem-extra-libs/recipes-support/mongodb/mongoose_git.bb b/meta-oem-extra-libs/recipes-support/mongodb/mongoose_git.bb
deleted file mode 100644
index 35fd3f29..00000000
--- a/meta-oem-extra-libs/recipes-support/mongodb/mongoose_git.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SUMMARY = "mongoose"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://README.md;beginline=302;endline=321;md5=dbdda6492d8f693c50356f55d30cbb5e \
- "
-
-PV = "4.6.1+git${SRCPV}"
-SRCREV = "4913935d321efbf2b6dccc4b4ba1679a73d5bd08"
-SRC_URI = "git://github.com/Automattic/mongoose.git;protocol=git;branch=master \
- "
-RDEPENDS_${PN} += "mongodb \
- nodejs \
- "
-
-S = "${WORKDIR}/git"
-
-FILES_${PN} = " \
- ${exec_prefix}/lib/node_modules/npm/node_modules/mongoose/* \
- "
-
-do_configure() {
-}
-
-do_compile() {
-}
-
-install_file_directory() {
- for obj in $1/*; do
- fname=`basename $obj`
- if ! [ -e $2 ]; then
- install -d 0644 $2
- fi
- if [ -f $1/$fname ]; then
- install -m 0644 $1/$fname $2
- elif [ -d $1/$fname ]; then
- if ! [ -e $2/$fname ]; then
- install -d 0644 $2/$fname
- fi
- install_file_directory $1/$fname $2/$fname
- fi
- done
-}
-
-do_install() {
- install -d ${D}${exec_prefix}/lib/node_modules/npm/node_modules/mongoose/
-
- install -m 0644 ${S}/CONTRIBUTING.md ${D}${exec_prefix}/lib/node_modules/npm/node_modules/mongoose/
- install -m 0644 ${S}/History.md ${D}${exec_prefix}/lib/node_modules/npm/node_modules/mongoose/
- install -m 0644 ${S}/index.js ${D}${exec_prefix}/lib/node_modules/npm/node_modules/mongoose/
- install -m 0644 ${S}/README.md ${D}${exec_prefix}/lib/node_modules/npm/node_modules/mongoose/
- install -m 0644 ${S}/package.json ${D}${exec_prefix}/lib/node_modules/npm/node_modules/mongoose/
- install -m 0644 ${S}/release-items.md ${D}${exec_prefix}/lib/node_modules/npm/node_modules/mongoose/
- install -m 0644 ${S}/static.js ${D}${exec_prefix}/lib/node_modules/npm/node_modules/mongoose/
- install -m 0644 ${S}/website.js ${D}${exec_prefix}/lib/node_modules/npm/node_modules/mongoose/
-
- install_file_directory ${S}/examples ${D}${exec_prefix}/lib/node_modules/npm/node_modules/mongoose/examples/
- install_file_directory ${S}/lib ${D}${exec_prefix}/lib/node_modules/npm/node_modules/mongoose/lib/
-
-# sed -i '/devDependencies/a\ \ \ \ \"mongoose\"\:\ \"\~4\.6\.2\"\,' ${D}${exec_prefix}/lib/node_modules/npm/package.json
-}
-
diff --git a/meta-oem-extra-libs/recipes-support/mongoose/README.md b/meta-oem-extra-libs/recipes-support/mongoose/README.md
new file mode 100644
index 00000000..85bcfd0a
--- /dev/null
+++ b/meta-oem-extra-libs/recipes-support/mongoose/README.md
@@ -0,0 +1,10 @@
+Add Mongoose Embedded Web Server Library for AGL OEM NEDDS
+================================================================
+Default Mongoose has build in 3 sub libs libmongoose.so
+libmongoose_ssl.so and libmongoose_mqtt.so define with
+MONGOOSE_EXLIBS in bb files.
+If necessary you can modify MONGOOSE_EXLIBS and CFLAGS_XXX in
+bb file to customize the library function.
+
+access https://github.com/cesanta/mongoose for more infomation
+
diff --git a/meta-oem-extra-libs/recipes-support/mongoose/mongoose_6.6.bb b/meta-oem-extra-libs/recipes-support/mongoose/mongoose_6.6.bb
new file mode 100644
index 00000000..3f99cc15
--- /dev/null
+++ b/meta-oem-extra-libs/recipes-support/mongoose/mongoose_6.6.bb
@@ -0,0 +1,74 @@
+SUMMARY = "Mongoose - Embedded Web Server / Embedded Networking Library"
+DESCRIPTION = "Mongoose is ideal for embedded environments. It has been designed for connecting devices and bringing them online. \
+ Mongoose makes embedded network programming fast, robust, and easy."
+
+HOMEPAGE = "https://www.cesanta.com/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3548d4c6b2c754880739734d5e100aa9"
+
+SECTION = "libs"
+
+PV = "6.6+git${SRCPV}"
+SRCREV = "a23daa1547937b17bc30894d4bf19ddca80c7d35"
+SRC_URI = "git://github.com/cesanta/mongoose.git;branch=master"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "openssl"
+
+MONGOOSE_EXLIBS ?= "libmongoose.so libmongoose_ssl.so libmongoose_mqtt.so"
+
+python () {
+ d.setVar("CFLAGS_DEF", "-DMG_ENABLE_THREADS -DMG_ENABLE_COAP -DMG_ENABLE_HTTP_STREAMING_MULTIPART")
+ d.setVar("CFLAGS_SSL", "-DMG_ENABLE_THREADS -DMG_ENABLE_SSL -lssl -lcrypto")
+ d.setVar("CFLAGS_MQTT", "-DMG_ENABLE_THREADS -DMG_ENABLE_SSL -lssl -lcrypto -DMG_ENABLE_MQTT_BROKER -DMG_ENABLE_HTTP=0")
+}
+
+FILES_${PN} += "${exec_prefix}/lib/libmongoose.so \
+ ${exec_prefix}/lib/libmongoose_mqtt.so \
+ ${exec_prefix}/lib/libmongoose_ssl.so \
+ "
+
+FILES_${PN}-dbg = "${exec_prefix}/src/*"
+
+FILES_${PN}-dev = "${exec_prefix}/include/mongoose.h"
+
+FILES_${PN}-doc = "${exec_prefix}/share/doc/*"
+
+do_compile() {
+
+ if [ "${@bb.utils.contains('MONGOOSE_EXLIBS', 'libmongoose.so', 'def', '', d)}" = "def" ]; then
+ ${CC} mongoose.c -fPIC -shared -o libmongoose.so ${CFLAGS_DEF}
+ fi
+
+ if [ "${@bb.utils.contains('MONGOOSE_EXLIBS', 'libmongoose_ssl.so', 'ssl', '', d)}" = "ssl" ]; then
+ ${CC} mongoose.c -fPIC -shared -o libmongoose_ssl.so ${CFLAGS_SSL}
+ fi
+
+ if [ "${@bb.utils.contains('MONGOOSE_EXLIBS', 'libmongoose_mqtt.so', 'mqtt', '', d)}" = "mqtt" ]; then
+ ${CC} mongoose.c -fPIC -shared -o libmongoose_mqtt.so ${CFLAGS_MQTT}
+ fi
+}
+
+do_install() {
+
+ install -d ${D}${exec_prefix}/lib/
+ install -d ${D}${exec_prefix}/include/
+ install -d ${D}${exec_prefix}/src/debug/mongoose/6.6/
+ install -d ${D}${exec_prefix}/share/doc/
+
+ for libs in ${MONGOOSE_EXLIBS}
+ do
+ install -m 0644 ${S}/${libs} ${D}${exec_prefix}/lib/${libs}
+ done
+
+ install -m 0644 ${S}/mongoose.h ${D}${exec_prefix}/include/mongoose.h
+ install -m 0644 ${S}/mongoose.c ${D}${exec_prefix}/src/debug/mongoose/6.6/mongoose.c
+ install -m 0644 ${S}/mongoose.h ${D}${exec_prefix}/src/debug/mongoose/6.6/mongoose.h
+
+ tar -czf docs.tar.gz ${S}/docs/
+ install -m 0644 ${S}/docs.tar.gz ${D}${exec_prefix}/share/doc/docs.tar.gz
+ install -m 0644 ${S}/LICENSE ${D}${exec_prefix}/share/doc/LICENSE
+ install -m 0644 ${S}/CONTRIBUTING.md ${D}${exec_prefix}/share/doc/CONTRIBUTING.md
+}