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: 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(capi-appfw-app-common)
24 BuildRequires: pkgconfig(glib-2.0)
25 BuildRequires: pkgconfig(sqlite3)
26 Requires(postun): /sbin/ldconfig
27 Requires(post): /sbin/ldconfig
30 ## If tizen 2.x, RELEASE follows tizen_build_binary_release_type_eng. ##
31 ## and if tizen 3.0, RELEASE follows tizen_build_devel_mode. ##
32 %if 0%{?tizen_build_devel_mode} == 1 || 0%{?tizen_build_binary_release_type_eng} == 1
38 %{!?TARGET_TRANSPORT: %define TARGET_TRANSPORT IP,BT}
39 %{!?SECURED: %define SECURED 0}
40 %{!?LOGGING: %define LOGGING True}
41 %{!?ROUTING: %define ROUTING GW}
44 An open source reference implementation of the OIC standard specifications
45 IoTivity Base Libraries are included.
49 Summary: Development files for %{name}
50 Group: Network & Connectivity/Service
51 Requires: %{name} = %{version}-%{release}
54 The %{name}-service package contains service libraries files for
55 developing applications that use %{name}-service.
58 Summary: Development files for %{name}
59 Group: Network & Connectivity/Testing
60 Requires: %{name} = %{version}-%{release}
63 The %{name}-test package contains example files to show
64 how the iotivity works using %{name}-test
67 Summary: Development files for %{name}
68 Group: Network & Connectivity/Development
69 Requires: %{name} = %{version}-%{release}
73 The %{name}-devel package contains libraries and header files for
74 developing applications that use %{name}.
78 chmod g-w %_sourcedir/*
80 cp LICENSE.md LICENSE.APLv2
82 %if 0%{?tizen_version_major} < 3
85 cp %{SOURCE1001} ./%{name}-test.manifest
89 %define RPM_ARCH %{_arch}
91 %ifarch armv7l armv7hl armv7nhl armv7tnhl armv7thl
92 %define RPM_ARCH "armeabi-v7a"
96 %define RPM_ARCH "arm64"
100 %define RPM_ARCH "x86_64"
104 %define RPM_ARCH "x86"
108 scons -j2 --prefix=%{_prefix} \
109 TARGET_OS=tizen TARGET_ARCH=%{RPM_ARCH} TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
110 RELEASE=%{RELEASE} SECURED=%{SECURED} LOGGING=%{LOGGING} ROUTING=%{ROUTING} \
111 LIB_INSTALL_DIR=%{_libdir}
116 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
117 scons install --install-sandbox=%{buildroot} --prefix=%{_prefix} \
118 TARGET_OS=tizen TARGET_ARCH=%{RPM_ARCH} TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
119 RELEASE=%{RELEASE} SECURED=%{SECURED} LOGGING=%{LOGGING} ROUTING=%{ROUTING} \
120 LIB_INSTALL_DIR=%{_libdir}
124 %if %{RELEASE} == "True"
125 %define build_mode release
127 %define build_mode debug
129 %define ex_install_dir %{buildroot}%{_bindir}
130 mkdir -p %{ex_install_dir}
131 cp out/tizen/*/%{build_mode}/examples/OICMiddle/OICMiddle %{ex_install_dir}
132 cp out/tizen/*/%{build_mode}/resource/examples/devicediscoveryclient %{ex_install_dir}
133 cp out/tizen/*/%{build_mode}/resource/examples/devicediscoveryserver %{ex_install_dir}
134 cp out/tizen/*/%{build_mode}/resource/examples/fridgeclient %{ex_install_dir}
135 cp out/tizen/*/%{build_mode}/resource/examples/fridgeserver %{ex_install_dir}
136 cp out/tizen/*/%{build_mode}/resource/examples/garageclient %{ex_install_dir}
137 cp out/tizen/*/%{build_mode}/resource/examples/garageserver %{ex_install_dir}
138 cp out/tizen/*/%{build_mode}/resource/examples/groupclient %{ex_install_dir}
139 cp out/tizen/*/%{build_mode}/resource/examples/groupserver %{ex_install_dir}
140 cp out/tizen/*/%{build_mode}/resource/examples/lightserver %{ex_install_dir}
141 cp out/tizen/*/%{build_mode}/resource/examples/presenceclient %{ex_install_dir}
142 cp out/tizen/*/%{build_mode}/resource/examples/presenceserver %{ex_install_dir}
143 cp out/tizen/*/%{build_mode}/resource/examples/roomclient %{ex_install_dir}
144 cp out/tizen/*/%{build_mode}/resource/examples/roomserver %{ex_install_dir}
145 cp out/tizen/*/%{build_mode}/resource/examples/simpleclient %{ex_install_dir}
146 cp out/tizen/*/%{build_mode}/resource/examples/simpleclientHQ %{ex_install_dir}
147 cp out/tizen/*/%{build_mode}/resource/examples/simpleclientserver %{ex_install_dir}
148 cp out/tizen/*/%{build_mode}/resource/examples/simpleserver %{ex_install_dir}
149 cp out/tizen/*/%{build_mode}/resource/examples/simpleserverHQ %{ex_install_dir}
150 cp out/tizen/*/%{build_mode}/resource/examples/threadingsample %{ex_install_dir}
151 cp out/tizen/*/%{build_mode}/resource/examples/oic_svr_db_server.json %{ex_install_dir}
152 cp out/tizen/*/%{build_mode}/resource/examples/oic_svr_db_client.json %{ex_install_dir}
153 %if 0%{?SECURED} == 1
154 mkdir -p %{ex_install_dir}/provisioning
155 cp out/tizen/*/%{build_mode}/resource/provisioning/examples/oic_svr_db_client.json %{ex_install_dir}/provisioning/
156 cp out/tizen/*/%{build_mode}/resource/provisioning/examples/provisioningclient %{ex_install_dir}/provisioning/
160 cp resource/csdk/stack/include/ocpayload.h %{buildroot}%{_includedir}/resource
161 cp resource/c_common/ocrandom/include/ocrandom.h %{buildroot}%{_includedir}/resource
163 %if 0%{?tizen_version_major} < 3
164 mkdir -p %{buildroot}/%{_datadir}/license
165 cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}
166 cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}-service
167 cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}-test
170 %post -p /sbin/ldconfig
172 %postun -p /sbin/ldconfig
175 %manifest %{name}.manifest
176 %defattr(-,root,root,-)
178 %{_libdir}/liboc_logger.so
179 %{_libdir}/liboc_logger_core.so
180 %{_libdir}/liboctbstack.so
181 %{_libdir}/libconnectivity_abstraction.so
182 %if 0%{?tizen_version_major} < 3
183 %{_datadir}/license/%{name}
185 %license LICENSE.APLv2
189 %manifest %{name}.manifest
190 %defattr(-,root,root,-)
191 %{_libdir}/libBMISensorBundle.so
192 %{_libdir}/libDISensorBundle.so
193 %{_libdir}/libresource_hosting.so
194 %{_libdir}/libTGMSDKLibrary.so
195 %{_libdir}/libHueBundle.so
196 %{_libdir}/librcs_client.so
197 %{_libdir}/librcs_common.so
198 %{_libdir}/librcs_container.so
199 %{_libdir}/librcs_server.so
200 %if 0%{?tizen_version_major} < 3
201 %{_datadir}/license/%{name}-service
203 %license LICENSE.APLv2
207 %manifest %{name}-test.manifest
208 %defattr(-,root,root,-)
210 %if 0%{?tizen_version_major} < 3
211 %{_datadir}/license/%{name}-test
213 %license LICENSE.APLv2
217 %defattr(-,root,root,-)
219 %{_libdir}/pkgconfig/%{name}.pc