You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

236 lines
6.5 KiB

  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=iotivity
  9. PKG_VERSION:=0.9.2
  10. PKG_RELEASE=1
  11. PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
  12. PKG_SOURCE_URL:=https://downloads.iotivity.org/${PKG_VERSION}/ \
  13. http://mirrors.kernel.org/${PKG_NAME}/${PKG_VERSION}/
  14. PKG_MD5SUM:=cf32e10a8f355fe1327db98ffc9a6173
  15. PKG_USE_MIPS16:=0
  16. PKG_MAINTAINER:=Hauke Mehrtens <hauke.mehrtens@lantiq.com>
  17. PKG_LICENSE:=Apache-2.0
  18. PKG_LICENSE_FILES:=LICENSE.md
  19. PKG_BUILD_DEPENDS:= +boost +libexpat
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/scons.mk
  22. define Package/iotivity
  23. SECTION:=net
  24. CATEGORY:=Network
  25. DEPENDS:=@!USE_UCLIBC +libpthread +librt +libuuid
  26. TITLE:=IoTivity C Library
  27. URL:=https://www.iotivity.org
  28. endef
  29. define Package/iotivity/description
  30. IoTivity is a framework for the Internet of Things based on the
  31. Open Interconnect Consortium Specification.
  32. endef
  33. define Package/iotivity-cpp
  34. SECTION:=net
  35. CATEGORY:=Network
  36. DEPENDS:=iotivity +libpthread +libstdcpp
  37. TITLE:=IoTivity C++ Library
  38. URL:=https://www.iotivity.org
  39. endef
  40. define Package/iotivity-cpp/description
  41. IoTivity is a framework for the Internet of Things based on the
  42. Open Interconnect Consortium Specification.
  43. endef
  44. define Package/iotivity-things-manager-lib
  45. SECTION:=net
  46. CATEGORY:=Network
  47. DEPENDS:=iotivity +iotivity-cpp +libstdcpp
  48. TITLE:=IoTivity things manager lib
  49. URL:=https://www.iotivity.org
  50. endef
  51. define Package/iotivity-things-manager-lib/description
  52. IoTivity things-manager lib
  53. endef
  54. define Package/iotivity-plugin-manager-lib
  55. SECTION:=net
  56. CATEGORY:=Network
  57. DEPENDS:=iotivity +iotivity-cpp +libexpat +boost +boost-system
  58. TITLE:=IoTivity plugin manager lib
  59. URL:=https://www.iotivity.org
  60. endef
  61. define Package/iotivity-plugin-manager-lib/description
  62. IoTivity plugin manager lib
  63. endef
  64. define Package/iotivity-mqttclient
  65. SECTION:=net
  66. CATEGORY:=Network
  67. DEPENDS:=iotivity +iotivity-cpp +iotivity-plugin-manager-lib +boost +boost-system
  68. TITLE:=IoTivity mqtt Client
  69. URL:=https://www.iotivity.org
  70. endef
  71. define Package/iotivity-mqttclient/description
  72. IoTivity mqtt Client
  73. endef
  74. define Package/iotivity-oic-middle
  75. SECTION:=net
  76. CATEGORY:=Network
  77. DEPENDS:=iotivity +iotivity-cpp
  78. TITLE:=IoTivity OIC Middle
  79. URL:=https://www.iotivity.org
  80. endef
  81. define Package/iotivity-oic-middle/description
  82. IoTivity OIC Middle
  83. endef
  84. define Package/iotivity-things-manager
  85. SECTION:=net
  86. CATEGORY:=Network
  87. DEPENDS:=iotivity +iotivity-cpp +iotivity-things-manager-lib
  88. TITLE:=IoTivity things manager
  89. URL:=https://www.iotivity.org
  90. endef
  91. define Package/iotivity-things-manager/description
  92. IoTivity things manager
  93. endef
  94. define Package/iotivity-example-garage
  95. SECTION:=net
  96. CATEGORY:=Network
  97. DEPENDS:=iotivity +iotivity-cpp
  98. TITLE:=IoTivity Garage example
  99. URL:=https://www.iotivity.org
  100. endef
  101. define Package/iotivity-example-garage/description
  102. An IoTivity example application
  103. endef
  104. PKG_TINYCBOR_NAME:=tinycbor
  105. PKG_TINYCBOR_VERSION:=3e83c0dc6e55bc73e9a4a7343ab8e06c43127efa
  106. PKG_TINYCBOR_SOURCE:=$(PKG_TINYCBOR_NAME)-$(PKG_TINYCBOR_VERSION).tar.bz2
  107. PKG_TINYCBOR_PROTO:=git
  108. PKG_TINYCBOR_SOURCE_URL:=https://github.com/01org/tinycbor.git
  109. PKG_TINYCBOR_SUBDIR:=$(PKG_TINYCBOR_NAME)
  110. #PKG_TINYCBOR_MIRROR_MD5SUM:=?
  111. define Download/iotivity-tinycbor
  112. FILE:=$(PKG_TINYCBOR_SOURCE)
  113. URL:=$(PKG_TINYCBOR_SOURCE_URL)
  114. PROTO:=$(PKG_TINYCBOR_PROTO)
  115. VERSION:=$(PKG_TINYCBOR_VERSION)
  116. SUBDIR:=$(PKG_TINYCBOR_SUBDIR)
  117. #MIRROR_MD5SUM:=$(PKG_TINYCBOR_MIRROR_MD5SUM)
  118. endef
  119. $(eval $(call Download,iotivity-tinycbor))
  120. SCONS_OPTIONS += \
  121. TARGET_OS=linux \
  122. TARGET_TRANSPORT=ALL \
  123. TARGET_ARCH=$(ARCH) \
  124. STAGING_DIR=$(STAGING_DIR) \
  125. LOGGING=true \
  126. SECURED=1 \
  127. mqttclient examples samples libTGMSDK ConServerApp ConClientApp BootstrapServerApp
  128. ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
  129. SCONS_OPTIONS += VERBOSE=true
  130. endif
  131. define Build/Prepare
  132. $(call Build/Prepare/Default)
  133. $(TAR) -C $(PKG_BUILD_DIR)/extlibs/tinycbor/ -xjf $(DL_DIR)/$(PKG_TINYCBOR_SOURCE)
  134. endef
  135. define Build/Configure
  136. (cd $(PKG_BUILD_DIR); \
  137. $(SCONS_VARS) \
  138. scons \
  139. $(SCONS_OPTIONS) \
  140. )
  141. endef
  142. define Package/iotivity/install
  143. $(INSTALL_DIR) $(1)/usr/lib
  144. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboctbstack.so $(1)/usr/lib/
  145. endef
  146. define Package/iotivity-cpp/install
  147. $(INSTALL_DIR) $(1)/usr/lib
  148. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboc.so $(1)/usr/lib/
  149. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboc_logger.so $(1)/usr/lib/
  150. endef
  151. define Package/iotivity-things-manager-lib/install
  152. $(INSTALL_DIR) $(1)/usr/lib
  153. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/libTGMSDKLibrary.so $(1)/usr/lib/
  154. endef
  155. define Package/iotivity-plugin-manager-lib/install
  156. $(INSTALL_DIR) $(1)/usr/lib
  157. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/libpmimpl.so $(1)/usr/lib/
  158. endef
  159. define Package/iotivity-mqttclient/install
  160. $(INSTALL_DIR) $(1)/usr/bin
  161. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/protocol-plugin/sample-app/linux/mqtt/mqttclient $(1)/usr/bin/
  162. endef
  163. define Package/iotivity-oic-middle/install
  164. $(INSTALL_DIR) $(1)/usr/bin
  165. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/examples/OICMiddle/OICMiddle $(1)/usr/bin/
  166. endef
  167. define Package/iotivity-things-manager/install
  168. $(INSTALL_DIR) $(1)/usr/bin
  169. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/bootstrapserver $(1)/usr/bin/
  170. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/con-server $(1)/usr/bin/
  171. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/con-client $(1)/usr/bin/
  172. endef
  173. define Package/iotivity-example-garage/install
  174. $(INSTALL_DIR) $(1)/usr/bin
  175. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/resource/examples/garageclient $(1)/usr/bin/
  176. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/resource/examples/garageserver $(1)/usr/bin/
  177. endef
  178. $(eval $(call BuildPackage,iotivity))
  179. $(eval $(call BuildPackage,iotivity-cpp))
  180. $(eval $(call BuildPackage,iotivity-things-manager-lib))
  181. $(eval $(call BuildPackage,iotivity-plugin-manager-lib))
  182. $(eval $(call BuildPackage,iotivity-mqttclient))
  183. $(eval $(call BuildPackage,iotivity-oic-middle))
  184. $(eval $(call BuildPackage,iotivity-things-manager))
  185. $(eval $(call BuildPackage,iotivity-example-garage))