iotivity: update to version 0.9.2
[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:=0.9.2
12 PKG_RELEASE=1
13
14 PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
15 PKG_SOURCE_URL:=https://downloads.iotivity.org/${PKG_VERSION}/ \
16 http://mirrors.kernel.org/${PKG_NAME}/${PKG_VERSION}/
17 PKG_MD5SUM:=cf32e10a8f355fe1327db98ffc9a6173
18 PKG_USE_MIPS16:=0
19
20 PKG_MAINTAINER:=Hauke Mehrtens <hauke.mehrtens@lantiq.com>
21
22 PKG_LICENSE:=Apache-2.0
23 PKG_LICENSE_FILES:=LICENSE.md
24
25 PKG_BUILD_DEPENDS:= +boost +libexpat
26
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/scons.mk
29
30
31 define Package/iotivity
32 SECTION:=net
33 CATEGORY:=Network
34 DEPENDS:=@!USE_UCLIBC +libpthread +librt +libuuid
35 TITLE:=IoTivity C Library
36 URL:=https://www.iotivity.org
37 endef
38
39 define Package/iotivity/description
40 IoTivity is a framework for the Internet of Things based on the
41 Open Interconnect Consortium Specification.
42 endef
43
44
45 define Package/iotivity-cpp
46 SECTION:=net
47 CATEGORY:=Network
48 DEPENDS:=iotivity +libpthread +libstdcpp
49 TITLE:=IoTivity C++ Library
50 URL:=https://www.iotivity.org
51 endef
52
53 define Package/iotivity-cpp/description
54 IoTivity is a framework for the Internet of Things based on the
55 Open Interconnect Consortium Specification.
56 endef
57
58
59 define Package/iotivity-things-manager-lib
60 SECTION:=net
61 CATEGORY:=Network
62 DEPENDS:=iotivity +iotivity-cpp +libstdcpp
63 TITLE:=IoTivity things manager lib
64 URL:=https://www.iotivity.org
65 endef
66
67 define Package/iotivity-things-manager-lib/description
68 IoTivity things-manager lib
69 endef
70
71
72 define Package/iotivity-plugin-manager-lib
73 SECTION:=net
74 CATEGORY:=Network
75 DEPENDS:=iotivity +iotivity-cpp +libexpat +boost +boost-system
76 TITLE:=IoTivity plugin manager lib
77 URL:=https://www.iotivity.org
78 endef
79
80 define Package/iotivity-plugin-manager-lib/description
81 IoTivity plugin manager lib
82 endef
83
84
85 define Package/iotivity-mqttclient
86 SECTION:=net
87 CATEGORY:=Network
88 DEPENDS:=iotivity +iotivity-cpp +iotivity-plugin-manager-lib +boost +boost-system
89 TITLE:=IoTivity mqtt Client
90 URL:=https://www.iotivity.org
91 endef
92
93 define Package/iotivity-mqttclient/description
94 IoTivity mqtt Client
95 endef
96
97
98 define Package/iotivity-oic-middle
99 SECTION:=net
100 CATEGORY:=Network
101 DEPENDS:=iotivity +iotivity-cpp
102 TITLE:=IoTivity OIC Middle
103 URL:=https://www.iotivity.org
104 endef
105
106 define Package/iotivity-oic-middle/description
107 IoTivity OIC Middle
108 endef
109
110
111 define Package/iotivity-things-manager
112 SECTION:=net
113 CATEGORY:=Network
114 DEPENDS:=iotivity +iotivity-cpp +iotivity-things-manager-lib
115 TITLE:=IoTivity things manager
116 URL:=https://www.iotivity.org
117 endef
118
119 define Package/iotivity-things-manager/description
120 IoTivity things manager
121 endef
122
123
124 define Package/iotivity-example-garage
125 SECTION:=net
126 CATEGORY:=Network
127 DEPENDS:=iotivity +iotivity-cpp
128 TITLE:=IoTivity Garage example
129 URL:=https://www.iotivity.org
130 endef
131
132 define Package/iotivity-example-garage/description
133 An IoTivity example application
134 endef
135
136
137 PKG_TINYCBOR_NAME:=tinycbor
138 PKG_TINYCBOR_VERSION:=3e83c0dc6e55bc73e9a4a7343ab8e06c43127efa
139 PKG_TINYCBOR_SOURCE:=$(PKG_TINYCBOR_NAME)-$(PKG_TINYCBOR_VERSION).tar.bz2
140 PKG_TINYCBOR_PROTO:=git
141 PKG_TINYCBOR_SOURCE_URL:=https://github.com/01org/tinycbor.git
142 PKG_TINYCBOR_SUBDIR:=$(PKG_TINYCBOR_NAME)
143 #PKG_TINYCBOR_MIRROR_MD5SUM:=?
144
145 define Download/iotivity-tinycbor
146 FILE:=$(PKG_TINYCBOR_SOURCE)
147 URL:=$(PKG_TINYCBOR_SOURCE_URL)
148 PROTO:=$(PKG_TINYCBOR_PROTO)
149 VERSION:=$(PKG_TINYCBOR_VERSION)
150 SUBDIR:=$(PKG_TINYCBOR_SUBDIR)
151 #MIRROR_MD5SUM:=$(PKG_TINYCBOR_MIRROR_MD5SUM)
152 endef
153 $(eval $(call Download,iotivity-tinycbor))
154
155
156 SCONS_OPTIONS += \
157 TARGET_OS=linux \
158 TARGET_TRANSPORT=ALL \
159 TARGET_ARCH=$(ARCH) \
160 STAGING_DIR=$(STAGING_DIR) \
161 LOGGING=true \
162 SECURED=1 \
163 mqttclient examples samples libTGMSDK ConServerApp ConClientApp BootstrapServerApp
164
165 ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
166 SCONS_OPTIONS += VERBOSE=true
167 endif
168
169 define Build/Prepare
170 $(call Build/Prepare/Default)
171 $(TAR) -C $(PKG_BUILD_DIR)/extlibs/tinycbor/ -xjf $(DL_DIR)/$(PKG_TINYCBOR_SOURCE)
172 endef
173
174
175 define Build/Configure
176 (cd $(PKG_BUILD_DIR); \
177 $(SCONS_VARS) \
178 scons \
179 $(SCONS_OPTIONS) \
180 )
181 endef
182
183
184 define Package/iotivity/install
185 $(INSTALL_DIR) $(1)/usr/lib
186 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboctbstack.so $(1)/usr/lib/
187 endef
188
189 define Package/iotivity-cpp/install
190 $(INSTALL_DIR) $(1)/usr/lib
191 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboc.so $(1)/usr/lib/
192 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboc_logger.so $(1)/usr/lib/
193 endef
194
195 define Package/iotivity-things-manager-lib/install
196 $(INSTALL_DIR) $(1)/usr/lib
197 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/libTGMSDKLibrary.so $(1)/usr/lib/
198 endef
199
200 define Package/iotivity-plugin-manager-lib/install
201 $(INSTALL_DIR) $(1)/usr/lib
202 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/libpmimpl.so $(1)/usr/lib/
203 endef
204
205 define Package/iotivity-mqttclient/install
206 $(INSTALL_DIR) $(1)/usr/bin
207 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/protocol-plugin/sample-app/linux/mqtt/mqttclient $(1)/usr/bin/
208 endef
209
210 define Package/iotivity-oic-middle/install
211 $(INSTALL_DIR) $(1)/usr/bin
212 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/examples/OICMiddle/OICMiddle $(1)/usr/bin/
213 endef
214
215 define Package/iotivity-things-manager/install
216 $(INSTALL_DIR) $(1)/usr/bin
217 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/bootstrapserver $(1)/usr/bin/
218 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/con-server $(1)/usr/bin/
219 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/con-client $(1)/usr/bin/
220 endef
221
222 define Package/iotivity-example-garage/install
223 $(INSTALL_DIR) $(1)/usr/bin
224 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/resource/examples/garageclient $(1)/usr/bin/
225 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/resource/examples/garageserver $(1)/usr/bin/
226 endef
227
228
229 $(eval $(call BuildPackage,iotivity))
230 $(eval $(call BuildPackage,iotivity-cpp))
231 $(eval $(call BuildPackage,iotivity-things-manager-lib))
232 $(eval $(call BuildPackage,iotivity-plugin-manager-lib))
233 $(eval $(call BuildPackage,iotivity-mqttclient))
234 $(eval $(call BuildPackage,iotivity-oic-middle))
235 $(eval $(call BuildPackage,iotivity-things-manager))
236 $(eval $(call BuildPackage,iotivity-example-garage))