iotivity: update to version 1.1.0
[feed/packages.git] / net / iotivity / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=iotivity
11 PKG_VERSION:=1.1.0
12 PKG_RELEASE=1
13
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
17 PKG_USE_MIPS16:=0
18
19 PKG_MAINTAINER:=Hauke Mehrtens <hauke.mehrtens@intel.com>
20
21 PKG_LICENSE:=Apache-2.0
22 PKG_LICENSE_FILES:=LICENSE.md
23
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/scons.mk
26
27
28 define Package/iotivity
29 SECTION:=net
30 CATEGORY:=Network
31 DEPENDS:=@!USE_UCLIBC +libpthread +librt +libuuid
32 TITLE:=IoTivity C Library
33 URL:=https://www.iotivity.org
34 endef
35
36 define Package/iotivity/description
37 IoTivity is a framework for the Internet of Things based on the
38 Open Interconnect Consortium Specification.
39 endef
40
41
42 define Package/iotivity-cpp
43 SECTION:=net
44 CATEGORY:=Network
45 DEPENDS:=iotivity +libpthread +libstdcpp
46 TITLE:=IoTivity C++ Library
47 URL:=https://www.iotivity.org
48 endef
49
50 define Package/iotivity-cpp/description
51 IoTivity is a framework for the Internet of Things based on the
52 Open Interconnect Consortium Specification.
53 endef
54
55
56 define Package/iotivity-things-manager-lib
57 SECTION:=net
58 CATEGORY:=Network
59 DEPENDS:=iotivity +iotivity-cpp +libstdcpp
60 TITLE:=IoTivity things manager lib
61 URL:=https://www.iotivity.org
62 endef
63
64 define Package/iotivity-things-manager-lib/description
65 IoTivity things-manager lib
66 endef
67
68
69 define Package/iotivity-oic-middle
70 SECTION:=net
71 CATEGORY:=Network
72 DEPENDS:=iotivity +iotivity-cpp
73 TITLE:=IoTivity OIC Middle
74 URL:=https://www.iotivity.org
75 endef
76
77 define Package/iotivity-oic-middle/description
78 IoTivity OIC Middle
79 endef
80
81
82 define Package/iotivity-things-manager
83 SECTION:=net
84 CATEGORY:=Network
85 DEPENDS:=iotivity +iotivity-cpp +iotivity-things-manager-lib
86 TITLE:=IoTivity things manager
87 URL:=https://www.iotivity.org
88 endef
89
90 define Package/iotivity-things-manager/description
91 IoTivity things manager
92 endef
93
94 define Package/iotivity-resource-container-lib
95 SECTION:=net
96 CATEGORY:=Network
97 DEPENDS:=iotivity +iotivity-cpp +boost-system +boost-thread +boost-date_time
98 TITLE:=IoTivity Resource Container library
99 URL:=https://www.iotivity.org
100 endef
101
102 define Package/iotivity-resource-container-sample
103 SECTION:=net
104 CATEGORY:=Network
105 DEPENDS:=iotivity +iotivity-resource-container-lib
106 TITLE:=IoTivity Resource Container sample Application
107 URL:=https://www.iotivity.org
108 endef
109
110 define Package/iotivity-resource-container-hue
111 SECTION:=net
112 CATEGORY:=Network
113 DEPENDS:=iotivity +iotivity-resource-container-lib +libcurl
114 TITLE:=IoTivity Resource Container Hue Bundle
115 URL:=https://www.iotivity.org
116 endef
117
118 define Package/iotivity-example-garage
119 SECTION:=net
120 CATEGORY:=Network
121 DEPENDS:=iotivity +iotivity-cpp
122 TITLE:=IoTivity Garage example
123 URL:=https://www.iotivity.org
124 endef
125
126 define Package/iotivity-example-garage/description
127 An IoTivity example application
128 endef
129
130
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:=?
138
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)
146 endef
147 $(eval $(call Download,iotivity-tinycbor))
148
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
155
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)
162 endef
163 $(eval $(call Download,iotivity-sqlite))
164
165
166 SCONS_OPTIONS += \
167 TARGET_OS=linux \
168 TARGET_TRANSPORT=IP \
169 TARGET_ARCH=$(ARCH) \
170 STAGING_DIR=$(STAGING_DIR) \
171 LOGGING=true \
172 SECURED=1 \
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) \
182
183
184 ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
185 SCONS_OPTIONS += VERBOSE=true
186 endif
187
188 define Build/Prepare
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/
194 endef
195
196
197 define Build/Configure
198 (cd $(PKG_BUILD_DIR); \
199 $(SCONS_VARS) \
200 scons \
201 $(SCONS_OPTIONS) \
202 )
203 endef
204
205
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/
209 endef
210
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/
215 endef
216
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/
220 endef
221
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/
225 endef
226
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/
232 endef
233
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/
240 endef
241
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/
245 endef
246
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/
250 endef
251
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/
256 endef
257
258
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))