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