2 # Copyright (C) 2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=${PKG_NAME}-${PKG_VERSION}.
tar.gz
15 PKG_SOURCE_URL
:=http
://mirrors.kernel.org
/${PKG_NAME}/${PKG_VERSION}/
16 PKG_MD5SUM
:=98f8d5b0304c357520c4343d983491e2
19 PKG_MAINTAINER
:=Hauke Mehrtens
<hauke.mehrtens@intel.com
>
21 PKG_LICENSE
:=Apache-2.0
22 PKG_LICENSE_FILES
:=LICENSE.md
24 include $(INCLUDE_DIR
)/package.mk
25 include $(INCLUDE_DIR
)/scons.mk
28 define Package
/iotivity
31 DEPENDS
:=@
!USE_UCLIBC
+libpthread
+librt
+libuuid
32 TITLE
:=IoTivity C Library
33 URL
:=https
://www.iotivity.org
36 define Package
/iotivity
/description
37 IoTivity is a framework for the Internet of Things based on the
38 Open Interconnect Consortium Specification.
42 define Package
/iotivity-cpp
45 DEPENDS
:=iotivity
+libpthread
+libstdcpp
46 TITLE
:=IoTivity C
++ Library
47 URL
:=https
://www.iotivity.org
50 define Package
/iotivity-cpp
/description
51 IoTivity is a framework for the Internet of Things based on the
52 Open Interconnect Consortium Specification.
56 define Package
/iotivity-things-manager-lib
59 DEPENDS
:=iotivity
+iotivity-cpp
+libstdcpp
60 TITLE
:=IoTivity things manager lib
61 URL
:=https
://www.iotivity.org
64 define Package
/iotivity-things-manager-lib
/description
65 IoTivity things-manager lib
69 define Package
/iotivity-oic-middle
72 DEPENDS
:=iotivity
+iotivity-cpp
73 TITLE
:=IoTivity OIC Middle
74 URL
:=https
://www.iotivity.org
77 define Package
/iotivity-oic-middle
/description
82 define Package
/iotivity-things-manager
85 DEPENDS
:=iotivity
+iotivity-cpp
+iotivity-things-manager-lib
86 TITLE
:=IoTivity things manager
87 URL
:=https
://www.iotivity.org
90 define Package
/iotivity-things-manager
/description
91 IoTivity things manager
94 define Package
/iotivity-resource-container-lib
97 DEPENDS
:=iotivity
+iotivity-cpp
+boost-system
+boost-thread
+boost-date_time
98 TITLE
:=IoTivity Resource Container library
99 URL
:=https
://www.iotivity.org
102 define Package
/iotivity-resource-container-sample
105 DEPENDS
:=iotivity
+iotivity-resource-container-lib
106 TITLE
:=IoTivity Resource Container sample Application
107 URL
:=https
://www.iotivity.org
110 define Package
/iotivity-resource-container-hue
113 DEPENDS
:=iotivity
+iotivity-resource-container-lib
+libcurl
114 TITLE
:=IoTivity Resource Container Hue Bundle
115 URL
:=https
://www.iotivity.org
118 define Package
/iotivity-example-garage
121 DEPENDS
:=iotivity
+iotivity-cpp
122 TITLE
:=IoTivity Garage example
123 URL
:=https
://www.iotivity.org
126 define Package
/iotivity-example-garage
/description
127 An IoTivity example application
131 PKG_TINYCBOR_NAME
:=tinycbor
132 PKG_TINYCBOR_VERSION
:=43e3ac9490cf19459ec7b7bd13df3b66810fb62a
133 PKG_TINYCBOR_SOURCE
:=$(PKG_TINYCBOR_NAME
)-$(PKG_TINYCBOR_VERSION
).
tar.bz2
134 PKG_TINYCBOR_PROTO
:=git
135 PKG_TINYCBOR_SOURCE_URL
:=https
://github.com
/01org
/tinycbor.git
136 PKG_TINYCBOR_SUBDIR
:=$(PKG_TINYCBOR_NAME
)
137 #PKG_TINYCBOR_MIRROR_MD5SUM:=?
139 define Download
/iotivity-tinycbor
140 FILE
:=$(PKG_TINYCBOR_SOURCE
)
141 URL
:=$(PKG_TINYCBOR_SOURCE_URL
)
142 PROTO
:=$(PKG_TINYCBOR_PROTO
)
143 VERSION
:=$(PKG_TINYCBOR_VERSION
)
144 SUBDIR
:=$(PKG_TINYCBOR_SUBDIR
)
145 #MIRROR_MD5SUM:=$(PKG_TINYCBOR_MIRROR_MD5SUM)
147 $(eval
$(call Download
,iotivity-tinycbor
))
149 PKG_SQLITE_NAME
:=sqlite
150 PKG_SQLITE_VERSION
:=3081101
151 PKG_SQLITE_SOURCE
:=$(PKG_SQLITE_NAME
)-amalgamation-
$(PKG_SQLITE_VERSION
).zip
152 PKG_SQLITE_SOURCE_URL
:=http
://www.sqlite.org
/2015/
153 PKG_SQLITE_SUBDIR
:=$(PKG_SQLITE_NAME
)
154 PKG_SQLITE_MD5SUM
:=94907e831502e2080b76e281cfa24dde
156 define Download
/iotivity-sqlite
157 FILE
:=$(PKG_SQLITE_SOURCE
)
158 URL
:=$(PKG_SQLITE_SOURCE_URL
)
159 VERSION
:=$(PKG_SQLITE_VERSION
)
160 SUBDIR
:=$(PKG_SQLITE_SUBDIR
)
161 MD5SUM
:=$(PKG_SQLITE_MD5SUM
)
163 $(eval
$(call Download
,iotivity-sqlite
))
168 TARGET_TRANSPORT
=IP \
169 TARGET_ARCH
=$(ARCH
) \
170 STAGING_DIR
=$(STAGING_DIR
) \
173 $(if
$(CONFIG_PACKAGE_iotivity
),liboctbstack
) \
174 $(if
$(CONFIG_PACKAGE_iotivity-cpp
),liboc
) \
175 $(if
$(CONFIG_PACKAGE_iotivity-things-manager-lib
),libTGMSDK
) \
176 $(if
$(CONFIG_PACKAGE_iotivity-oic-middle
),examples
) \
177 $(if
$(CONFIG_PACKAGE_iotivity-things-manager
),ConServerApp ConClientApp BootstrapServerApp
) \
178 $(if
$(CONFIG_PACKAGE_iotivity-resource-container-lib
),libResContainer
) \
179 $(if
$(CONFIG_PACKAGE_iotivity-resource-container-sample
),containersample
) \
180 $(if
$(CONFIG_PACKAGE_iotivity-resource-container-hue
),libHueBundle
) \
181 $(if
$(CONFIG_PACKAGE_iotivity-example-garage
),examples
) \
184 ifneq ($(findstring c
,$(OPENWRT_VERBOSE
)),)
185 SCONS_OPTIONS
+= VERBOSE
=true
189 $(call Build
/Prepare
/Default
)
190 $(TAR
) -C
$(PKG_BUILD_DIR
)/extlibs
/tinycbor
/ -xjf
$(DL_DIR
)/$(PKG_TINYCBOR_SOURCE
)
191 unzip
-d
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/ $(DL_DIR
)/$(PKG_SQLITE_SOURCE
)
192 mv
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/$(PKG_SQLITE_NAME
)-amalgamation-
$(PKG_SQLITE_VERSION
)/sqlite3.h
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/
193 mv
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/$(PKG_SQLITE_NAME
)-amalgamation-
$(PKG_SQLITE_VERSION
)/sqlite3.c
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/
197 define Build
/Configure
198 (cd
$(PKG_BUILD_DIR
); \
206 define Package
/iotivity
/install
207 $(INSTALL_DIR
) $(1)/usr
/lib
208 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/liboctbstack.so
$(1)/usr
/lib
/
211 define Package
/iotivity-cpp
/install
212 $(INSTALL_DIR
) $(1)/usr
/lib
213 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/liboc.so
$(1)/usr
/lib
/
214 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/liboc_logger.so
$(1)/usr
/lib
/
217 define Package
/iotivity-things-manager-lib
/install
218 $(INSTALL_DIR
) $(1)/usr
/lib
219 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/libTGMSDKLibrary.so
$(1)/usr
/lib
/
222 define Package
/iotivity-oic-middle
/install
223 $(INSTALL_DIR
) $(1)/usr
/bin
224 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/examples
/OICMiddle
/OICMiddle
$(1)/usr
/bin
/
227 define Package
/iotivity-things-manager
/install
228 $(INSTALL_DIR
) $(1)/usr
/bin
229 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/service
/things-manager
/sampleapp
/linux
/configuration
/bootstrapserver
$(1)/usr
/bin
/
230 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/service
/things-manager
/sampleapp
/linux
/configuration
/con-server
$(1)/usr
/bin
/
231 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/service
/things-manager
/sampleapp
/linux
/configuration
/con-client
$(1)/usr
/bin
/
234 define Package
/iotivity-resource-container-lib
/install
235 $(INSTALL_DIR
) $(1)/usr
/lib
236 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/librcs_common.so
$(1)/usr
/lib
/
237 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/librcs_client.so
$(1)/usr
/lib
/
238 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/librcs_server.so
$(1)/usr
/lib
/
239 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/librcs_container.so
$(1)/usr
/lib
/
242 define Package
/iotivity-resource-container-sample
/install
243 $(INSTALL_DIR
) $(1)/usr
/bin
244 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/service
/resource-container
/ContainerSample
$(1)/usr
/bin
/
247 define Package
/iotivity-resource-container-hue
/install
248 $(INSTALL_DIR
) $(1)/usr
/lib
249 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/libHueBundle.so
$(1)/usr
/lib
/
252 define Package
/iotivity-example-garage
/install
253 $(INSTALL_DIR
) $(1)/usr
/bin
254 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/resource
/examples
/garageclient
$(1)/usr
/bin
/
255 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/release
/resource
/examples
/garageserver
$(1)/usr
/bin
/
259 $(eval
$(call BuildPackage
,iotivity
))
260 $(eval
$(call BuildPackage
,iotivity-cpp
))
261 $(eval
$(call BuildPackage
,iotivity-things-manager-lib
))
262 $(eval
$(call BuildPackage
,iotivity-oic-middle
))
263 $(eval
$(call BuildPackage
,iotivity-things-manager
))
264 $(eval
$(call BuildPackage
,iotivity-resource-container-lib
))
265 $(eval
$(call BuildPackage
,iotivity-resource-container-sample
))
266 $(eval
$(call BuildPackage
,iotivity-resource-container-hue
))
267 $(eval
$(call BuildPackage
,iotivity-example-garage
))