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_BUILD_DEPENDS
:=boost
21 PKG_MAINTAINER
:=Hauke Mehrtens
<hauke.mehrtens@intel.com
>
23 PKG_LICENSE
:=Apache-2.0
24 PKG_LICENSE_FILES
:=LICENSE.md
26 PKG_CONFIG_DEPENDS
:= \
27 CONFIG_PACKAGE_iotivity \
28 CONFIG_PACKAGE_iotivity-cpp \
29 CONFIG_PACKAGE_iotivity-things-manager-lib \
30 CONFIG_PACKAGE_iotivity-oic-middle \
31 CONFIG_PACKAGE_iotivity-things-manager \
32 CONFIG_PACKAGE_iotivity-resource-container-lib \
33 CONFIG_PACKAGE_iotivity-resource-container-sample \
34 CONFIG_PACKAGE_iotivity-resource-container-hue \
35 CONFIG_PACKAGE_iotivity-example-garage \
36 CONFIG_PACKAGE_iotivity-example-simple \
37 CONFIG_PACKAGE_iotivity_DEBUG \
38 CONFIG_PACKAGE_iotivity_SECURE
40 include $(INCLUDE_DIR
)/package.mk
41 include $(INCLUDE_DIR
)/scons.mk
44 define Package
/iotivity
47 DEPENDS
:=@
!USE_UCLIBC
+libpthread
+librt
+libuuid
48 TITLE
:=IoTivity C Library
49 URL
:=https
://www.iotivity.org
53 define Package
/iotivity
/description
54 IoTivity is a framework for the Internet of Things based on the
55 Open Interconnect Consortium Specification.
58 define Package
/iotivity
/config
60 config PACKAGE_iotivity_DEBUG
61 bool
"IoTivity with debug support"
63 Build IoTivity with debuging support.
65 config PACKAGE_iotivity_SECURE
66 bool
"IoTivity with security support"
69 Activate security support.
75 define Package
/iotivity-cpp
78 DEPENDS
:=+iotivity
+libpthread
+libstdcpp
79 TITLE
:=IoTivity C
++ Library
80 URL
:=https
://www.iotivity.org
83 define Package
/iotivity-cpp
/description
84 IoTivity is a framework for the Internet of Things based on the
85 Open Interconnect Consortium Specification.
89 define Package
/iotivity-things-manager-lib
92 DEPENDS
:=+iotivity
+iotivity-cpp
+libstdcpp
93 TITLE
:=IoTivity things manager lib
94 URL
:=https
://www.iotivity.org
97 define Package
/iotivity-things-manager-lib
/description
98 IoTivity things-manager lib
102 define Package
/iotivity-oic-middle
105 DEPENDS
:=+iotivity
+iotivity-cpp
106 TITLE
:=IoTivity OIC Middle
107 URL
:=https
://www.iotivity.org
110 define Package
/iotivity-oic-middle
/description
115 define Package
/iotivity-things-manager
118 DEPENDS
:=+iotivity
+iotivity-cpp
+iotivity-things-manager-lib
119 TITLE
:=IoTivity things manager
120 URL
:=https
://www.iotivity.org
123 define Package
/iotivity-things-manager
/description
124 IoTivity things manager
127 define Package
/iotivity-resource-container-lib
130 DEPENDS
:=+iotivity
+iotivity-cpp
+boost
+boost-system
+boost-thread
+boost-date_time
131 TITLE
:=IoTivity Resource Container library
132 URL
:=https
://www.iotivity.org
135 define Package
/iotivity-resource-container-sample
138 DEPENDS
:=+iotivity
+iotivity-resource-container-lib
139 TITLE
:=IoTivity Resource Container sample Application
140 URL
:=https
://www.iotivity.org
143 define Package
/iotivity-resource-container-hue
146 DEPENDS
:=+iotivity
+iotivity-resource-container-lib
+libcurl
147 TITLE
:=IoTivity Resource Container Hue Bundle
148 URL
:=https
://www.iotivity.org
151 define Package
/iotivity-example-garage
154 DEPENDS
:=+iotivity
+iotivity-cpp
155 TITLE
:=IoTivity Garage example
156 URL
:=https
://www.iotivity.org
159 define Package
/iotivity-example-garage
/description
160 An IoTivity example application
163 define Package
/iotivity-example-simple
166 DEPENDS
:=+iotivity
+iotivity-cpp
167 TITLE
:=IoTivity simple client
+ server
168 URL
:=https
://www.iotivity.org
171 define Package
/iotivity-example-simple
/description
172 The IoTivity simple client and simple server exmaple
176 PKG_TINYCBOR_NAME
:=tinycbor
177 PKG_TINYCBOR_VERSION
:=43e3ac9490cf19459ec7b7bd13df3b66810fb62a
178 PKG_TINYCBOR_SOURCE
:=$(PKG_TINYCBOR_NAME
)-$(PKG_TINYCBOR_VERSION
).
tar.bz2
179 PKG_TINYCBOR_PROTO
:=git
180 PKG_TINYCBOR_SOURCE_URL
:=https
://github.com
/01org
/tinycbor.git
181 PKG_TINYCBOR_SUBDIR
:=$(PKG_TINYCBOR_NAME
)
182 #PKG_TINYCBOR_MIRROR_MD5SUM:=?
184 define Download
/iotivity-tinycbor
185 FILE
:=$(PKG_TINYCBOR_SOURCE
)
186 URL
:=$(PKG_TINYCBOR_SOURCE_URL
)
187 PROTO
:=$(PKG_TINYCBOR_PROTO
)
188 VERSION
:=$(PKG_TINYCBOR_VERSION
)
189 SUBDIR
:=$(PKG_TINYCBOR_SUBDIR
)
190 #MIRROR_MD5SUM:=$(PKG_TINYCBOR_MIRROR_MD5SUM)
192 $(eval
$(call Download
,iotivity-tinycbor
))
194 PKG_SQLITE_NAME
:=sqlite
195 PKG_SQLITE_VERSION
:=3081101
196 PKG_SQLITE_SOURCE
:=$(PKG_SQLITE_NAME
)-amalgamation-
$(PKG_SQLITE_VERSION
).zip
197 PKG_SQLITE_SOURCE_URL
:=http
://www.sqlite.org
/2015/
198 PKG_SQLITE_SUBDIR
:=$(PKG_SQLITE_NAME
)
199 PKG_SQLITE_MD5SUM
:=94907e831502e2080b76e281cfa24dde
201 define Download
/iotivity-sqlite
202 FILE
:=$(PKG_SQLITE_SOURCE
)
203 URL
:=$(PKG_SQLITE_SOURCE_URL
)
204 VERSION
:=$(PKG_SQLITE_VERSION
)
205 SUBDIR
:=$(PKG_SQLITE_SUBDIR
)
206 MD5SUM
:=$(PKG_SQLITE_MD5SUM
)
208 $(eval
$(call Download
,iotivity-sqlite
))
213 TARGET_TRANSPORT
=IP \
214 TARGET_ARCH
=$(ARCH
) \
215 STAGING_DIR
=$(STAGING_DIR
) \
217 $(if
$(CONFIG_PACKAGE_iotivity
),liboctbstack
) \
218 $(if
$(CONFIG_PACKAGE_iotivity-cpp
),liboc
) \
219 $(if
$(CONFIG_PACKAGE_iotivity-things-manager-lib
),libTGMSDK
) \
220 $(if
$(CONFIG_PACKAGE_iotivity-oic-middle
),examples
) \
221 $(if
$(CONFIG_PACKAGE_iotivity-things-manager
),ConServerApp ConClientApp BootstrapServerApp
) \
222 $(if
$(CONFIG_PACKAGE_iotivity-resource-container-lib
),libResContainer
) \
223 $(if
$(CONFIG_PACKAGE_iotivity-resource-container-sample
),containersample
) \
224 $(if
$(CONFIG_PACKAGE_iotivity-resource-container-hue
),libHueBundle
) \
225 $(if
$(CONFIG_PACKAGE_iotivity-example-garage
),examples
) \
226 $(if
$(CONFIG_PACKAGE_iotivity-example-simple
),examples
) \
228 ifeq ($(CONFIG_PACKAGE_iotivity_DEBUG
),y
)
229 SCONS_OPTIONS
+= RELEASE
=false
232 SCONS_OPTIONS
+= RELEASE
=true
236 ifeq ($(CONFIG_PACKAGE_iotivity_SECURE
),y
)
237 SCONS_OPTIONS
+= SECURED
=1
239 SCONS_OPTIONS
+= SECURED
=0
242 ifneq ($(findstring c
,$(OPENWRT_VERBOSE
)),)
243 SCONS_OPTIONS
+= VERBOSE
=true
247 $(call Build
/Prepare
/Default
)
248 $(TAR
) -C
$(PKG_BUILD_DIR
)/extlibs
/tinycbor
/ -xjf
$(DL_DIR
)/$(PKG_TINYCBOR_SOURCE
)
249 unzip
-d
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/ $(DL_DIR
)/$(PKG_SQLITE_SOURCE
)
250 mv
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/$(PKG_SQLITE_NAME
)-amalgamation-
$(PKG_SQLITE_VERSION
)/sqlite3.h
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/
251 mv
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/$(PKG_SQLITE_NAME
)-amalgamation-
$(PKG_SQLITE_VERSION
)/sqlite3.c
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/
255 define Build
/Configure
256 (cd
$(PKG_BUILD_DIR
); \
264 define Package
/iotivity
/install
265 $(INSTALL_DIR
) $(1)/usr
/lib
266 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/liboctbstack.so
$(1)/usr
/lib
/
267 ifeq ($(CONFIG_PACKAGE_iotivity_SECURE
),y
)
268 $(INSTALL_DIR
) $(1)/etc
/iotivity
/
269 $(INSTALL_DATA
) .
/files
/etc
/iotivity
/oic_svr_db.cbor
$(1)/etc
/iotivity
/
273 define Package
/iotivity-cpp
/install
274 $(INSTALL_DIR
) $(1)/usr
/lib
275 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/liboc.so
$(1)/usr
/lib
/
276 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/liboc_logger.so
$(1)/usr
/lib
/
279 define Package
/iotivity-things-manager-lib
/install
280 $(INSTALL_DIR
) $(1)/usr
/lib
281 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/libTGMSDKLibrary.so
$(1)/usr
/lib
/
284 define Package
/iotivity-oic-middle
/install
285 $(INSTALL_DIR
) $(1)/usr
/bin
286 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/examples
/OICMiddle
/OICMiddle
$(1)/usr
/bin
/
289 define Package
/iotivity-things-manager
/install
290 $(INSTALL_DIR
) $(1)/usr
/bin
291 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/service
/things-manager
/sampleapp
/linux
/configuration
/bootstrapserver
$(1)/usr
/bin
/
292 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/service
/things-manager
/sampleapp
/linux
/configuration
/con-server
$(1)/usr
/bin
/
293 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/service
/things-manager
/sampleapp
/linux
/configuration
/con-client
$(1)/usr
/bin
/
296 define Package
/iotivity-resource-container-lib
/install
297 $(INSTALL_DIR
) $(1)/usr
/lib
298 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/librcs_common.so
$(1)/usr
/lib
/
299 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/librcs_client.so
$(1)/usr
/lib
/
300 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/librcs_server.so
$(1)/usr
/lib
/
301 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/librcs_container.so
$(1)/usr
/lib
/
304 define Package
/iotivity-resource-container-sample
/install
305 $(INSTALL_DIR
) $(1)/usr
/bin
306 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/service
/resource-container
/ContainerSample
$(1)/usr
/bin
/
309 define Package
/iotivity-resource-container-hue
/install
310 $(INSTALL_DIR
) $(1)/usr
/lib
311 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/libHueBundle.so
$(1)/usr
/lib
/
314 define Package
/iotivity-example-garage
/install
315 $(INSTALL_DIR
) $(1)/usr
/bin
316 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/resource
/examples
/garageclient
$(1)/usr
/bin
/
317 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/resource
/examples
/garageserver
$(1)/usr
/bin
/
320 define Package
/iotivity-example-simple
/install
321 $(INSTALL_DIR
) $(1)/usr
/bin
322 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/resource
/examples
/simpleclient
$(1)/usr
/bin
/
323 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/resource
/examples
/simpleserver
$(1)/usr
/bin
/
327 $(eval
$(call BuildPackage
,iotivity
))
328 $(eval
$(call BuildPackage
,iotivity-cpp
))
329 $(eval
$(call BuildPackage
,iotivity-things-manager-lib
))
330 $(eval
$(call BuildPackage
,iotivity-oic-middle
))
331 $(eval
$(call BuildPackage
,iotivity-things-manager
))
332 $(eval
$(call BuildPackage
,iotivity-resource-container-lib
))
333 $(eval
$(call BuildPackage
,iotivity-resource-container-sample
))
334 $(eval
$(call BuildPackage
,iotivity-resource-container-hue
))
335 $(eval
$(call BuildPackage
,iotivity-example-garage
))
336 $(eval
$(call BuildPackage
,iotivity-example-simple
))