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.

216 lines
6.0 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.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://gerrit.iotivity.org/gerrit/iotivity
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_VERSION:=0.9.1
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  16. PKG_MIRROR_MD5SUM:=
  17. PKG_USE_MIPS16:=0
  18. PKG_MAINTAINER:=Hauke Mehrtens <hauke.mehrtens@lantiq.com>
  19. PKG_LICENSE:=Apache-2.0
  20. PKG_LICENSE_FILES:=LICENSE.md
  21. PKG_BUILD_DEPENDS:= +boost +libexpat
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/scons.mk
  24. define Package/iotivity
  25. SECTION:=net
  26. CATEGORY:=Network
  27. DEPENDS:=@!USE_UCLIBC +libpthread +librt +libstdcpp +libuuid
  28. TITLE:=IoTivity Library
  29. URL:=https://www.iotivity.org
  30. endef
  31. define Package/iotivity/description
  32. IoTivity is a framework for the Internet of Things based on the
  33. Open Interconnect Consortium Specification.
  34. endef
  35. define Package/iotivity-things-manager-lib
  36. SECTION:=net
  37. CATEGORY:=Network
  38. DEPENDS:=iotivity
  39. TITLE:=IoTivity things manager lib
  40. URL:=https://www.iotivity.org
  41. endef
  42. define Package/iotivity-things-manager-lib/description
  43. IoTivity things-manager lib
  44. endef
  45. define Package/iotivity-plugin-manager-lib
  46. SECTION:=net
  47. CATEGORY:=Network
  48. DEPENDS:=iotivity +libexpat
  49. TITLE:=IoTivity plugin manager lib
  50. URL:=https://www.iotivity.org
  51. endef
  52. define Package/iotivity-plugin-manager-lib/description
  53. IoTivity plugin manager lib
  54. endef
  55. define Package/iotivity-mqttclient
  56. SECTION:=net
  57. CATEGORY:=Network
  58. DEPENDS:=iotivity +iotivity-plugin-manager-lib +boost +boost-system
  59. TITLE:=IoTivity mqtt Client
  60. URL:=https://www.iotivity.org
  61. endef
  62. define Package/iotivity-mqttclient/description
  63. IoTivity mqtt Client
  64. endef
  65. define Package/iotivity-oic-middle
  66. SECTION:=net
  67. CATEGORY:=Network
  68. DEPENDS:=iotivity
  69. TITLE:=IoTivity OIC Middle
  70. URL:=https://www.iotivity.org
  71. endef
  72. define Package/iotivity-oic-middle/description
  73. IoTivity OIC Middle
  74. endef
  75. define Package/iotivity-things-manager
  76. SECTION:=net
  77. CATEGORY:=Network
  78. DEPENDS:=iotivity +iotivity-things-manager-lib
  79. TITLE:=IoTivity things manager
  80. URL:=https://www.iotivity.org
  81. endef
  82. define Package/iotivity-things-manager/description
  83. IoTivity things manager
  84. endef
  85. define Package/iotivity-example-garage
  86. SECTION:=net
  87. CATEGORY:=Network
  88. DEPENDS:=iotivity
  89. TITLE:=IoTivity Garage example
  90. URL:=https://www.iotivity.org
  91. endef
  92. define Package/iotivity-example-garage/description
  93. An IoTivity example application
  94. endef
  95. PKG_CEREAL_NAME:=cereal
  96. PKG_CEREAL_VERSION:=7121e91e6ab8c3e6a6516d9d9c3e6804e6f65245
  97. PKG_CEREAL_SOURCE:=$(PKG_CEREAL_NAME)-$(PKG_CEREAL_VERSION).tar.bz2
  98. PKG_CEREAL_PROTO:=git
  99. PKG_CEREAL_SOURCE_URL:=https://github.com/USCiLab/cereal.git
  100. PKG_CEREAL_SUBDIR:=$(PKG_CEREAL_NAME)
  101. #PKG_CEREAL_MIRROR_MD5SUM:=?
  102. define Download/iotivity-cereal
  103. FILE:=$(PKG_CEREAL_SOURCE)
  104. URL:=$(PKG_CEREAL_SOURCE_URL)
  105. PROTO:=$(PKG_CEREAL_PROTO)
  106. VERSION:=$(PKG_CEREAL_VERSION)
  107. SUBDIR:=$(PKG_CEREAL_SUBDIR)
  108. #MIRROR_MD5SUM:=$(PKG_CEREAL_MIRROR_MD5SUM)
  109. endef
  110. $(eval $(call Download,iotivity-cereal))
  111. SCONS_OPTIONS += \
  112. TARGET_OS=linux \
  113. TARGET_TRANSPORT=ALL \
  114. TARGET_ARCH=$(ARCH) \
  115. STAGING_DIR=$(STAGING_DIR) \
  116. mqttclient examples samples libTGMSDK ConServerApp ConClientApp BootstrapServerApp
  117. ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
  118. SCONS_OPTIONS += VERBOSE=true
  119. endif
  120. define Build/Prepare
  121. $(call Build/Prepare/Default)
  122. $(TAR) -C $(PKG_BUILD_DIR)/extlibs/cereal -xjf $(DL_DIR)/$(PKG_CEREAL_SOURCE)
  123. endef
  124. define Build/Configure
  125. (cd $(PKG_BUILD_DIR); \
  126. $(SCONS_VARS) \
  127. scons \
  128. $(SCONS_OPTIONS) \
  129. )
  130. endef
  131. define Package/iotivity/install
  132. $(INSTALL_DIR) $(1)/usr/lib
  133. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboc.so $(1)/usr/lib/liboc.so
  134. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboc_logger.so $(1)/usr/lib/liboc_logger.so
  135. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboctbstack.so $(1)/usr/lib/liboctbstack.so
  136. endef
  137. define Package/iotivity-things-manager-lib/install
  138. $(INSTALL_DIR) $(1)/usr/lib
  139. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/libTGMSDKLibrary.so $(1)/usr/lib/libTGMSDKLibrary.so
  140. endef
  141. define Package/iotivity-plugin-manager-lib/install
  142. $(INSTALL_DIR) $(1)/usr/lib
  143. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/libpmimpl.so $(1)/usr/lib/libpmimpl.so
  144. endef
  145. define Package/iotivity-mqttclient/install
  146. $(INSTALL_DIR) $(1)/usr/bin
  147. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/protocol-plugin/sample-app/linux/mqtt/mqttclient $(1)/usr/bin/mqttclient
  148. endef
  149. define Package/iotivity-oic-middle/install
  150. $(INSTALL_DIR) $(1)/usr/bin
  151. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/examples/OICMiddle/OICMiddle $(1)/usr/bin/OICMiddle
  152. endef
  153. define Package/iotivity-things-manager/install
  154. $(INSTALL_DIR) $(1)/usr/bin
  155. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/bootstrapserver $(1)/usr/bin/bootstrapserver
  156. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/con-server $(1)/usr/bin/con-server
  157. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/con-client $(1)/usr/bin/con-client
  158. endef
  159. define Package/iotivity-example-garage/install
  160. $(INSTALL_DIR) $(1)/usr/bin
  161. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/resource/examples/garageclient $(1)/usr/bin/garageclient
  162. $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/resource/examples/garageserver $(1)/usr/bin/garageserver
  163. endef
  164. $(eval $(call BuildPackage,iotivity))
  165. $(eval $(call BuildPackage,iotivity-things-manager-lib))
  166. $(eval $(call BuildPackage,iotivity-plugin-manager-lib))
  167. $(eval $(call BuildPackage,iotivity-mqttclient))
  168. $(eval $(call BuildPackage,iotivity-oic-middle))
  169. $(eval $(call BuildPackage,iotivity-things-manager))
  170. $(eval $(call BuildPackage,iotivity-example-garage))