diff options
Diffstat (limited to 'meta-edison-middleware')
27 files changed, 1218 insertions, 0 deletions
diff --git a/meta-edison-middleware/conf/layer.conf b/meta-edison-middleware/conf/layer.conf new file mode 100644 index 0000000..1def19c --- /dev/null +++ b/meta-edison-middleware/conf/layer.conf @@ -0,0 +1,13 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH := "${BBPATH}:${LAYERDIR}" + +# We have a recipes-* directories, add to BBFILES +BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "edison-middleware" +BBFILE_PATTERN_edison-middleware = "^${LAYERDIR}/" +BBFILE_PRIORITY_edison-middleware = "6" + +PREFERRED_VERSION_nodejs = "0.10.28" +PREFERRED_VERSION_nodejs-native = "0.10.28" diff --git a/meta-edison-middleware/recipes-connectivity/c-ares/c-ares_1.10.0.bb b/meta-edison-middleware/recipes-connectivity/c-ares/c-ares_1.10.0.bb new file mode 100644 index 0000000..0d1ef9d --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/c-ares/c-ares_1.10.0.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "C library for asynchronous DNS requests (including name resolves)" +HOMEPAGE = "http://c-ares.haxx.se/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://README;beginline=17;endline=23;md5=d08205a43bc63c12cf394ac1d2cce7c3" + +PR = "r0" + +SRC_URI = "http://c-ares.haxx.se/download/c-ares-${PV}.tar.gz" + +SRC_URI[md5sum] = "1196067641411a75d3cbebe074fd36d8" +SRC_URI[sha256sum] = "3d701674615d1158e56a59aaede7891f2dde3da0f46a6d3c684e0ae70f52d3db" + +inherit autotools diff --git a/meta-edison-middleware/recipes-connectivity/mdns/files/build.patch b/meta-edison-middleware/recipes-connectivity/mdns/files/build.patch new file mode 100644 index 0000000..a1a2c89 --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/mdns/files/build.patch @@ -0,0 +1,191 @@ +--- a/Clients/Makefile ++++ b/Clients/Makefile +@@ -30,9 +30,17 @@ TARGETS = build/dns-sd build/dns-sd64 + LIBS = + else + TARGETS = build/dns-sd ++# Set up diverging paths for debug vs. prod builds ++DEBUG?=1 ++ifeq ($(DEBUG),1) ++LIBS = -L../mDNSPosix/build/debug/ -ldns_sd ++else + LIBS = -L../mDNSPosix/build/prod/ -ldns_sd + endif + ++ ++endif ++ + all: $(TARGETS) + + clean: +@@ -42,10 +50,10 @@ build: + mkdir build + + build/dns-sd: build dns-sd.c ClientCommon.c +- cc $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ ++ $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ + + build/dns-sd64: build dns-sd.c ClientCommon.c +- cc $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64 ++ $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64 + + # Note, we can make a 'fat' version of dns-sd using 'lipo', as shown below, but we + # don't, because we don't want or need a 'fat' version of dns-sd, because it will +--- a/mDNSPosix/Makefile ++++ b/mDNSPosix/Makefile +@@ -50,6 +50,7 @@ + + LIBVERS = 1 + ++POSIXDIR = ../mDNSPosix + COREDIR = ../mDNSCore + SHAREDDIR ?= ../mDNSShared + JDK = /usr/jdk +@@ -57,11 +58,11 @@ JDK = /usr/jdk + CC = @cc + BISON = @bison + FLEX = @flex +-LD = ld -shared ++LD =@LD + CP = cp + RM = rm + LN = ln -s -f +-CFLAGS_COMMON = -I$(COREDIR) -I$(SHAREDDIR) -I$(OBJDIR) -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\" ++CFLAGS_COMMON = -I$(POSIXDIR) -I$(COREDIR) -I$(SHAREDDIR) -I$(OBJDIR) -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\" + CFLAGS_PTHREAD = + LINKOPTS = + LINKOPTS_PTHREAD = -lpthread +@@ -69,7 +70,7 @@ LDSUFFIX = so + JAVACFLAGS_OS = -fPIC -shared -ldns_sd + + # Set up diverging paths for debug vs. prod builds +-DEBUG=0 ++DEBUG?=1 + ifeq ($(DEBUG),1) + CFLAGS_DEBUG = -g -DMDNS_DEBUGMSGS=2 + OBJDIR = objects/debug +@@ -103,6 +104,7 @@ else + ifeq ($(findstring linux,$(os)),linux) + CFLAGS_OS = -D_GNU_SOURCE -DHAVE_IPV6 -DNOT_HAVE_SA_LEN -DUSES_NETLINK -DHAVE_LINUX -DTARGET_OS_LINUX -fno-strict-aliasing + LD = gcc -shared ++LINKOPTS = --hash-style=gnu + FLEXFLAGS_OS = -l + JAVACFLAGS_OS += -I$(JDK)/include/linux + +@@ -210,7 +212,7 @@ endif + endif + endif + +-CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG) ++CFLAGS_BUILD = $(CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG) + + ############################################################################# + +@@ -246,8 +248,7 @@ Daemon: setup $(BUILDDIR)/mdnsd + @echo "Responder daemon done" + + $(BUILDDIR)/mdnsd: $(DAEMONOBJS) +- $(CC) -o $@ $+ $(LINKOPTS) +- @$(STRIP) $@ ++ $(CC) -o $@ $+ + + # libdns_sd target builds the client library + libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX) +@@ -256,22 +257,18 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$ + CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o + + $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS) +- @$(LD) $(LINKOPTS) -o $@ $+ +- @$(STRIP) $@ ++ $(LD) -shared $(LINKOPTS) -o $@ $+ + +-Clients: setup libdns_sd ../Clients/build/dns-sd ++Clients: setup libdns_sd ++ @$(MAKE) -C ../Clients DEBUG=${DEBUG} + @echo "Clients done" + +-../Clients/build/dns-sd: +- @$(MAKE) -C ../Clients +- + # nss_mdns target builds the Name Service Switch module + nss_mdns: setup $(BUILDDIR)/$(NSSLIBFILE) + @echo "Name Service Switch module done" + + $(BUILDDIR)/$(NSSLIBFILE): $(CLIENTLIBOBJS) $(OBJDIR)/nss_mdns.c.so.o +- @$(LD) $(LINKOPTS) -o $@ $+ +- @$(STRIP) $@ ++ $(LD) -shared $(LINKOPTS) -o $@ $+ + + ############################################################################# + +@@ -469,55 +466,55 @@ dnsextd: setup $(BUILDDIR)/dnsextd + @echo "dnsextd done" + + $(BUILDDIR)/mDNSClientPosix: $(APPOBJ) $(OBJDIR)/Client.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ + + $(BUILDDIR)/mDNSResponderPosix: $(COMMONOBJ) $(OBJDIR)/Responder.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ + + $(BUILDDIR)/mDNSProxyResponderPosix: $(COMMONOBJ) $(OBJDIR)/ProxyResponder.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ + + $(BUILDDIR)/mDNSIdentify: $(SPECIALOBJ) $(OBJDIR)/Identify.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ + + $(OBJDIR)/Identify.c.o: $(COREDIR)/mDNS.c # Note: Identify.c textually imports mDNS.c + + $(BUILDDIR)/mDNSNetMonitor: $(SPECIALOBJ) $(OBJDIR)/NetMonitor.c.o +- $(CC) $+ -o $@ $(LINKOPTS) ++ $(CC) $+ -o $@ + + $(OBJDIR)/NetMonitor.c.o: $(COREDIR)/mDNS.c # Note: NetMonitor.c textually imports mDNS.c + + $(BUILDDIR)/dnsextd: $(DNSEXTDOBJ) $(OBJDIR)/dnsextd.c.threadsafe.o +- $(CC) $+ -o $@ $(LINKOPTS) $(LINKOPTS_PTHREAD) ++ $(CC) $+ -o $@ $(LINKOPTS_PTHREAD) + + ############################################################################# + + # Implicit rules + $(OBJDIR)/%.c.o: %.c +- $(CC) $(CFLAGS) -c -o $@ $< ++ $(CC) $(CFLAGS_BUILD) -c -o $@ $< + + $(OBJDIR)/%.c.o: $(COREDIR)/%.c +- $(CC) $(CFLAGS) -c -o $@ $< ++ $(CC) $(CFLAGS_BUILD) -c -o $@ $< + + $(OBJDIR)/%.c.o: $(SHAREDDIR)/%.c +- $(CC) $(CFLAGS) -c -o $@ $< ++ $(CC) $(CFLAGS_BUILD) -c -o $@ $< + + $(OBJDIR)/%.c.threadsafe.o: %.c +- $(CC) $(CFLAGS) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $< ++ $(CC) $(CFLAGS_BUILD) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $< + + $(OBJDIR)/%.c.threadsafe.o: $(SHAREDDIR)/%.c +- $(CC) $(CFLAGS) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $< ++ $(CC) $(CFLAGS_BUILD) $(CFLAGS_PTHREAD) -D_REENTRANT -c -o $@ $< + + $(OBJDIR)/%.c.so.o: %.c +- $(CC) $(CFLAGS) -c -fPIC -o $@ $< ++ $(CC) $(CFLAGS_BUILD) -c -fPIC -o $@ $< + + $(OBJDIR)/%.c.so.o: $(SHAREDDIR)/%.c +- $(CC) $(CFLAGS) -c -fPIC -o $@ $< ++ $(CC) $(CFLAGS_BUILD) -c -fPIC -o $@ $< + + $(OBJDIR)/%.y.o: $(SHAREDDIR)/%.y + $(BISON) -o $(OBJDIR)/$*.c -d $< +- $(CC) $(CFLAGS) -c -o $@ $(OBJDIR)/$*.c ++ $(CC) $(CFLAGS_BUILD) -c -o $@ $(OBJDIR)/$*.c + + $(OBJDIR)/%.l.o: $(SHAREDDIR)/%.l + $(FLEX) $(FLEXFLAGS_OS) -i -o$(OBJDIR)/$*.l.c $< +- $(CC) $(CFLAGS) -Wno-error -c -o $@ $(OBJDIR)/$*.l.c ++ $(CC) $(CFLAGS_BUILD) -Wno-error -c -o $@ $(OBJDIR)/$*.l.c diff --git a/meta-edison-middleware/recipes-connectivity/mdns/files/mdns.service b/meta-edison-middleware/recipes-connectivity/mdns/files/mdns.service new file mode 100644 index 0000000..531d142 --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/mdns/files/mdns.service @@ -0,0 +1,15 @@ +[Unit] +Description=Zero-configuration networking +After=network.target + +[Service] +Type=forking +ExecStartPre=/bin/rm -f /var/run/mdnsd.pid +ExecStart=/usr/sbin/mdnsd +ExecReload=/bin/kill -HUP $MAINPID +PIDFile=/var/run/mdnsd.pid +Restart=always +RestartSec=10s + +[Install] +WantedBy=multi-user.target diff --git a/meta-edison-middleware/recipes-connectivity/mdns/mdns_544.bb b/meta-edison-middleware/recipes-connectivity/mdns/mdns_544.bb new file mode 100644 index 0000000..1d3f0bd --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/mdns/mdns_544.bb @@ -0,0 +1,76 @@ +DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks." +HOMEPAGE = "http://developer.apple.com/networking/bonjour/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=31c50371921e0fb731003bbc665f29bf" + +PR = "r1" + +SRC_URI = "http://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz \ + file://build.patch \ + file://mdns.service \ +" + +SRC_URI[md5sum] = "39142ab70bd82a096801ce346f86cbab" +SRC_URI[sha256sum] = "c6ad1d53c28d28c0e3689bdf5efd9ce6f5c4c3692e8ad76e5eeb4d0c248929ac" + +PARALLEL_MAKE = "" + +S = "${WORKDIR}/mDNSResponder-544" + +do_compile() { + cd mDNSPosix + oe_runmake os=linux DEBUG=0 +} + +do_install () { + install -d ${D}${sbindir} + install -m 0755 mDNSPosix/build/prod/mdnsd ${D}${sbindir} + + install -d ${D}${libdir} + cp mDNSPosix/build/prod/libdns_sd.so ${D}${libdir}/libdns_sd.so.1 + chmod 0644 ${D}${libdir}/libdns_sd.so.1 + ln -s libdns_sd.so.1 ${D}${libdir}/libdns_sd.so + + install -d ${D}${includedir} + install -m 0644 mDNSShared/dns_sd.h ${D}${includedir} + + install -d ${D}${mandir}/man8 + install -m 0644 mDNSShared/mDNSResponder.8 ${D}${mandir}/man8/mdnsd.8 + + install -d ${D}${bindir} + install -m 0755 Clients/build/dns-sd ${D}${bindir} + + install -d ${D}${libdir} + oe_libinstall -C mDNSPosix/build/prod -so libnss_mdns-0.2 ${D}${libdir} + ln -s libnss_mdns-0.2.so ${D}${libdir}/libnss_mdns.so.2 + + install -d ${D}${sysconfdir} + install -m 0644 mDNSPosix/nss_mdns.conf ${D}${sysconfdir} + + install -d ${D}${mandir}/man5 + install -m 0644 mDNSPosix/nss_mdns.conf.5 ${D}${mandir}/man5 + + install -d ${D}${mandir}/man8 + install -m 0644 mDNSPosix/libnss_mdns.8 ${D}${mandir}/man8 + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/mdns.service ${D}${systemd_unitdir}/system/ +} + +pkg_postinst_${PN} () { + sed -e '/^hosts:/s/\s*\<mdns\>//' \ + -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns\3\4\5/' \ + -i $D/etc/nsswitch.conf +} + +pkg_prerm_${PN} () { + sed -e '/^hosts:/s/\s*\<mdns\>//' \ + -e '/^hosts:/s/\s*mdns//' \ + -i $D/etc/nsswitch.conf +} + +inherit systemd + +SYSTEMD_SERVICE_${PN} = "mdns.service" + +FILES_${PN} += "${systemd_unitdir}/system/mdns.service" diff --git a/meta-edison-middleware/recipes-connectivity/mosquitto/files/build.patch b/meta-edison-middleware/recipes-connectivity/mosquitto/files/build.patch new file mode 100644 index 0000000..48c0653 --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/mosquitto/files/build.patch @@ -0,0 +1,71 @@ +Index: mosquitto-1.3.4/client/Makefile +=================================================================== +--- mosquitto-1.3.4.orig/client/Makefile ++++ mosquitto-1.3.4/client/Makefile +@@ -21,8 +21,8 @@ sub_client.o : sub_client.c ../lib/libmo + + install : all + $(INSTALL) -d ${DESTDIR}$(prefix)/bin +- $(INSTALL) -s --strip-program=$(STRIP) mosquitto_pub ${DESTDIR}${prefix}/bin/mosquitto_pub +- $(INSTALL) -s --strip-program=$(STRIP) mosquitto_sub ${DESTDIR}${prefix}/bin/mosquitto_sub ++ $(INSTALL) mosquitto_pub ${DESTDIR}${prefix}/bin/mosquitto_pub ++ $(INSTALL) mosquitto_sub ${DESTDIR}${prefix}/bin/mosquitto_sub + + uninstall : + -rm -f ${DESTDIR}${prefix}/bin/mosquitto_pub +Index: mosquitto-1.3.4/config.mk +=================================================================== +--- mosquitto-1.3.4.orig/config.mk ++++ mosquitto-1.3.4/config.mk +@@ -213,7 +213,7 @@ endif + + + INSTALL?=install +-prefix=/usr/local ++prefix=/usr + mandir=${prefix}/share/man + localedir=${prefix}/share/locale + STRIP?=strip +Index: mosquitto-1.3.4/lib/Makefile +=================================================================== +--- mosquitto-1.3.4.orig/lib/Makefile ++++ mosquitto-1.3.4/lib/Makefile +@@ -25,7 +25,7 @@ all : libmosquitto.so.${SOVERSION} libmo + + install : all + $(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/ +- $(INSTALL) -s --strip-program=$(STRIP) libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION} ++ $(INSTALL) libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION} + ln -sf libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so + $(INSTALL) -d ${DESTDIR}${prefix}/include/ + $(INSTALL) mosquitto.h ${DESTDIR}${prefix}/include/mosquitto.h +Index: mosquitto-1.3.4/lib/cpp/Makefile +=================================================================== +--- mosquitto-1.3.4.orig/lib/cpp/Makefile ++++ mosquitto-1.3.4/lib/cpp/Makefile +@@ -10,7 +10,7 @@ all : libmosquittopp.so.${SOVERSION} + + install : all + $(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/ +- $(INSTALL) -s --strip-program=$(STRIP) libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so.${SOVERSION} ++ $(INSTALL) libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so.${SOVERSION} + ln -sf libmosquittopp.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so + $(INSTALL) -d ${DESTDIR}${prefix}/include/ + $(INSTALL) mosquittopp.h ${DESTDIR}${prefix}/include/mosquittopp.h +Index: mosquitto-1.3.4/src/Makefile +=================================================================== +--- mosquitto-1.3.4.orig/src/Makefile ++++ mosquitto-1.3.4/src/Makefile +@@ -100,10 +100,10 @@ mosquitto_passwd.o : mosquitto_passwd.c + + install : all + $(INSTALL) -d ${DESTDIR}$(prefix)/sbin +- $(INSTALL) -s --strip-program=$(STRIP) mosquitto ${DESTDIR}${prefix}/sbin/mosquitto ++ $(INSTALL) mosquitto ${DESTDIR}${prefix}/sbin/mosquitto + $(INSTALL) mosquitto_plugin.h ${DESTDIR}${prefix}/include/mosquitto_plugin.h + ifeq ($(WITH_TLS),yes) +- $(INSTALL) -s --strip-program=$(STRIP) mosquitto_passwd ${DESTDIR}${prefix}/bin/mosquitto_passwd ++ $(INSTALL) mosquitto_passwd ${DESTDIR}${prefix}/bin/mosquitto_passwd + endif + + uninstall : diff --git a/meta-edison-middleware/recipes-connectivity/mosquitto/files/mosquitto.service b/meta-edison-middleware/recipes-connectivity/mosquitto/files/mosquitto.service new file mode 100644 index 0000000..25f68fa --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/mosquitto/files/mosquitto.service @@ -0,0 +1,15 @@ +[Unit] +Description=Mosquitto - lightweight server implementation of the MQTT and MQTT-SN protocols +ConditionPathExists=/etc/mosquitto/mosquitto.conf +After=network.target + +[Service] +Type=simple +ExecStartPre=/bin/rm -f /var/run/mosquitto.pid +ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf +ExecReload=/bin/kill -HUP $MAINPID +PIDFile=/var/run/mosquitto.pid +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/meta-edison-middleware/recipes-connectivity/mosquitto/mosquitto_1.3.4.bb b/meta-edison-middleware/recipes-connectivity/mosquitto/mosquitto_1.3.4.bb new file mode 100644 index 0000000..84c3307 --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/mosquitto/mosquitto_1.3.4.bb @@ -0,0 +1,55 @@ +SUMMARY = "Open source MQTT v3.1 implemention" +DESCRIPTION = "Mosquitto is an open source (BSD licensed) message broker that implements the MQ Telemetry Transport protocol version 3.1. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. " +HOMEPAGE = "http://mosquitto.org/" +SECTION = "console/network" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=89aa5ea5f32e4260d84c5d185ee3add4" + +DEPENDS = "openssl c-ares" + +PR = "r0" + +SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \ + file://build.patch \ + file://mosquitto.service \ +" + +SRC_URI[md5sum] = "9d729849efd74c6e3eee17a4a002e1e9" +SRC_URI[sha256sum] = "0a3982d6b875a458909c8828731da04772035468700fa7eb2f0885f4bd6d0dbc" + +inherit autotools + +do_install_append () { + install -d ${D}${libbir} + install -m 0644 lib/libmosquitto.a ${D}${libdir}/ + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/mosquitto.service ${D}${systemd_unitdir}/system/ + + cp ${D}${sysconfdir}/mosquitto/mosquitto.conf.example ${D}${sysconfdir}/mosquitto/mosquitto.conf + sed 's/#user mosquitto/user root/' -i ${D}${sysconfdir}/mosquitto/mosquitto.conf +} + +PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients ${PN}-python" + +FILES_${PN} = "${sbindir}/mosquitto \ + ${bindir}/mosquitto_passwd \ + ${sysconfdir} \ + ${systemd_unitdir}/system/mosquitto.service \ +" + +FILES_libmosquitto1 = "${libdir}/libmosquitto.so.1" + +FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.1" + +FILES_${PN}-clients = "${bindir}/mosquitto_pub \ + ${bindir}/mosquitto_sub \ +" + +FILES_${PN}-staticdev += "${libdir}/libmosquitto.a" + +FILES_${PN}-python = "/usr/lib/python2.7/site-packages" + +inherit systemd + +SYSTEMD_SERVICE_${PN} = "mosquitto.service" diff --git a/meta-edison-middleware/recipes-connectivity/paho-mqtt/files/makefile.patch b/meta-edison-middleware/recipes-connectivity/paho-mqtt/files/makefile.patch new file mode 100644 index 0000000..4d1e25b --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/paho-mqtt/files/makefile.patch @@ -0,0 +1,19 @@ +--- + Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 33bd2d0..84262bd 100644 +--- a/Makefile ++++ b/Makefile +@@ -115,7 +115,8 @@ LDFLAGS_AS = -shared -Wl,-soname,lib${MQTTLIB_AS}.so.${MAJOR_VERSION} -lpthread + + all: build + +-build: | mkdir ${MQTTLIB_C_TARGET} ${MQTTLIB_CS_TARGET} ${MQTTLIB_A_TARGET} ${MQTTLIB_AS_TARGET} ${MQTTVERSION_TARGET} ${SYNC_SAMPLES} ${ASYNC_SAMPLES} ${SYNC_TESTS} ${SYNC_SSL_TESTS} ${ASYNC_TESTS} ${ASYNC_SSL_TESTS} ++build: | mkdir ${MQTTLIB_C_TARGET} ${MQTTLIB_CS_TARGET} ${MQTTLIB_A_TARGET} ${MQTTLIB_AS_TARGET} ++#${MQTTVERSION_TARGET} ${SYNC_SAMPLES} ${ASYNC_SAMPLES} ${SYNC_TESTS} ${SYNC_SSL_TESTS} ${ASYNC_TESTS} ${ASYNC_SSL_TESTS} + + clean: + rm -rf ${blddir}/* +-- diff --git a/meta-edison-middleware/recipes-connectivity/paho-mqtt/paho-mqtt_3.1.bb b/meta-edison-middleware/recipes-connectivity/paho-mqtt/paho-mqtt_3.1.bb new file mode 100644 index 0000000..37cab21 --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/paho-mqtt/paho-mqtt_3.1.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "Paho MQTT - user libraries for the MQTT and MQTT-SN protocols" +DESCRIPTION = "Client implementation of open and standard messaging protocols for Machine-to-Machine (M2M) and Internet of Things (IoT)." +HOMEPAGE = "http://www.eclipse.org/paho/" +SECTION = "console/network" +LICENSE = "EPL-1.0 | EDL-1.0" + +LIC_FILES_CHKSUM = " \ + file://edl-v10;md5=3adfcc70f5aeb7a44f3f9b495aa1fbf3 \ + file://epl-v10;md5=659c8e92a40b6df1d9e3dccf5ae45a08 \ +" + +PR = "r1" + +SRC_URI = "git://git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.c.git;protocol=http \ + file://makefile.patch \ +" + +SRCREV = "93a064dbe9fd2fc84b8bb2701e10d2de8004a11c" + +S = "${WORKDIR}/git" + +do_compile() { + oe_runmake +} + +do_install() { + install -d ${D}${libdir} + oe_libinstall -C build/output -so libpaho-mqtt3a ${D}${libdir} + oe_libinstall -C build/output -so libpaho-mqtt3as ${D}${libdir} + oe_libinstall -C build/output -so libpaho-mqtt3c ${D}${libdir} + oe_libinstall -C build/output -so libpaho-mqtt3cs ${D}${libdir} + install -d ${D}${includedir} + install -m 644 src/MQTTAsync.h ${D}${includedir} + install -m 644 src/MQTTClient.h ${D}${includedir} + install -m 644 src/MQTTClientPersistence.h ${D}${includedir} +} + +DEPENDS = "openssl" +RDEPENDS_${PN} = "openssl" diff --git a/meta-edison-middleware/recipes-connectivity/sshpass/sshpass.inc b/meta-edison-middleware/recipes-connectivity/sshpass/sshpass.inc new file mode 100644 index 0000000..b19ae43 --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/sshpass/sshpass.inc @@ -0,0 +1,10 @@ +DESCRIPTION = "Non-interactive ssh password auth" +HOMEPAGE = "http://sshpass.sourceforge.net/" +SECTION = "console/network" +LICENSE = "GPLv2" + +SRC_URI = "${SOURCEFORGE_MIRROR}/sshpass/sshpass-${PV}.tar.gz" + +INC_PR = "r0" + +inherit autotools diff --git a/meta-edison-middleware/recipes-connectivity/sshpass/sshpass_1.05.bb b/meta-edison-middleware/recipes-connectivity/sshpass/sshpass_1.05.bb new file mode 100644 index 0000000..a345dbd --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/sshpass/sshpass_1.05.bb @@ -0,0 +1,8 @@ +PR = "${INC_PR}.0" + +require sshpass.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI[md5sum] = "c52d65fdee0712af6f77eb2b60974ac7" +SRC_URI[sha256sum] = "c3f78752a68a0c3f62efb3332cceea0c8a1f04f7cf6b46e00ec0c3000bc8483e" diff --git a/meta-edison-middleware/recipes-connectivity/zeromq/cppzmq_git.bb b/meta-edison-middleware/recipes-connectivity/zeromq/cppzmq_git.bb new file mode 100644 index 0000000..26e89b1 --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/zeromq/cppzmq_git.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "C++ bindings for ZeroMQ" +HOMEPAGE = "http://www.zeromq.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=db174eaf7b55a34a7c89551197f66e94" +DEPENDS = "zeromq" +SRCREV = "ee47ae4cddc304741526c9bb2035f98c3274e0ec" + +SRC_URI = "git://github.com/zeromq/cppzmq.git" + +S = "${WORKDIR}/git" + +do_install () { + install -d ${D}/usr/include + install -m 0755 ${S}/zmq.hpp ${D}/usr/include/ +} + +PACKAGES = "${PN}-dev" + +RDEPENDS_${PN}-dev = "zeromq-dev" diff --git a/meta-edison-middleware/recipes-connectivity/zeromq/zeromq_4.0.4.bb b/meta-edison-middleware/recipes-connectivity/zeromq/zeromq_4.0.4.bb new file mode 100644 index 0000000..2b6b225 --- /dev/null +++ b/meta-edison-middleware/recipes-connectivity/zeromq/zeromq_4.0.4.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "Zeromq - The Intelligent Transport Layer" +HOMEPAGE = "http://www.zeromq.org" +LICENSE = "LGPLv3+" + +PR = "r2" + +LIC_FILES_CHKSUM = " \ + file://COPYING.LESSER;md5=d5311495d952062e0e4fbba39cbf3de1 \ +" + +SRC_URI = "http://download.zeromq.org/zeromq-${PV}.tar.gz" +SRC_URI[md5sum] = "f3c3defbb5ef6cc000ca65e529fdab3b" +SRC_URI[sha256sum] = "1ef71d46e94f33e27dd5a1661ed626cd39be4d2d6967792a275040e34457d399" + +inherit autotools gettext diff --git a/meta-edison-middleware/recipes-core/images/edison-image.bbappend b/meta-edison-middleware/recipes-core/images/edison-image.bbappend new file mode 100644 index 0000000..c43c465 --- /dev/null +++ b/meta-edison-middleware/recipes-core/images/edison-image.bbappend @@ -0,0 +1,28 @@ +IMAGE_INSTALL += "packagegroup-core-buildessential" + +IMAGE_INSTALL += "iotkit-opkg" +IMAGE_INSTALL += "zeromq-dev" +IMAGE_INSTALL += "cppzmq-dev" +IMAGE_INSTALL += "paho-mqtt-dev" +IMAGE_INSTALL += "mdns-dev" +IMAGE_INSTALL += "iotkit-comm-js" +IMAGE_INSTALL += "iotkit-comm-c-dev" +IMAGE_INSTALL += "iotkit-agent" +IMAGE_INSTALL += "iotkit-lib-c-dev" +IMAGE_INSTALL += "xdk-daemon" +IMAGE_INSTALL += "oobe" + +# mosquitto and dependencies +IMAGE_INSTALL += "mosquitto-dev" +IMAGE_INSTALL += "mosquitto-clients" + +# node and sub-components +IMAGE_INSTALL += "nodejs-dev" +IMAGE_INSTALL += "nodejs-npm" + +# MRAA +IMAGE_INSTALL += "mraa-dev" +IMAGE_INSTALL += "mraa-doc" + +# UPM +IMAGE_INSTALL += "upm-dev" diff --git a/meta-edison-middleware/recipes-devtools/iotkit-agent/iotkit-agent_0.2.0.bb b/meta-edison-middleware/recipes-devtools/iotkit-agent/iotkit-agent_0.2.0.bb new file mode 100644 index 0000000..29d7d70 --- /dev/null +++ b/meta-edison-middleware/recipes-devtools/iotkit-agent/iotkit-agent_0.2.0.bb @@ -0,0 +1,84 @@ +DESCRIPTION = "Transparently implements the necessary message formats and transport security as well as device registration" +HOMEPAGE = "http://enableiot.com" +LICENSE = "BSD-2-Clause & BSD-3-Clause & GPL-2.0 & Apache-2.0 & MIT & PD" + +LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=30c8ae0368f724cf5f753d08bf033034" + +DEPENDS = "nodejs-native" + +SRC_URI = "git://github.com/intel-iot-devkit/iotkit-agent.git;protocol=https;branch=dprelease;tag=prod-v${PV}" + +S = "${WORKDIR}/git" + +do_compile () { + # changing the home directory to the working directory, the .npmrc will be created in this directory + export HOME=${WORKDIR} + + # does not build dev packages + npm config set dev false + + # access npm registry using http + npm set strict-ssl false + npm config set registry http://registry.npmjs.org/ + + # configure http proxy if neccessary + if [ -n "${http_proxy}" ]; then + npm config set proxy ${http_proxy} + fi + if [ -n "${HTTP_PROXY}" ]; then + npm config set proxy ${HTTP_PROXY} + fi + + # configure cache to be in working directory + npm set cache ${WORKDIR}/npm_cache + + # clear local cache prior to each compile + npm cache clear + + # compile and install node modules in source directory + npm --arch=${TARGET_ARCH} --production --verbose install +} + +do_install () { + install -d ${D}${libdir} + install -d ${D}${libdir}/node_modules/ + install -d ${D}${libdir}/node_modules/iotkit-agent/ + install -d ${D}${sysconfdir}/iotkit-agent/ + install -d ${D}${libdir}/node_modules/iotkit-agent/config/ + install -m 0644 ${S}/package.json ${D}${libdir}/node_modules/iotkit-agent/ + install -m 0644 ${S}/config/config.json ${D}${sysconfdir}/iotkit-agent/ + install -d ${D}${datadir}/iotkit-agent/ + install -d ${D}${bindir} + + cp -r ${S}/node_modules ${D}${libdir}/node_modules/iotkit-agent/ + cp -r ${S}/admin ${D}${libdir}/node_modules/iotkit-agent/ + cp -r ${S}/api ${D}${libdir}/node_modules/iotkit-agent/ + cp -r ${S}/bin ${D}${libdir}/node_modules/iotkit-agent/ + cp -r ${S}/certs ${D}${datadir}/iotkit-agent/ + cp -r ${S}/data ${D}${datadir}/iotkit-agent/ + cp -r ${S}/lib ${D}${libdir}/node_modules/iotkit-agent/ + cp -r ${S}/listeners ${D}${libdir}/node_modules/iotkit-agent/ + install -m 0644 ${S}/config/index.js ${D}${libdir}/node_modules/iotkit-agent/config + install -m 0755 ${S}/iotkit-admin.js ${D}${libdir}/node_modules/iotkit-agent/ + install -m 0755 ${S}/iotkit-agent.js ${D}${libdir}/node_modules/iotkit-agent/ + ln -s ../lib/node_modules/iotkit-agent/iotkit-agent.js ${D}${bindir}/iotkit-agent + ln -s ../lib/node_modules/iotkit-agent/iotkit-admin.js ${D}${bindir}/iotkit-admin + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/iotkit-agent.service ${D}${systemd_unitdir}/system/ +} + +inherit systemd + +# since the agent requires registration before running we don't want to start +# the systemd service by default +SYSTEMD_AUTO_ENABLE = "disable" +SYSTEMD_SERVICE_${PN} = "iotkit-agent.service" + +FILES_${PN} = "${libdir}/node_modules/ \ + ${bindir}/iotkit-agent \ + ${bindir}/iotkit-admin \ + ${datadir}/iotkit-agent/ \ + ${sysconfdir}/iotkit-agent/" + +PACKAGES = "${PN}" diff --git a/meta-edison-middleware/recipes-devtools/iotkit-comm-c/iotkit-comm-c_0.1.1.bb b/meta-edison-middleware/recipes-devtools/iotkit-comm-c/iotkit-comm-c_0.1.1.bb new file mode 100644 index 0000000..c1c0260 --- /dev/null +++ b/meta-edison-middleware/recipes-devtools/iotkit-comm-c/iotkit-comm-c_0.1.1.bb @@ -0,0 +1,114 @@ +DESCRIPTION = "Inter of Things communication library for device-to-device and device-to-cloud messaging" +LICENSE = "MIT" + +PR = "r2" + +SRC_URI = "git://github.com/intel-iot-devkit/iotkit-comm-c.git;protocol=git" +SRCREV = "2367175b07852a8d2600677f5d893af49973f422" + +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=e8db6501ed294e65418a933925d12058 \ +" + +S = "${WORKDIR}/git" + +DEPENDS = "zeromq mdns paho-mqtt" + +inherit pkgconfig cmake + +do_configure() { + cd ${B}/ + cmake ${S}/src +} + +do_compile() { + cd ${B}/ + oe_runmake +} + +do_install() { + # Copy the header files to /usr/include/iotkit-comm + install -d ${D}${includedir}/iotkit-comm + install -m 644 ${S}/src/lib/cJSON/cJSON.h ${D}${includedir}/iotkit-comm/ + install -m 644 ${S}/src/lib/libiotkit-comm/iotkit-comm.h ${D}${includedir}/iotkit-comm/ + install -m 644 ${S}/src/lib/libiotkit-comm/iotkit-comm_mdns.h ${D}${includedir}/iotkit-comm/ + install -m 644 ${S}/src/lib/libiotkit-comm/util.h ${D}${includedir}/iotkit-comm/ + + # Copy the shared libraries to /usr/lib + install -d ${D}${libdir} + install ${B}/lib/libiotkit-comm/libiotkit-comm.so ${D}${libdir}/ + install ${B}/lib/plugins/libiotkitpubsub/libiotkit-agent-client.so ${D}${libdir}/ + install ${B}/lib/plugins/libiotkitpubsub/libiotkit-agent-service.so ${D}${libdir}/ + install ${B}/lib/plugins/libmqttpubsub/libmqttpubsub-client.so ${D}${libdir}/ + install ${B}/lib/plugins/libmqttpubsub/libmqttpubsub-service.so ${D}${libdir}/ + install ${B}/lib/plugins/libzmqpubsub/libzmqpubsub-client.so ${D}${libdir}/ + install ${B}/lib/plugins/libzmqpubsub/libzmqpubsub-service.so ${D}${libdir}/ + install ${B}/lib/plugins/libzmqreqrep/libzmqreqrep-client.so ${D}${libdir}/ + install ${B}/lib/plugins/libzmqreqrep/libzmqreqrep-service.so ${D}${libdir}/ + + # Copy config files + install -d ${D}${sysconfdir}/iotkit-comm + install -m 644 ${S}/src/lib/libiotkit-comm/config.json ${D}${sysconfdir}/iotkit-comm/ + cp -r ${S}/src/lib/libiotkit-comm/plugin-interfaces ${D}${sysconfdir}/iotkit-comm/ + + # Copy the Sample apps + install -d ${D}${datadir}/iotkit-comm + install -d ${D}${datadir}/iotkit-comm/examples + install -d ${D}${datadir}/iotkit-comm/examples/c + cp -r ${S}/src/examples/iotkit-apps ${D}${datadir}/iotkit-comm/examples/c/ + cp -r ${S}/src/examples/zmq-apps ${D}${datadir}/iotkit-comm/examples/c/ + cp -r ${S}/src/examples/mqtt-apps ${D}${datadir}/iotkit-comm/examples/c/ + cp -r ${S}/src/examples/serviceQueries ${D}${datadir}/iotkit-comm/examples/c/ + cp -r ${S}/src/examples/serviceSpecs ${D}${datadir}/iotkit-comm/examples/c/ + cp -r ${S}/src/examples/distributed-thermostat ${D}${datadir}/iotkit-comm/examples/c/ + rm -rf ${D}${datadir}/iotkit-comm/examples/c/iotkit-apps/CMakeLists.txt + rm -rf ${D}${datadir}/iotkit-comm/examples/c/mqtt-apps/CMakeLists.txt + rm -rf ${D}${datadir}/iotkit-comm/examples/c/zmq-apps/CMakeLists.txt + rm -rf ${D}${datadir}/iotkit-comm/examples/c/distributed-thermostat/CMakeLists.txt + rm -rf ${D}${datadir}/iotkit-comm/examples/c/distributed-thermostat/doxygen.conf + install ${B}/examples/distributed-thermostat/dashboard ${D}${datadir}/iotkit-comm/examples/c/ + install ${B}/examples/distributed-thermostat/sensor ${D}${datadir}/iotkit-comm/examples/c/ + install ${B}/examples/distributed-thermostat/thermostat ${D}${datadir}/iotkit-comm/examples/c/ + install ${B}/examples/iotkit-apps/iotkitclient ${D}${datadir}/iotkit-comm/examples/c/ + install ${B}/examples/iotkit-apps/iotkitservice ${D}${datadir}/iotkit-comm/examples/c/ + install ${B}/examples/mqtt-apps/subscriber ${D}${datadir}/iotkit-comm/examples/c/ + install ${B}/examples/mqtt-apps/publisher ${D}${datadir}/iotkit-comm/examples/c/ + install ${B}/examples/zmq-apps/zmqsubclient ${D}${datadir}/iotkit-comm/examples/c/ + install ${B}/examples/zmq-apps/zmqpubservice ${D}${datadir}/iotkit-comm/examples/c/ + install ${B}/examples/zmq-apps/zmqreqclient ${D}${datadir}/iotkit-comm/examples/c/ + install ${B}/examples/zmq-apps/zmqrepservice ${D}${datadir}/iotkit-comm/examples/c/ + + # Copy the invalid/valid config json files which are needed for Test programs + install -d ${D}${datadir}/iotkit-comm/tests/ + install -d ${D}${datadir}/iotkit-comm/tests/c/ + install -d ${D}${datadir}/iotkit-comm/tests/c/libiotkit-comm + cp ${S}/src/tests/libiotkit-comm/*.json ${D}${datadir}/iotkit-comm/tests/c/libiotkit-comm/ + + # Copy test programs + cp ${B}/tests/CTestTestfile.cmake ${D}${datadir}/iotkit-comm/tests/c/ + install -d ${D}${datadir}/iotkit-comm/tests/c/iotkitpubsub + cp ${B}/tests/iotkitpubsub/iotkitpubsub* ${D}${datadir}/iotkit-comm/tests/c/iotkitpubsub/ + cp ${B}/tests/iotkitpubsub/CTestTestfile.cmake ${D}${datadir}/iotkit-comm/tests/c/iotkitpubsub/ + install -d ${D}${datadir}/iotkit-comm/tests/c/mqttpubsub + cp ${B}/tests/mqttpubsub/mqttpubsub* ${D}${datadir}/iotkit-comm/tests/c/mqttpubsub/ + cp ${B}/tests/mqttpubsub/CTestTestfile.cmake ${D}${datadir}/iotkit-comm/tests/c/mqttpubsub/ + install -d ${D}${datadir}/iotkit-comm/tests/c/zmqpubsub + cp ${B}/tests/zmqpubsub/zmqpubsub_* ${D}${datadir}/iotkit-comm/tests/c/zmqpubsub/ + cp ${B}/tests/zmqpubsub/CTestTestfile.cmake ${D}${datadir}/iotkit-comm/tests/c/zmqpubsub/ + cp ${B}/tests/libiotkit-comm/mdns_* ${D}${datadir}/iotkit-comm/tests/c/libiotkit-comm/ + cp ${B}/tests/libiotkit-comm/iotkit-comm_* ${D}${datadir}/iotkit-comm/tests/c/libiotkit-comm/ + cp ${B}/tests/libiotkit-comm/CTestTestfile.cmake ${D}${datadir}/iotkit-comm/tests/c/libiotkit-comm/ + install -d ${D}${datadir}/iotkit-comm/tests/c/zmqreqrep + cp ${B}/tests/zmqreqrep/zmqreqrep_* ${D}${datadir}/iotkit-comm/tests/c/zmqreqrep/ + cp ${B}/tests/zmqreqrep/CTestTestfile.cmake ${D}${datadir}/iotkit-comm/tests/c/zmqreqrep/ +} + +FILES_${PN} += "${libdir}" +RDEPENDS_${PN} = "zeromq mdns paho-mqtt mosquitto sshpass" + +PACKAGES += "${PN}-tests" +RDEPENDS_${PN}-tests += "${PN} gcov cmake" + +FILES_${PN}-dev = "${includedir} ${datadir}/iotkit-comm/examples/c/" +FILES_${PN}-dbg += "${datadir}/iotkit-comm/examples/c/.debug/ ${datadir}/iotkit-comm/tests/c/iotkitpubsub/.debug/ ${datadir}/iotkit-comm/tests/c/mqttpubsub/.debug/ ${datadir}/iotkit-comm/tests/c/zmqpubsub/.debug/ ${datadir}/iotkit-comm/tests/c/libiotkit-comm/.debug/ ${datadir}/iotkit-comm/tests/c/zmqreqrep/.debug/" +FILES_${PN}-tests += "${datadir}/iotkit-comm/tests/c/" diff --git a/meta-edison-middleware/recipes-devtools/iotkit-comm-js/iotkit-comm-js_0.1.1.bb b/meta-edison-middleware/recipes-devtools/iotkit-comm-js/iotkit-comm-js_0.1.1.bb new file mode 100644 index 0000000..8b0d20f --- /dev/null +++ b/meta-edison-middleware/recipes-devtools/iotkit-comm-js/iotkit-comm-js_0.1.1.bb @@ -0,0 +1,100 @@ +DESCRIPTION = "Inter of Things communication library for device-to-device and device-to-cloud messaging" +LICENSE = "MIT" + +PR = "r2" + +SRC_URI = "git://github.com/intel-iot-devkit/iotkit-comm-js.git;protocol=git" +SRCREV = "5ccea56e88755c9f6e3cd37bb5fc5d747b8496aa" + +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=e8db6501ed294e65418a933925d12058 \ +" + +S = "${WORKDIR}/git" + +DEPENDS = "nodejs-native zeromq mdns paho-mqtt" + +do_compile () { + # changing the home directory to the working directory, the .npmrc will be created in this directory + export HOME=${WORKDIR} + + # does not build dev packages + npm config set dev false + + # access npm registry using http + npm set strict-ssl false + npm config set registry http://registry.npmjs.org/ + + # configure http proxy if neccessary + if [ -n "${http_proxy}" ]; then + npm config set proxy ${http_proxy} + fi + if [ -n "${HTTP_PROXY}" ]; then + npm config set proxy ${HTTP_PROXY} + fi + + # configure cache to be in working directory + npm set cache ${WORKDIR}/npm_cache + + # clear local cache prior to each compile + npm cache clear + + # compile and install node modules in source directory + npm --arch=${TARGET_ARCH} --verbose install +} + +do_install () { + install -d ${D}${libdir}/node_modules/iotkit-comm/ + cp -r ${S}/node_modules ${D}${libdir}/node_modules/iotkit-comm/ + install -m 644 ${S}/package.json ${D}${libdir}/node_modules/iotkit-comm/ + install -m 644 ${S}/COPYING ${D}${libdir}/node_modules/iotkit-comm/ + install -m 644 ${S}/README.md ${D}${libdir}/node_modules/iotkit-comm/ + install -m 644 ${S}/jsdoc-conf.json ${D}${libdir}/node_modules/iotkit-comm/ + cp -r ${S}/lib ${D}${libdir}/node_modules/iotkit-comm/ + cp -r ${S}/test ${D}${libdir}/node_modules/iotkit-comm/ + cp -r ${S}/doc ${D}${libdir}/node_modules/iotkit-comm/ + install -d ${D}${datadir}/iotkit-comm/examples/node + cp -r ${S}/example/* ${D}${datadir}/iotkit-comm/examples/node + + chmod 755 ${D}${libdir}/node_modules/iotkit-comm/lib/setup.js + install -d ${D}${bindir} + ln -s ../lib/node_modules/iotkit-comm/lib/setup.js ${D}${bindir}/iotkit-comm +} + +INHIBIT_PACKAGE_STRIP = "1" + +PACKAGES = "${PN} ${PN}-test-dependencies" + +FILES_${PN}-test-dependencies = " \ + ${libdir}/node_modules/iotkit-comm/node_modules/.bin/istanbul \ + ${libdir}/node_modules/iotkit-comm/node_modules/.bin/jsdoc \ + ${libdir}/node_modules/iotkit-comm/node_modules/.bin/mocha \ + ${libdir}/node_modules/iotkit-comm/node_modules/.bin/_mocha \ + ${libdir}/node_modules/iotkit-comm/node_modules/chai/ \ + ${libdir}/node_modules/iotkit-comm/node_modules/istanbul/ \ + ${libdir}/node_modules/iotkit-comm/node_modules/jsdoc/ \ + ${libdir}/node_modules/iotkit-comm/node_modules/mocha/ \ +" + +FILES_${PN} = " \ + ${libdir}/node_modules/iotkit-comm/doc/ \ + ${libdir}/node_modules/iotkit-comm/jsdoc-conf.json \ + ${libdir}/node_modules/iotkit-comm/COPYING \ + ${libdir}/node_modules/iotkit-comm/lib/ \ + ${libdir}/node_modules/iotkit-comm/package.json \ + ${libdir}/node_modules/iotkit-comm/README.md \ + ${libdir}/node_modules/iotkit-comm/test \ + ${libdir}/node_modules/iotkit-comm/node_modules/.bin/mqtt_pub \ + ${libdir}/node_modules/iotkit-comm/node_modules/.bin/mqtt_sub \ + ${libdir}/node_modules/iotkit-comm/node_modules/async/ \ + ${libdir}/node_modules/iotkit-comm/node_modules/commander/ \ + ${libdir}/node_modules/iotkit-comm/node_modules/mdns2/ \ + ${libdir}/node_modules/iotkit-comm/node_modules/mqtt/ \ + ${libdir}/node_modules/iotkit-comm/node_modules/read/ \ + ${libdir}/node_modules/iotkit-comm/node_modules/zmq/ \ + ${datadir}/iotkit-comm/examples/ \ + ${bindir}/iotkit-comm \ +" + +RDEPENDS_${PN} = "nodejs zeromq mdns paho-mqtt mosquitto sshpass" +RDEPENDS_${PN}-test-dependencies = "${PN}" diff --git a/meta-edison-middleware/recipes-devtools/iotkit-lib-c/iotkit-lib-c_0.1.0.bb b/meta-edison-middleware/recipes-devtools/iotkit-lib-c/iotkit-lib-c_0.1.0.bb new file mode 100644 index 0000000..629cee7 --- /dev/null +++ b/meta-edison-middleware/recipes-devtools/iotkit-lib-c/iotkit-lib-c_0.1.0.bb @@ -0,0 +1,49 @@ +SUMMARY = "Transparently implements the necessary message formats and transport security as well as device registration" +SECTION = "libs" +HOMEPAGE = "http://enableiot.com" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=e8db6501ed294e65418a933925d12058" + +DEPENDS = "nodejs-native swig-native curl" + +PR = "r1" + +SRC_URI = "git://github.com/enableiot/iotkit-lib-c.git;protocol=https;tag=v1.4.0" + +S = "${WORKDIR}/git" + +EXTRA_OECMAKE += " -DSTAGING_DIR_TARGET=${STAGING_DIR_TARGET}" + +inherit distutils-base pkgconfig python-dir cmake + +do_compile_prepend () { + # when yocto builds in ${D} it does not have access to ../git/.git so git + # describe --tags fails. In order not to tag our version as dirty we use this + # trick + sed -i 's/-dirty//' src/version.c +} + +do_install_prepend () { + # Copy config file + install -d ${D}${sysconfdir}/iotkit-lib + install -d ${D}${datadir}/iotkit-lib + install -m 644 ${S}/config/config.json ${D}${sysconfdir}/iotkit-lib/ + + # Copy test programs + cp -r ${B}/tests/ ${D}${datadir}/iotkit-lib/ + rm -rf ${D}${datadir}/iotkit-lib/tests/CMakeFiles/ + touch ${D}${datadir}/iotkit-lib/.setup.done +} + +PACKAGES =+ "${PN}-tests" + +FILES_${PN}-dbg += "${libdir}/node_modules/iotkitjs/.debug/ \ + ${PYTHON_SITEPACKAGES_DIR}/.debug/ \ + ${datadir}/iotkit-lib/tests/.debug/" + +FILES_${PN}-tests = "${datadir}/iotkit-lib/tests/*" + +FILES_${PN} += "${sysconfdir} \ + ${datadir}/iotkit-lib/.setup.done" + +RDEPENDS_${PN}-tests += "${PN} gcov cmake" diff --git a/meta-edison-middleware/recipes-devtools/iotkit-opkg/files/iotkit.conf b/meta-edison-middleware/recipes-devtools/iotkit-opkg/files/iotkit.conf new file mode 100644 index 0000000..a44c5c0 --- /dev/null +++ b/meta-edison-middleware/recipes-devtools/iotkit-opkg/files/iotkit.conf @@ -0,0 +1 @@ +src iotkit http://iotdk.intel.com/repos/1.1/intelgalactic diff --git a/meta-edison-middleware/recipes-devtools/iotkit-opkg/iotkit-opkg_0.0.1.bb b/meta-edison-middleware/recipes-devtools/iotkit-opkg/iotkit-opkg_0.0.1.bb new file mode 100644 index 0000000..019c9ba --- /dev/null +++ b/meta-edison-middleware/recipes-devtools/iotkit-opkg/iotkit-opkg_0.0.1.bb @@ -0,0 +1,22 @@ +DESCRIPTION="This configures the opkg sources for the iotkit packages" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = " \ + file://iotkit.conf \ +" + +PR = "r0" + +do_install() { + install -d ${D}${sysconfdir}/opkg + install -m 0644 ${WORKDIR}/iotkit.conf ${D}${sysconfdir}/opkg +} + + +RDEPENDS_${PN} = "opkg" + +FILES_${PN} = "${sysconfdir}/opkg" + +PACKAGES = "${PN}" + diff --git a/meta-edison-middleware/recipes-devtools/mraa/mraa_0.5.2.bb b/meta-edison-middleware/recipes-devtools/mraa/mraa_0.5.2.bb new file mode 100644 index 0000000..787c36b --- /dev/null +++ b/meta-edison-middleware/recipes-devtools/mraa/mraa_0.5.2.bb @@ -0,0 +1,27 @@ +SUMMARY = "Low Level Skeleton Library for Communication on Intel platforms" +SECTION = "libs" +AUTHOR = "Brendan Le Foll, Tom Ingleby" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=e8db6501ed294e65418a933925d12058" + +DEPENDS = "nodejs swig-native" + +SRC_URI = "git://github.com/intel-iot-devkit/mraa.git;protocol=git" +SRCREV = "bb3228ad5854b5f289c32737a6a106b139e24a05" + +S = "${WORKDIR}/git" + +inherit distutils-base pkgconfig python-dir cmake + +FILES_${PN}-doc += "${datadir}/mraa/examples/" + +FILES_${PN}-dbg += "${libdir}/node_modules/mraajs/.debug/ \ + ${PYTHON_SITEPACKAGES_DIR}/.debug/" + +do_compile_prepend () { + # when yocto builds in ${D} it does not have access to ../git/.git so git + # describe --tags fails. In order not to tag our version as dirty we use this + # trick + sed -i 's/-dirty//' src/version.c +}
\ No newline at end of file diff --git a/meta-edison-middleware/recipes-devtools/nodejs/nodejs_0.10.28.bb b/meta-edison-middleware/recipes-devtools/nodejs/nodejs_0.10.28.bb new file mode 100644 index 0000000..a463bc8 --- /dev/null +++ b/meta-edison-middleware/recipes-devtools/nodejs/nodejs_0.10.28.bb @@ -0,0 +1,85 @@ +DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" +HOMEPAGE = "http://nodejs.org" +# tools/wrk is under Apache-2.0 +LICENSE = "MIT & BSD & Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4a31e6c424761191227143b86f58a1ef" + +DEPENDS = "openssl" +DEPENDS_class-target = "nodejs-native" + +PR = "r1" + +SRC_URI = "git://github.com/joyent/node.git;protocol=https;branch=v0.10;tag=v0.10.28" + +S = "${WORKDIR}/git" + +# v8 errors out if you have set CCACHE +CCACHE = "" + +ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)}" +ARCHFLAGS ?= "" + +# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi +do_configure () { + export LD="${CXX}" + ./configure --prefix=${prefix} --without-snapshot --shared-openssl ${ARCHFLAGS} +} + +do_compile () { + export LD="${CXX}" + make BUILDTYPE=Release +} + +do_install () { + oe_runmake install DESTDIR=${D} +} + +do_install_append_class-target () { + # install node-gyp node hedaers in /usr/include/node-gyp/ + cd ${D}/${libdir}/node_modules/npm/node_modules/node-gyp/ + export HOME=${D}/usr/include/node-gyp + + sed -i 's/\.node-gyp//' lib/node-gyp.js + + # configure http proxy if neccessary + if [ -n "${http_proxy}" ]; then + ${STAGING_BINDIR_NATIVE}/node bin/node-gyp.js --verbose --proxy=${http_proxy} install + elif [ -n "${HTTP_PROXY}" ]; then + ${STAGING_BINDIR_NATIVE}/node bin/node-gyp.js --verbose --proxy=${HTTP_PROXY} install + else + ${STAGING_BINDIR_NATIVE}/node bin/node-gyp.js --verbose install + fi +} + +do_install_append_class-native() { + # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js + # use sed on npm-cli.js because otherwise symlink is replaced with normal file and + # npm-cli.js continues to use old shebang + sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${libdir}/node_modules/npm/bin/npm-cli.js +} + +do_install_append_class-target() { + sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${libdir}/node_modules/npm/bin/npm-cli.js +} + +pkg_postinst_${PN} () { + sed -e '/^PATH=/aNODE_PATH=\/usr\/lib\/node_modules\/' \ + -e 's/\(^export\)\(.*\)/\1 NODE_PATH\2/' \ + -i $D/etc/profile +} + +pkg_prerm_${PN} () { + sed -e '/^NODE_PATH.*$/d' \ + -e 's/\(^export\)\(.*\)\(\<NODE_PATH\>\s\)\(.*\)/\1\2\4/' \ + -i $D/etc/profile +} + +RDEPENDS_${PN} = "curl" +RDEPENDS_${PN}_class-native = "" + +PACKAGES += "${PN}-npm" +FILES_${PN}-npm = "${libdir}/node_modules ${bindir}/npm" +RDEPENDS_${PN}-npm = "python-shell python-datetime python-subprocess python-crypt python-textutils \ + python-netclient python-ctypes python-misc python-compiler python-multiprocessing" + +BBCLASSEXTEND = "native" diff --git a/meta-edison-middleware/recipes-devtools/oobe/oobe_0.0.1.bb b/meta-edison-middleware/recipes-devtools/oobe/oobe_0.0.1.bb new file mode 100644 index 0000000..ebf73d0 --- /dev/null +++ b/meta-edison-middleware/recipes-devtools/oobe/oobe_0.0.1.bb @@ -0,0 +1,64 @@ +DESCRIPTION="The out-of-box configuration service" +LICENSE = "MIT" + +S = "${EDISONREPO_TOP_DIR}/mw/oobe" + +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=ea398a763463b76b18da15f013c0c531 \ +" + +DEPENDS = "nodejs-native" + +do_compile() { + # changing the home directory to the working directory, the .npmrc will be created in this directory + export HOME=${WORKDIR} + + # does not build dev packages + npm config set dev false + + # access npm registry using http + npm set strict-ssl false + npm config set registry http://registry.npmjs.org/ + + # configure http proxy if neccessary + if [ -n "${http_proxy}" ]; then + npm config set proxy ${http_proxy} + fi + if [ -n "${HTTP_PROXY}" ]; then + npm config set proxy ${HTTP_PROXY} + fi + + # configure cache to be in working directory + npm set cache ${WORKDIR}/npm_cache + + # clear local cache prior to each compile + npm cache clear + + # compile and install node modules in source directory + npm --arch=${TARGET_ARCH} --verbose install +} + +do_install() { + install -d ${D}${libdir}/edison_config_tools + install -d ${D}/var/lib/edison_config_tools + cp -r ${S}/src/public ${D}${libdir}/edison_config_tools + cp -r ${S}/node_modules ${D}${libdir}/edison_config_tools + install -m 0644 ${S}/src/server.js ${D}${libdir}/edison_config_tools/edison-config-server.js + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/src/edison_config.service ${D}${systemd_unitdir}/system/ + install -d ${D}${bindir} + install -m 0755 ${S}/src/configure_edison ${D}${bindir} +} + +inherit systemd + +SYSTEMD_AUTO_ENABLE = "enable" +SYSTEMD_SERVICE_${PN} = "edison_config.service" + +FILES_${PN} = "${libdir}/edison_config_tools \ + ${systemd_unitdir}/system \ + /var/lib/edison_config_tools \ + ${bindir}/" + +PACKAGES = "${PN}" + diff --git a/meta-edison-middleware/recipes-devtools/upm/upm_0.1.8.bb b/meta-edison-middleware/recipes-devtools/upm/upm_0.1.8.bb new file mode 100644 index 0000000..b259d42 --- /dev/null +++ b/meta-edison-middleware/recipes-devtools/upm/upm_0.1.8.bb @@ -0,0 +1,17 @@ +SUMMARY = "Sensor/Actuator repository for Mraa" +SECTION = "libs" +AUTHOR = "Brendan Le Foll, Tom Ingleby, Yevgeniy Kiveisha" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=e8db6501ed294e65418a933925d12058" + +DEPENDS = "nodejs swig-native mraa" + +SRC_URI = "git://github.com/intel-iot-devkit/upm.git;protocol=git" +SRCREV = "88eaced5a23c23d1cfe3badfe8deeedda582ae50" + +S = "${WORKDIR}/git" + +inherit distutils-base pkgconfig python-dir cmake + +FILES_${PN}-doc += "${datadir}/upm/examples/"
\ No newline at end of file diff --git a/meta-edison-middleware/recipes-devtools/xdk-daemon/files/xdk-daemon-0.0.27.tar.bz2 b/meta-edison-middleware/recipes-devtools/xdk-daemon/files/xdk-daemon-0.0.27.tar.bz2 Binary files differnew file mode 100644 index 0000000..cff4bee --- /dev/null +++ b/meta-edison-middleware/recipes-devtools/xdk-daemon/files/xdk-daemon-0.0.27.tar.bz2 diff --git a/meta-edison-middleware/recipes-devtools/xdk-daemon/xdk-daemon_0.0.27.bb b/meta-edison-middleware/recipes-devtools/xdk-daemon/xdk-daemon_0.0.27.bb new file mode 100644 index 0000000..90eb588 --- /dev/null +++ b/meta-edison-middleware/recipes-devtools/xdk-daemon/xdk-daemon_0.0.27.bb @@ -0,0 +1,68 @@ +DESCRIPTION = "Provides communication to the Intel XDK" +LICENSE = "Proprietary" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=8a05f85865f8c4b9ba29798e539f93b7" + +DEPENDS = "nodejs-native mdns" +RDEPENDS_${PN} = "libarchive-bin" + +PR = "r0" + +# URI should point to some external http:// server +SRC_URI = "file://xdk-daemon-${PV}.tar.bz2" + +# we don't care about debug for the few binary node modules +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +do_compile () { + # changing the home directory to the working directory, the .npmrc will be created in this directory + export HOME=${WORKDIR} + + # does not build dev packages + npm config set dev false + + # access npm registry using http + npm set strict-ssl false + npm config set registry http://registry.npmjs.org/ + + # configure http proxy if neccessary + if [ -n "${http_proxy}" ]; then + npm config set proxy ${http_proxy} + fi + if [ -n "${HTTP_PROXY}" ]; then + npm config set proxy ${HTTP_PROXY} + fi + + # configure cache to be in working directory + npm set cache ${WORKDIR}/npm_cache + + # clear local cache prior to each compile + npm cache clear + + npm install --arch=${TARGET_ARCH} + cd current/ && npm install --arch=${TARGET_ARCH} + cd node-inspector-server && npm install --arch=${TARGET_ARCH} + + sed -i '/TM/d' ${S}/xdk-daemon +} + +do_install () { + install -d ${D}/opt/xdk-daemon/ + cp -a ${S}/* ${D}/opt/xdk-daemon/ + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/xdk-daemon.service ${D}${systemd_unitdir}/system/ + + install -d ${D}${bindir} + ln -s /opt/xdk-daemon/current/xdk-whitelist ${D}${bindir}/xdk-whitelist +} + +inherit systemd + +SYSTEMD_SERVICE_${PN} = "xdk-daemon.service" + +FILES_${PN} = "/opt/xdk-daemon/ \ + ${systemd_unitdir}/system/xdk-daemon.service \ + ${bindir}/" + +PACKAGES = "${PN}" |