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_DEBUG \
37 CONFIG_PACKAGE_iotivity_SECURE
39 include $(INCLUDE_DIR
)/package.mk
40 include $(INCLUDE_DIR
)/scons.mk
43 define Package
/iotivity
46 DEPENDS
:=@
!USE_UCLIBC
+libpthread
+librt
+libuuid
47 TITLE
:=IoTivity C Library
48 URL
:=https
://www.iotivity.org
52 define Package
/iotivity
/description
53 IoTivity is a framework for the Internet of Things based on the
54 Open Interconnect Consortium Specification.
57 define Package
/iotivity
/config
59 config PACKAGE_iotivity_DEBUG
60 bool
"IoTivity with debug support"
62 Build IoTivity with debuging support.
64 config PACKAGE_iotivity_SECURE
65 bool
"IoTivity with security support"
68 Activate security support.
74 define Package
/iotivity-cpp
77 DEPENDS
:=+iotivity
+libpthread
+libstdcpp
78 TITLE
:=IoTivity C
++ Library
79 URL
:=https
://www.iotivity.org
82 define Package
/iotivity-cpp
/description
83 IoTivity is a framework for the Internet of Things based on the
84 Open Interconnect Consortium Specification.
88 define Package
/iotivity-things-manager-lib
91 DEPENDS
:=+iotivity
+iotivity-cpp
+libstdcpp
92 TITLE
:=IoTivity things manager lib
93 URL
:=https
://www.iotivity.org
96 define Package
/iotivity-things-manager-lib
/description
97 IoTivity things-manager lib
101 define Package
/iotivity-oic-middle
104 DEPENDS
:=+iotivity
+iotivity-cpp
105 TITLE
:=IoTivity OIC Middle
106 URL
:=https
://www.iotivity.org
109 define Package
/iotivity-oic-middle
/description
114 define Package
/iotivity-things-manager
117 DEPENDS
:=+iotivity
+iotivity-cpp
+iotivity-things-manager-lib
118 TITLE
:=IoTivity things manager
119 URL
:=https
://www.iotivity.org
122 define Package
/iotivity-things-manager
/description
123 IoTivity things manager
126 define Package
/iotivity-resource-container-lib
129 DEPENDS
:=+iotivity
+iotivity-cpp
+boost
+boost-system
+boost-thread
+boost-date_time
130 TITLE
:=IoTivity Resource Container library
131 URL
:=https
://www.iotivity.org
134 define Package
/iotivity-resource-container-sample
137 DEPENDS
:=+iotivity
+iotivity-resource-container-lib
138 TITLE
:=IoTivity Resource Container sample Application
139 URL
:=https
://www.iotivity.org
142 define Package
/iotivity-resource-container-hue
145 DEPENDS
:=+iotivity
+iotivity-resource-container-lib
+libcurl
146 TITLE
:=IoTivity Resource Container Hue Bundle
147 URL
:=https
://www.iotivity.org
150 define Package
/iotivity-example-garage
153 DEPENDS
:=+iotivity
+iotivity-cpp
154 TITLE
:=IoTivity Garage example
155 URL
:=https
://www.iotivity.org
158 define Package
/iotivity-example-garage
/description
159 An IoTivity example application
163 PKG_TINYCBOR_NAME
:=tinycbor
164 PKG_TINYCBOR_VERSION
:=43e3ac9490cf19459ec7b7bd13df3b66810fb62a
165 PKG_TINYCBOR_SOURCE
:=$(PKG_TINYCBOR_NAME
)-$(PKG_TINYCBOR_VERSION
).
tar.bz2
166 PKG_TINYCBOR_PROTO
:=git
167 PKG_TINYCBOR_SOURCE_URL
:=https
://github.com
/01org
/tinycbor.git
168 PKG_TINYCBOR_SUBDIR
:=$(PKG_TINYCBOR_NAME
)
169 #PKG_TINYCBOR_MIRROR_MD5SUM:=?
171 define Download
/iotivity-tinycbor
172 FILE
:=$(PKG_TINYCBOR_SOURCE
)
173 URL
:=$(PKG_TINYCBOR_SOURCE_URL
)
174 PROTO
:=$(PKG_TINYCBOR_PROTO
)
175 VERSION
:=$(PKG_TINYCBOR_VERSION
)
176 SUBDIR
:=$(PKG_TINYCBOR_SUBDIR
)
177 #MIRROR_MD5SUM:=$(PKG_TINYCBOR_MIRROR_MD5SUM)
179 $(eval
$(call Download
,iotivity-tinycbor
))
181 PKG_SQLITE_NAME
:=sqlite
182 PKG_SQLITE_VERSION
:=3081101
183 PKG_SQLITE_SOURCE
:=$(PKG_SQLITE_NAME
)-amalgamation-
$(PKG_SQLITE_VERSION
).zip
184 PKG_SQLITE_SOURCE_URL
:=http
://www.sqlite.org
/2015/
185 PKG_SQLITE_SUBDIR
:=$(PKG_SQLITE_NAME
)
186 PKG_SQLITE_MD5SUM
:=94907e831502e2080b76e281cfa24dde
188 define Download
/iotivity-sqlite
189 FILE
:=$(PKG_SQLITE_SOURCE
)
190 URL
:=$(PKG_SQLITE_SOURCE_URL
)
191 VERSION
:=$(PKG_SQLITE_VERSION
)
192 SUBDIR
:=$(PKG_SQLITE_SUBDIR
)
193 MD5SUM
:=$(PKG_SQLITE_MD5SUM
)
195 $(eval
$(call Download
,iotivity-sqlite
))
200 TARGET_TRANSPORT
=IP \
201 TARGET_ARCH
=$(ARCH
) \
202 STAGING_DIR
=$(STAGING_DIR
) \
204 $(if
$(CONFIG_PACKAGE_iotivity
),liboctbstack
) \
205 $(if
$(CONFIG_PACKAGE_iotivity-cpp
),liboc
) \
206 $(if
$(CONFIG_PACKAGE_iotivity-things-manager-lib
),libTGMSDK
) \
207 $(if
$(CONFIG_PACKAGE_iotivity-oic-middle
),examples
) \
208 $(if
$(CONFIG_PACKAGE_iotivity-things-manager
),ConServerApp ConClientApp BootstrapServerApp
) \
209 $(if
$(CONFIG_PACKAGE_iotivity-resource-container-lib
),libResContainer
) \
210 $(if
$(CONFIG_PACKAGE_iotivity-resource-container-sample
),containersample
) \
211 $(if
$(CONFIG_PACKAGE_iotivity-resource-container-hue
),libHueBundle
) \
212 $(if
$(CONFIG_PACKAGE_iotivity-example-garage
),examples
) \
214 ifeq ($(CONFIG_PACKAGE_iotivity_DEBUG
),y
)
215 SCONS_OPTIONS
+= RELEASE
=false
218 SCONS_OPTIONS
+= RELEASE
=true
222 ifeq ($(CONFIG_PACKAGE_iotivity_SECURE
),y
)
223 SCONS_OPTIONS
+= SECURED
=1
225 SCONS_OPTIONS
+= SECURED
=0
228 ifneq ($(findstring c
,$(OPENWRT_VERBOSE
)),)
229 SCONS_OPTIONS
+= VERBOSE
=true
233 $(call Build
/Prepare
/Default
)
234 $(TAR
) -C
$(PKG_BUILD_DIR
)/extlibs
/tinycbor
/ -xjf
$(DL_DIR
)/$(PKG_TINYCBOR_SOURCE
)
235 unzip
-d
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/ $(DL_DIR
)/$(PKG_SQLITE_SOURCE
)
236 mv
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/$(PKG_SQLITE_NAME
)-amalgamation-
$(PKG_SQLITE_VERSION
)/sqlite3.h
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/
237 mv
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/$(PKG_SQLITE_NAME
)-amalgamation-
$(PKG_SQLITE_VERSION
)/sqlite3.c
$(PKG_BUILD_DIR
)/extlibs
/sqlite3
/
241 define Build
/Configure
242 (cd
$(PKG_BUILD_DIR
); \
250 define Package
/iotivity
/install
251 $(INSTALL_DIR
) $(1)/usr
/lib
252 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/liboctbstack.so
$(1)/usr
/lib
/
253 ifeq ($(CONFIG_PACKAGE_iotivity_SECURE
),y
)
254 $(INSTALL_DIR
) $(1)/etc
/iotivity
/
255 $(INSTALL_DATA
) .
/files
/etc
/iotivity
/oic_svr_db.cbor
$(1)/etc
/iotivity
/
259 define Package
/iotivity-cpp
/install
260 $(INSTALL_DIR
) $(1)/usr
/lib
261 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/liboc.so
$(1)/usr
/lib
/
262 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/liboc_logger.so
$(1)/usr
/lib
/
265 define Package
/iotivity-things-manager-lib
/install
266 $(INSTALL_DIR
) $(1)/usr
/lib
267 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/libTGMSDKLibrary.so
$(1)/usr
/lib
/
270 define Package
/iotivity-oic-middle
/install
271 $(INSTALL_DIR
) $(1)/usr
/bin
272 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/examples
/OICMiddle
/OICMiddle
$(1)/usr
/bin
/
275 define Package
/iotivity-things-manager
/install
276 $(INSTALL_DIR
) $(1)/usr
/bin
277 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/service
/things-manager
/sampleapp
/linux
/configuration
/bootstrapserver
$(1)/usr
/bin
/
278 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/service
/things-manager
/sampleapp
/linux
/configuration
/con-server
$(1)/usr
/bin
/
279 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/service
/things-manager
/sampleapp
/linux
/configuration
/con-client
$(1)/usr
/bin
/
282 define Package
/iotivity-resource-container-lib
/install
283 $(INSTALL_DIR
) $(1)/usr
/lib
284 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/librcs_common.so
$(1)/usr
/lib
/
285 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/librcs_client.so
$(1)/usr
/lib
/
286 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/librcs_server.so
$(1)/usr
/lib
/
287 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/librcs_container.so
$(1)/usr
/lib
/
290 define Package
/iotivity-resource-container-sample
/install
291 $(INSTALL_DIR
) $(1)/usr
/bin
292 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/service
/resource-container
/ContainerSample
$(1)/usr
/bin
/
295 define Package
/iotivity-resource-container-hue
/install
296 $(INSTALL_DIR
) $(1)/usr
/lib
297 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/libHueBundle.so
$(1)/usr
/lib
/
300 define Package
/iotivity-example-garage
/install
301 $(INSTALL_DIR
) $(1)/usr
/bin
302 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/resource
/examples
/garageclient
$(1)/usr
/bin
/
303 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/out
/linux
/$(ARCH
)/$(APP_OPTIM
)/resource
/examples
/garageserver
$(1)/usr
/bin
/
307 $(eval
$(call BuildPackage
,iotivity
))
308 $(eval
$(call BuildPackage
,iotivity-cpp
))
309 $(eval
$(call BuildPackage
,iotivity-things-manager-lib
))
310 $(eval
$(call BuildPackage
,iotivity-oic-middle
))
311 $(eval
$(call BuildPackage
,iotivity-things-manager
))
312 $(eval
$(call BuildPackage
,iotivity-resource-container-lib
))
313 $(eval
$(call BuildPackage
,iotivity-resource-container-sample
))
314 $(eval
$(call BuildPackage
,iotivity-resource-container-hue
))
315 $(eval
$(call BuildPackage
,iotivity-example-garage
))