mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
add mqtt-ciotc and related pkgs
libjwt new version paho-mqtt-c package package for the example file paho: include all shared lib and header files, remove redundant lines jwt: include all shared lib files, use correct jansson dependency mqtt-ciotc: remove copy paste excess update package dependencies update repo, hash and path correct git path add init.d script update hash hash update update hash update init.d and add config script
This commit is contained in:
parent
fbde005657
commit
c9cf69ee54
5 changed files with 169 additions and 0 deletions
52
libjwt/Makefile
Normal file
52
libjwt/Makefile
Normal 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
36
mqtt-ciotc/Makefile
Normal 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))
|
||||
3
mqtt-ciotc/files/etc/config/mqtt-ciotc
Normal file
3
mqtt-ciotc/files/etc/config/mqtt-ciotc
Normal 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'
|
||||
35
mqtt-ciotc/files/etc/init.d/mqtt-ciotc
Executable file
35
mqtt-ciotc/files/etc/init.d/mqtt-ciotc
Executable 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
43
paho-mqtt-c/Makefile
Normal 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))
|
||||
Loading…
Add table
Reference in a new issue