4 Summary: IoTivity Base Stack & IoTivity Services
5 Group: System Environment/Libraries
7 URL: https://www.iotivity.org/
8 Source0: %{name}-%{version}.tar.bz2
9 Source1001: %{name}.manifest
10 Source1002: %{name}-test.manifest
11 BuildRequires: gettext, 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 Requires(postun): /sbin/ldconfig
26 Requires(post): /sbin/ldconfig
28 %define release_mode false
32 IoTivity Base (RICH & LITE) Stack & IoTivity Services
35 Summary: Development files for %{name}
36 Group: Development/Libraries
37 Requires: %{name} = %{version}-%{release}
40 The %{name}-service package contains service libraries files for
41 developing applications that use %{name}-service.
44 Summary: Development files for %{name}
45 Group: Development/Libraries
46 Requires: %{name} = %{version}-%{release}
49 The %{name}-test package contains example files to show
50 how the iotivity works using %{name}-test
53 Summary: Development files for %{name}
54 Group: Development/Libraries
55 Requires: %{name} = %{version}-%{release}
59 The %{name}-devel package contains libraries and header files for
60 developing applications that use %{name}.
63 %setup -q -n %{name}-%{version}
65 %if 0%{?tizen_version_major} < 3
68 cp %{SOURCE1001} ./%{name}-test.manifest
72 %define RPM_ARCH %{_arch}
74 %ifarch armv7l armv7hl armv7nhl armv7tnhl armv7thl
75 %define RPM_ARCH "armeabi-v7a"
79 %define RPM_ARCH "arm64"
83 %define RPM_ARCH "x86_64"
87 %define RPM_ARCH "x86"
91 scons -j 4 TARGET_OS=tizen TARGET_ARCH=%{RPM_ARCH} TARGET_TRANSPORT=IP RELEASE=%{release_mode} SECURED=%{secure_mode}
95 mkdir -p %{buildroot}%{_includedir}
96 mkdir -p %{buildroot}%{_libdir}
97 mkdir -p %{buildroot}%{_bindir}
100 %if %{release_mode} == "true"
101 %define build_mode release
103 %define build_mode debug
106 cp out/tizen/*/%{build_mode}/resource/examples/devicediscoveryclient %{buildroot}%{_bindir}
107 cp out/tizen/*/%{build_mode}/resource/examples/devicediscoveryserver %{buildroot}%{_bindir}
108 cp out/tizen/*/%{build_mode}/resource/examples/fridgeclient %{buildroot}%{_bindir}
109 cp out/tizen/*/%{build_mode}/resource/examples/fridgeserver %{buildroot}%{_bindir}
110 cp out/tizen/*/%{build_mode}/resource/examples/garageclient %{buildroot}%{_bindir}
111 cp out/tizen/*/%{build_mode}/resource/examples/garageserver %{buildroot}%{_bindir}
112 cp out/tizen/*/%{build_mode}/resource/examples/groupclient %{buildroot}%{_bindir}
113 cp out/tizen/*/%{build_mode}/resource/examples/groupserver %{buildroot}%{_bindir}
114 cp out/tizen/*/%{build_mode}/resource/examples/lightserver %{buildroot}%{_bindir}
115 cp out/tizen/*/%{build_mode}/resource/examples/presenceclient %{buildroot}%{_bindir}
116 cp out/tizen/*/%{build_mode}/resource/examples/presenceserver %{buildroot}%{_bindir}
117 cp out/tizen/*/%{build_mode}/resource/examples/roomclient %{buildroot}%{_bindir}
118 cp out/tizen/*/%{build_mode}/resource/examples/roomserver %{buildroot}%{_bindir}
119 cp out/tizen/*/%{build_mode}/resource/examples/simpleclient %{buildroot}%{_bindir}
120 cp out/tizen/*/%{build_mode}/resource/examples/simpleclientHQ %{buildroot}%{_bindir}
121 cp out/tizen/*/%{build_mode}/resource/examples/simpleclientserver %{buildroot}%{_bindir}
122 cp out/tizen/*/%{build_mode}/resource/examples/simpleserver %{buildroot}%{_bindir}
123 cp out/tizen/*/%{build_mode}/resource/examples/simpleserverHQ %{buildroot}%{_bindir}
124 cp out/tizen/*/%{build_mode}/resource/examples/threadingsample %{buildroot}%{_bindir}
126 cp out/tizen/*/%{build_mode}/lib*.so %{buildroot}%{_libdir}
128 cp resource/csdk/stack/include/*.h %{buildroot}%{_includedir}
129 cp resource/csdk/logger/include/*.h %{buildroot}%{_includedir}
130 cp resource/csdk/ocrandom/include/*.h %{buildroot}%{_includedir}
131 cp -r resource/oc_logger/include/* %{buildroot}%{_includedir}
132 cp resource/include/*.h %{buildroot}%{_includedir}
134 cp service/things-manager/sdk/inc/*.h %{buildroot}%{_includedir}
136 %post -p /sbin/ldconfig
138 %postun -p /sbin/ldconfig
141 %manifest %{name}.manifest
142 %defattr(-,root,root,-)
144 %{_libdir}/liboc_logger.so
145 %{_libdir}/liboc_logger_core.so
146 %{_libdir}/liboctbstack.so
147 %{_libdir}/libconnectivity_abstraction.so
150 %manifest %{name}.manifest
151 %defattr(-,root,root,-)
152 %{_libdir}/libBMISensorBundle.so
153 %{_libdir}/libDISensorBundle.so
154 %{_libdir}/libresource_hosting.so
155 %{_libdir}/libTGMSDKLibrary.so
156 %{_libdir}/libHueBundle.so
157 %{_libdir}/librcs_client.so
158 %{_libdir}/librcs_common.so
159 %{_libdir}/librcs_container.so
160 %{_libdir}/librcs_server.so
163 %manifest %{name}-test.manifest
164 %defattr(-,root,root,-)
165 %{_bindir}/devicediscoveryclient
166 %{_bindir}/devicediscoveryserver
167 %{_bindir}/fridgeclient
168 %{_bindir}/fridgeserver
169 %{_bindir}/garageclient
170 %{_bindir}/garageserver
171 %{_bindir}/groupclient
172 %{_bindir}/groupserver
173 %{_bindir}/lightserver
174 %{_bindir}/presenceclient
175 %{_bindir}/presenceserver
176 %{_bindir}/roomclient
177 %{_bindir}/roomserver
178 %{_bindir}/simpleclient
179 %{_bindir}/simpleclientHQ
180 %{_bindir}/simpleclientserver
181 %{_bindir}/simpleserver
182 %{_bindir}/simpleserverHQ
183 %{_bindir}/threadingsample
186 %defattr(-,root,root,-)