4 Summary: IoT Connectivity sponsored by the OCF
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: openssl-devel
15 BuildRequires: boost-devel
16 BuildRequires: boost-thread
17 BuildRequires: boost-system
18 BuildRequires: boost-filesystem
19 BuildRequires: pkgconfig(dlog)
20 BuildRequires: pkgconfig(uuid)
21 BuildRequires: pkgconfig(capi-network-wifi)
22 BuildRequires: pkgconfig(capi-network-bluetooth)
23 BuildRequires: pkgconfig(glib-2.0)
24 BuildRequires: pkgconfig(sqlite3)
25 Requires(postun): /sbin/ldconfig
26 Requires(post): /sbin/ldconfig
29 ## If tizen 2.x, RELEASE follows tizen_build_binary_release_type_eng. ##
30 ## and if tizen 3.0, RELEASE follows tizen_build_devel_mode. ##
31 %if 0%{?tizen_build_devel_mode} == 1 || 0%{?tizen_build_binary_release_type_eng} == 1
37 %{!?TARGET_TRANSPORT: %define TARGET_TRANSPORT IP}
38 %{!?SECURED: %define SECURED 1}
39 %{!?LOGGING: %define LOGGING True}
40 %{!?ROUTING: %define ROUTING EP}
41 %{!?WITH_TCP: %define WITH_TCP true}
42 %{!?WITH_PROXY: %define WITH_PROXY False}
43 %{!?ES_TARGET_ENROLLEE: %define ES_TARGET_ENROLLEE tizen}
44 %{!?VERBOSE: %define VERBOSE 1}
47 An open source reference implementation of the OIC standard specifications
48 IoTivity Base Libraries are included.
52 Summary: Development files for %{name}
53 Group: Network & Connectivity/Service
54 Requires: %{name} = %{version}-%{release}
57 The %{name}-service package contains service libraries files for
58 developing applications that use %{name}-service.
61 Summary: Development files for %{name}
62 Group: Network & Connectivity/Testing
63 Requires: %{name} = %{version}-%{release}
66 The %{name}-test package contains example files to show
67 how the iotivity works using %{name}-test
70 Summary: Development files for %{name}
71 Group: Network & Connectivity/Development
72 Requires: %{name} = %{version}-%{release}
76 The %{name}-devel package contains libraries and header files for
77 developing applications that use %{name}.
81 chmod g-w %_sourcedir/*
83 cp LICENSE.md LICENSE.APLv2
85 %if 0%{?tizen_version_major} < 3
88 cp %{SOURCE1001} ./%{name}-test.manifest
92 %define RPM_ARCH %{_arch}
94 %ifarch armv7l armv7hl armv7nhl armv7tnhl armv7thl
95 %define RPM_ARCH "armeabi-v7a"
99 %define RPM_ARCH "arm64"
103 %define RPM_ARCH "x86_64"
107 %define RPM_ARCH "x86"
110 scons -j2 --prefix=%{_prefix} \
112 TARGET_OS=tizen TARGET_ARCH=%{RPM_ARCH} TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
113 RELEASE=%{RELEASE} SECURED=%{SECURED} WITH_TCP=%{WITH_TCP} WITH_CLOUD=%{WITH_CLOUD} LOGGING=%{LOGGING} ROUTING=%{ROUTING} \
114 ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} LIB_INSTALL_DIR=%{_libdir} WITH_PROXY=%{WITH_PROXY}
120 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
121 scons install --install-sandbox=%{buildroot} --prefix=%{_prefix} \
122 TARGET_OS=tizen TARGET_ARCH=%{RPM_ARCH} TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
123 RELEASE=%{RELEASE} SECURED=%{SECURED} WITH_TCP=%{WITH_TCP} WITH_CLOUD=%{WITH_CLOUD} LOGGING=%{LOGGING} ROUTING=%{ROUTING} \
124 ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} LIB_INSTALL_DIR=%{_libdir} WITH_PROXY=%{WITH_PROXY}
129 %if %{RELEASE} == "True"
130 %define build_mode release
132 %define build_mode debug
134 %define ex_install_dir %{buildroot}%{_bindir}
135 mkdir -p %{ex_install_dir}
136 cp out/tizen/*/%{build_mode}/examples/OICMiddle/OICMiddle %{ex_install_dir}
137 cp out/tizen/*/%{build_mode}/resource/examples/devicediscoveryclient %{ex_install_dir}
138 cp out/tizen/*/%{build_mode}/resource/examples/devicediscoveryserver %{ex_install_dir}
139 cp out/tizen/*/%{build_mode}/resource/examples/fridgeclient %{ex_install_dir}
140 cp out/tizen/*/%{build_mode}/resource/examples/fridgeserver %{ex_install_dir}
141 cp out/tizen/*/%{build_mode}/resource/examples/garageclient %{ex_install_dir}
142 cp out/tizen/*/%{build_mode}/resource/examples/garageserver %{ex_install_dir}
143 cp out/tizen/*/%{build_mode}/resource/examples/groupclient %{ex_install_dir}
144 cp out/tizen/*/%{build_mode}/resource/examples/groupserver %{ex_install_dir}
145 cp out/tizen/*/%{build_mode}/resource/examples/lightserver %{ex_install_dir}
146 cp out/tizen/*/%{build_mode}/resource/examples/presenceclient %{ex_install_dir}
147 cp out/tizen/*/%{build_mode}/resource/examples/presenceserver %{ex_install_dir}
148 cp out/tizen/*/%{build_mode}/resource/examples/roomclient %{ex_install_dir}
149 cp out/tizen/*/%{build_mode}/resource/examples/roomserver %{ex_install_dir}
150 cp out/tizen/*/%{build_mode}/resource/examples/simpleclient %{ex_install_dir}
151 cp out/tizen/*/%{build_mode}/resource/examples/simpleclientHQ %{ex_install_dir}
152 cp out/tizen/*/%{build_mode}/resource/examples/simpleclientserver %{ex_install_dir}
153 cp out/tizen/*/%{build_mode}/resource/examples/simpleserver %{ex_install_dir}
154 cp out/tizen/*/%{build_mode}/resource/examples/simpleserverHQ %{ex_install_dir}
155 cp out/tizen/*/%{build_mode}/resource/examples/threadingsample %{ex_install_dir}
156 cp out/tizen/*/%{build_mode}/resource/examples/oic_svr_db_server.dat %{ex_install_dir}
157 cp out/tizen/*/%{build_mode}/resource/examples/oic_svr_db_client.dat %{ex_install_dir}
158 cp out/tizen/*/%{build_mode}/libcoap.a %{buildroot}%{_libdir}
159 %if 0%{?SECURED} == 1
160 mkdir -p %{ex_install_dir}/provisioning
161 mkdir -p %{ex_install_dir}/provision-sample
163 cp ./resource/csdk/security/include/pinoxmcommon.h %{buildroot}%{_includedir}
164 cp ./resource/csdk/security/provisioning/include/oxm/*.h %{buildroot}%{_includedir}
165 cp ./resource/csdk/security/provisioning/include/internal/*.h %{buildroot}%{_includedir}
166 cp ./resource/csdk/security/provisioning/include/*.h %{buildroot}%{_includedir}
167 cp ./resource/csdk/security/provisioning/sample/oic_svr_db_server_justworks.dat %{buildroot}%{_libdir}/oic_svr_db_server.dat
168 cp out/tizen/*/%{build_mode}/resource/csdk/security/provisioning/sample/sampleserver_justworks %{ex_install_dir}/provision-sample/
169 cp ./resource/csdk/security/provisioning/sample/oic_svr_db_server_justworks.dat %{ex_install_dir}/provision-sample/
170 cp out/tizen/*/%{build_mode}/resource/csdk/security/provisioning/sample/sampleserver_randompin %{ex_install_dir}/provision-sample/
171 cp ./resource/csdk/security/provisioning/sample/oic_svr_db_server_randompin.dat %{ex_install_dir}/provision-sample/
176 %if 0%{?tizen_version_major} < 3
177 mkdir -p %{buildroot}/%{_datadir}/license
178 cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}
179 cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}-service
180 cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}-test
182 cp resource/c_common/*.h %{buildroot}%{_includedir}
183 cp resource/csdk/stack/include/*.h %{buildroot}%{_includedir}
184 cp resource/csdk/logger/include/*.h %{buildroot}%{_includedir}
186 cp service/things-manager/sdk/inc/*.h %{buildroot}%{_includedir}
187 cp service/easy-setup/inc/*.h %{buildroot}%{_includedir}
188 cp service/easy-setup/enrollee/inc/*.h %{buildroot}%{_includedir}
191 %post -p /sbin/ldconfig
193 %postun -p /sbin/ldconfig
196 %manifest %{name}.manifest
197 %defattr(-,root,root,-)
199 %{_libdir}/liboc_logger.so
200 %{_libdir}/liboc_logger_core.so
201 %{_libdir}/liboctbstack.so
202 %{_libdir}/libconnectivity_abstraction.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%{?SECURED} == 1
223 %{_libdir}/libocpmapi.so
224 %{_libdir}/libocprovision.so
225 %{_libdir}/oic_svr_db_server.dat
227 %if 0%{?tizen_version_major} < 3
228 %{_datadir}/license/%{name}-service
230 %license LICENSE.APLv2
234 %manifest %{name}-test.manifest
235 %defattr(-,root,root,-)
237 %if 0%{?tizen_version_major} < 3
238 %{_datadir}/license/%{name}-test
240 %license LICENSE.APLv2
244 %defattr(-,root,root,-)
246 %{_libdir}/pkgconfig/%{name}.pc