Add spec file for Tizen build
[platform/upstream/iotivity.git] / tools / tizen / iotivity.spec
1 Name: iotivity
2 Version: 0.9
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 %arm
36 export RPM_ARCH=arm
37 %else
38 export RPM_ARCH=x86
39 %endif
40
41 scons -j 4 TARGET_ARCH=$RPM_ARCH
42
43 %install
44 rm -rf %{buildroot}
45 mkdir -p %{buildroot}%{_includedir}
46 mkdir -p %{buildroot}%{_libdir}
47 mkdir -p %{buildroot}%{_sbindir}
48
49 cp out/linux/*/release/lib*.so %{buildroot}%{_libdir}
50 cp out/linux/*/release/lib*.a %{buildroot}%{_libdir}
51
52 cp resource/csdk/stack/include/ocstack.h %{buildroot}%{_includedir}
53 cp resource/include/*.h %{buildroot}%{_includedir}
54
55 cp service/things-manager/sdk/inc/*.h %{buildroot}%{_includedir}
56 cp service/soft-sensor-manager/SDK/cpp/include/*.h %{buildroot}%{_includedir}
57
58
59 %clean
60 rm -rf %{buildroot}
61
62 %post -p /sbin/ldconfig
63
64 %postun -p /sbin/ldconfig
65
66 %files
67 %defattr(-,root,root,-)
68 %{_libdir}/lib*.so
69 %{_libdir}/lib*.a
70
71 %files devel
72 %defattr(-,root,root,-)
73 %{_includedir}/*.h