Compare commits

...

15 Commits

Author SHA1 Message Date
Jakob Olsson
9d0b02adef update init.d and add config script 2019-01-18 15:06:42 +01:00
Jakob Olsson
45b5f2c09e update hash 2019-01-18 12:24:58 +01:00
Jakob Olsson
1a118e9aaf hash update 2019-01-18 12:24:58 +01:00
Jakob Olsson
909515b4bb update hash 2019-01-18 12:24:58 +01:00
Jakob Olsson
8b6b1b5ac5 add init.d script 2019-01-18 12:24:58 +01:00
Jakob Olsson
9b64ae9348 correct git path 2019-01-18 12:24:58 +01:00
Jakob Olsson
87be8345a0 update repo, hash and path 2019-01-18 12:24:58 +01:00
Jakob Olsson
e3d39bb8a4 update package dependencies 2019-01-18 12:24:58 +01:00
Jakob Olsson
2353a0a0f2 mqtt-ciotc: remove copy paste excess 2019-01-18 12:24:58 +01:00
Jakob Olsson
1b55cee8e0 jwt: include all shared lib files, use correct jansson dependency 2019-01-18 12:24:58 +01:00
Jakob Olsson
8925f9625b paho: include all shared lib and header files, remove redundant lines 2019-01-18 12:24:58 +01:00
Jakob Olsson
fa10a9536f package for the example file 2019-01-18 12:24:58 +01:00
Jakob Olsson
43eb8b4962 paho-mqtt-c package 2019-01-18 12:24:58 +01:00
Jakob Olsson
e40f3cd4f5 libjwt new version 2019-01-18 12:24:58 +01:00
Jakob Olsson
0cec084471 add libjwt makefile 2019-01-18 12:24:58 +01:00
5 changed files with 169 additions and 0 deletions

52
libjwt/Makefile Normal file
View File

@@ -0,0 +1,52 @@
# Copyright (C) 2018 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libjwt
PKG_VERSION:=1.0.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=866607c7741421c8ac99876e7201eb32d9af1b92
PKG_SOURCE_URL:=https://github.com/benmcollins/libjwt.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/libjwt
CATEGORY:=Libraries
DEPENDS:=+libopenssl +jansson
TITLE:= libjwt
endef
#TARGET_CFLAGS += \
# -I$(STAGING_DIR)/usr/include
# -I$(STAGING_DIR)/usr/include/libnl3
#MAKE_FLAGS += \
# CFLAGS="$(TARGET_CFLAGS)" \
# LDFLAGS="$(TARGET_LDFLAGS)" \
# FPIC="$(FPIC)" \
# PLATFORM="$(TARGET_PLATFORM)" \
# subdirs="$(subdirs)"
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/include/jwt.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libjwt/.libs/libjwt.so* $(1)/usr/lib/
endef
define Package/libjwt/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libjwt/.libs/libjwt.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libjwt))

36
mqtt-ciotc/Makefile Normal file
View File

@@ -0,0 +1,36 @@
#
# Copyright (C) 2013 Inteno
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mqtt-ciotc
PKG_VERSION:=0.1
PKG_SOURCE_VERSION:=eda5bc711c215cbfe50ddd0e8725b69d4a3cff4f
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifilife-testbed.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/mqtt-ciotc
CATEGORY:=Utilities
DEPENDS:=+libjwt +lib-paho-mqtt +libopenssl +libubox +ubus +libblobmsg-json
TITLE:=mqtt google iot clinet
endef
define Package/mqtt-ciotc/description
mqtt google iot client
endef
define Package/mqtt-ciotc/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mqtt_ciotc $(1)/sbin/
endef
$(eval $(call BuildPackage,mqtt-ciotc))

View File

@@ -0,0 +1,3 @@
config mqtt-ciotc mqtt-ciotc
option private-cert '/etc/mqtt-ciotc/rsa_private.pem'
option root-cert '/etc/mqtt-ciotc/roots.pem'

View File

@@ -0,0 +1,35 @@
#!/bin/sh /etc/rc.common
START=96
STOP=10
PROG=/sbin/mqtt-ciotc
USE_PROCD=1
start_service() {
procd_open_instance
procd_set_param command ${PROG}
config_load mqtt-ciotc
config_get private-cert mqtt-ciotc private-cert
config_get root-cert mqtt-ciotc root-cert
[ -n $private-cert ] && procd_append_param command --private-cert $private-cert
[ -n $root-cert ] && procd_append_param command --root-cert $root-cert
procd_set_param respawn
procd_close_instance
}
stop_service()
{
service_stop ${PROG}
}
reload_service() {
# procd_send_signal wifilife # use SIGHUP
stop
start
}
service_triggers() {
procd_add_reload_trigger "mqtt-ciotc"
}

43
paho-mqtt-c/Makefile Normal file
View File

@@ -0,0 +1,43 @@
#
# Copyright (C) 2013 Inteno
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=lib-paho-mqtt
PKG_VERSION:=0.1
PKG_SOURCE_VERSION:=9f715d0862a8e16099b5837c4e53a1bf6a6a0675
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/eclipse/paho.mqtt.c.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/lib-paho-mqtt
CATEGORY:=Libraries
DEPENDS:=+libopenssl
TITLE:=package for mqtt stuff
endef
define Package/lib-paho-mqtt/description
a library
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/*.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/output/*.so* $(1)/usr/lib/
endef
define Package/lib-paho-mqtt/install
$(INSTALL_DIR) $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/build/output/*.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,lib-paho-mqtt))