Merge branch 'connectivity-abstraction' to master
[platform/upstream/iotivity.git] / tools / tizen / iotivity.spec
1 Name: iotivity
2 Version: 0.9.0
3 Release: 0
4 Summary: IoTivity Base Stack & IoTivity Services
5 Group: System Environment/Libraries
6 License: Apache-2.0
7 URL: https://www.iotivity.org/
8 Source0: %{name}-%{version}.tar.bz2
9
10 BuildRequires:  gettext, expat-devel
11 BuildRequires:  python, libcurl-devel
12 BuildRequires:  scons
13 BuildRequires:  openssl-devel
14 BuildRequires:  boost-devel
15 Requires(postun): /sbin/ldconfig
16 Requires(post): /sbin/ldconfig
17
18 %description
19 IoTivity Base (RICH & LITE) Stack & IoTivity Services
20
21 %package devel
22 Summary: Development files for %{name}
23 Group: Development/Libraries
24 Requires: %{name} = %{version}-%{release}
25 Requires: pkgconfig
26
27 %description devel
28 The %{name}-devel package contains libraries and header files for
29 developing applications that use %{name}.
30
31 %prep
32 %setup -q -n %{name}-%{version}
33
34 %build
35 %ifarch armv7l
36 export RPM_ARCH=armeabi-v7a
37 %else
38 %ifarch %arm
39 export RPM_ARCH=arm
40 %else
41 %ifarch aarch64
42 export RPM_ARCH=arm64
43 %else
44 %ifarch i586 i686 %{ix86}
45 export RPM_ARCH=x86
46 %else
47 export RPM_ARCH=%{_arch}
48 %endif
49 %endif
50 %endif
51 %endif
52
53
54 scons -j 4 TARGET_OS=tizen TARGET_ARCH=$RPM_ARCH
55
56 %install
57 rm -rf %{buildroot}
58 mkdir -p %{buildroot}%{_includedir}
59 mkdir -p %{buildroot}%{_libdir}
60 mkdir -p %{buildroot}%{_sbindir}
61
62 cp out/tizen/*/release/lib*.so %{buildroot}%{_libdir}
63 cp out/tizen/*/release/lib*.a %{buildroot}%{_libdir}
64
65 cp resource/csdk/stack/include/ocstack.h %{buildroot}%{_includedir}
66 cp resource/include/*.h %{buildroot}%{_includedir}
67
68 cp service/things-manager/sdk/inc/*.h %{buildroot}%{_includedir}
69 cp service/soft-sensor-manager/SDK/cpp/include/*.h %{buildroot}%{_includedir}
70
71
72 %clean
73 rm -rf %{buildroot}
74
75 %post -p /sbin/ldconfig
76
77 %postun -p /sbin/ldconfig
78
79 %files
80 %defattr(-,root,root,-)
81 %{_libdir}/lib*.so
82 %{_libdir}/lib*.a
83
84 %files devel
85 %defattr(-,root,root,-)
86 %{_includedir}/*.h