4 Summary: IoT Connectivity sponsored by the OIC
5 Group: Network & Connectivity/Other
7 URL: https://www.iotivity.org/
8 Source0: %{name}-%{version}.tar.bz2
9 Source1001: %{name}.manifest
10 Source1002: %{name}-test.manifest
11 BuildRequires: gettext-tools, expat-devel
12 BuildRequires: python, libcurl-devel
14 BuildRequires: boost-devel
15 BuildRequires: pkgconfig(dlog)
16 BuildRequires: pkgconfig(uuid)
17 BuildRequires: pkgconfig(capi-network-wifi)
18 BuildRequires: pkgconfig(capi-network-bluetooth)
19 BuildRequires: pkgconfig(glib-2.0)
20 BuildRequires: pkgconfig(sqlite3)
21 Requires(postun): /sbin/ldconfig
22 Requires(post): /sbin/ldconfig
23 %if 0%{?speedpython:1} && 0%{?en_speedpython:1}
27 # default is RELEASE mode.
28 # If DEBUG mode is needed, please use tizen_build_devel_mode
31 %{!?TARGET_TRANSPORT: %define TARGET_TRANSPORT IP}
32 %{!?LOGGING: %define LOGGING True}
33 %{!?ROUTING: %define ROUTING GW}
34 %{!?ES_TARGET_ENROLLEE: %define ES_TARGET_ENROLLEE tizen}
35 %{!?ES_ROLE: %define ES_ROLE enrollee}
36 %{!?ES_SOFTAP_MODE: %define ES_SOFTAP_MODE MEDIATOR_SOFTAP}
37 %{!?VERBOSE: %define VERBOSE 0}
40 An open source reference implementation of the OIC standard specifications
41 IoTivity Base Libraries are included.
45 Summary: Development files for %{name}
46 Group: Network & Connectivity/Service
47 Requires: %{name} = %{version}-%{release}
50 The %{name}-service package contains service libraries files for
51 developing applications that use %{name}-service.
54 Summary: Development files for %{name}
55 Group: Network & Connectivity/Testing
56 Requires: %{name} = %{version}-%{release}
59 The %{name}-test package contains example files to show
60 how the iotivity works using %{name}-test
63 Summary: Development files for %{name}
64 Group: Network & Connectivity/Development
65 Requires: %{name} = %{version}-%{release}
69 The %{name}-devel package contains libraries and header files for
70 developing applications that use %{name}.
74 chmod g-w %_sourcedir/*
76 cp LICENSE.md LICENSE.APLv2
78 %if 0%{?tizen_version_major} < 3
81 cp %{SOURCE1001} ./%{name}-test.manifest
85 %define RPM_ARCH %{_arch}
87 %ifarch armv7l armv7hl armv7nhl armv7tnhl armv7thl
88 %define RPM_ARCH "armeabi-v7a"
92 %define RPM_ARCH "arm64"
96 %define RPM_ARCH "x86_64"
100 %define RPM_ARCH "x86"
106 %define JOB %{?_smp_mflags}
109 scons %{JOB} --prefix=%{_prefix} \
111 TARGET_OS=tizen TARGET_ARCH=%{RPM_ARCH} TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
112 RELEASE=%{RELEASE} SECURED=1 LOGGING=%{LOGGING} ROUTING=%{ROUTING} \
113 ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} ES_ROLE=%{ES_ROLE} ES_SOFTAP_MODE=%{ES_SOFTAP_MODE} \
114 LIB_INSTALL_DIR=%{_libdir}
119 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
120 scons install --install-sandbox=%{buildroot} --prefix=%{_prefix} \
121 TARGET_OS=tizen TARGET_ARCH=%{RPM_ARCH} TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
122 RELEASE=%{RELEASE} SECURED=1 LOGGING=%{LOGGING} ROUTING=%{ROUTING} \
123 ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} ES_ROLE=%{ES_ROLE} ES_SOFTAP_MODE=%{ES_SOFTAP_MODE} \
124 LIB_INSTALL_DIR=%{_libdir}
128 %if %{RELEASE} == "True"
129 %define build_mode release
131 %define build_mode debug
133 %define ex_install_dir %{buildroot}%{_bindir}
134 mkdir -p %{ex_install_dir}
135 cp out/tizen/*/%{build_mode}/examples/OICMiddle/OICMiddle %{ex_install_dir}
136 cp out/tizen/*/%{build_mode}/resource/examples/devicediscoveryclient %{ex_install_dir}
137 cp out/tizen/*/%{build_mode}/resource/examples/devicediscoveryserver %{ex_install_dir}
138 cp out/tizen/*/%{build_mode}/resource/examples/fridgeclient %{ex_install_dir}
139 cp out/tizen/*/%{build_mode}/resource/examples/fridgeserver %{ex_install_dir}
140 cp out/tizen/*/%{build_mode}/resource/examples/garageclient %{ex_install_dir}
141 cp out/tizen/*/%{build_mode}/resource/examples/garageserver %{ex_install_dir}
142 cp out/tizen/*/%{build_mode}/resource/examples/groupclient %{ex_install_dir}
143 cp out/tizen/*/%{build_mode}/resource/examples/groupserver %{ex_install_dir}
144 cp out/tizen/*/%{build_mode}/resource/examples/lightserver %{ex_install_dir}
145 cp out/tizen/*/%{build_mode}/resource/examples/presenceclient %{ex_install_dir}
146 cp out/tizen/*/%{build_mode}/resource/examples/presenceserver %{ex_install_dir}
147 cp out/tizen/*/%{build_mode}/resource/examples/roomclient %{ex_install_dir}
148 cp out/tizen/*/%{build_mode}/resource/examples/roomserver %{ex_install_dir}
149 cp out/tizen/*/%{build_mode}/resource/examples/simpleclient %{ex_install_dir}
150 cp out/tizen/*/%{build_mode}/resource/examples/simpleclientHQ %{ex_install_dir}
151 cp out/tizen/*/%{build_mode}/resource/examples/simpleclientserver %{ex_install_dir}
152 cp out/tizen/*/%{build_mode}/resource/examples/simpleserver %{ex_install_dir}
153 cp out/tizen/*/%{build_mode}/resource/examples/simpleserverHQ %{ex_install_dir}
154 cp out/tizen/*/%{build_mode}/resource/examples/threadingsample %{ex_install_dir}
155 cp out/tizen/*/%{build_mode}/resource/examples/oic_svr_db_server.dat %{ex_install_dir}
156 cp out/tizen/*/%{build_mode}/resource/examples/oic_svr_db_client.dat %{ex_install_dir}
157 mkdir -p %{ex_install_dir}/provisioning
158 cp out/tizen/*/%{build_mode}/resource/csdk/security/provisioning/sample/provisioningclient %{ex_install_dir}/provisioning/
159 cp out/tizen/*/%{build_mode}/resource/csdk/security/provisioning/sample/oic_svr_db_client.dat %{ex_install_dir}/provisioning/
160 cp out/tizen/*/%{build_mode}/resource/csdk/security/provisioning/sample/sampleserver_justworks %{ex_install_dir}/provisioning/
161 cp out/tizen/*/%{build_mode}/resource/csdk/security/provisioning/sample/oic_svr_db_server_justworks.dat %{ex_install_dir}/provisioning/
162 cp out/tizen/*/%{build_mode}/resource/csdk/security/provisioning/sample/sampleserver_randompin %{ex_install_dir}/provisioning/
163 cp out/tizen/*/%{build_mode}/resource/csdk/security/provisioning/sample/oic_svr_db_server_randompin.dat %{ex_install_dir}/provisioning/
165 cp ./resource/csdk/security/include/pinoxmcommon.h %{buildroot}%{_includedir}
166 cp ./resource/csdk/security/include/securevirtualresourcetypes.h %{buildroot}%{_includedir}
167 cp ./resource/csdk/security/provisioning/include/oxm/*.h %{buildroot}%{_includedir}
168 cp ./resource/csdk/security/provisioning/include/internal/*.h %{buildroot}%{_includedir}
169 cp ./resource/csdk/security/provisioning/include/*.h %{buildroot}%{_includedir}
170 cp ./resource/csdk/connectivity/api/casecurityinterface.h %{buildroot}%{_includedir}
171 cp ./resource/csdk/connectivity/api/cacommon.h %{buildroot}%{_includedir}
174 cp ./resource/csdk/security/include/internal/doxmresource.h %{buildroot}%{_includedir}
175 cp ./resource/csdk/security/include/internal/verresource.h %{buildroot}%{_includedir}
177 %if 0%{?tizen_version_major} < 3
178 mkdir -p %{buildroot}/%{_datadir}/license
179 cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}
180 cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}-service
181 cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}-test
184 cp service/things-manager/sdk/inc/*.h %{buildroot}%{_includedir}
185 cp service/easy-setup/inc/*.h %{buildroot}%{_includedir}
186 cp service/easy-setup/enrollee/inc/*.h %{buildroot}%{_includedir}
189 %post -p /sbin/ldconfig
191 %postun -p /sbin/ldconfig
194 %manifest %{name}.manifest
195 %defattr(-,root,root,-)
197 %{_libdir}/liboc_logger.so
198 %{_libdir}/liboc_logger_core.so
199 %{_libdir}/liboctbstack.so
200 %{_libdir}/libconnectivity_abstraction.so
201 %{_libdir}/libocpmapi.so
202 %{_libdir}/libocprovision.so
203 %if 0%{?tizen_version_major} < 3
204 %{_datadir}/license/%{name}
206 %license LICENSE.APLv2
210 %manifest %{name}.manifest
211 %defattr(-,root,root,-)
212 %{_libdir}/libBMISensorBundle.so
213 %{_libdir}/libDISensorBundle.so
214 %{_libdir}/libresource_hosting.so
215 %{_libdir}/libTGMSDKLibrary.so
216 %{_libdir}/libHueBundle.so
217 %{_libdir}/librcs_client.so
218 %{_libdir}/librcs_common.so
219 %{_libdir}/librcs_container.so
220 %{_libdir}/librcs_server.so
221 %{_libdir}/libESEnrolleeSDK.so
222 %if 0%{?tizen_version_major} < 3
223 %{_datadir}/license/%{name}-service
225 %license LICENSE.APLv2
229 %manifest %{name}-test.manifest
230 %defattr(-,root,root,-)
232 %if 0%{?tizen_version_major} < 3
233 %{_datadir}/license/%{name}-test
235 %license LICENSE.APLv2
239 %defattr(-,root,root,-)
241 %{_libdir}/pkgconfig/%{name}.pc