Integrate some common codes from tota-ua
[platform/core/system/libtota.git] / packaging / libtota.spec
1 Name:           libtota
2 Summary:        fota update library
3 ExclusiveArch:  %{arm}
4 Version:        0.2.0
5 Release:        1
6 Group:          System
7 License:        Apache-2.0 and BSD-2-Clause and BSD-3-Clause and PD
8 Source0:        %{name}-%{version}.tar.gz
9
10 BuildRequires:  cmake
11 BuildRequires:  pkgconfig(libsmack)
12 BuildRequires:  pkgconfig(lib7zip)
13 BuildRequires:  pkgconfig(libdivsufsort)
14
15 %description
16 Fota update agent which update firmware using delta files
17
18 %package devel
19 License:        Apache-2.0 and BSD-2-Clause and BSD-3-Clause and PD
20 Summary:        libtota library (development)
21 Requires:       libtota = %{version}
22 Group:          Development/Libraries
23
24 %description devel
25 Description: libfactory library (development)
26
27 %package -n tota-bsdiff
28 Summary:       bsdiff / bspatch tools for TOTA
29
30 %description -n tota-bsdiff
31 bsdiff / bspatch are tools for building and applying patches to binary files.
32 This package offers these tools for TOTA.
33
34 %prep
35 %setup -q
36
37
38 %build
39 export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--as-needed"
40 mkdir cmake_tmp
41 cd cmake_tmp
42 LDFLAGS="$LDFLAGS"
43 %cmake .. \
44         -DCMAKE_INSTALL_PREFIX=%{_prefix}
45
46 make %{?jobs:-j%jobs}
47
48 %install
49 cd cmake_tmp
50 %make_install
51 #mkdir -p %{buildroot}/usr/lib/
52 cp libtota.a %{buildroot}%{_libdir}/libtota.a
53 %post
54
55
56 %files
57 %defattr(-,root,root,-)
58 %license LICENSE.Apache-2.0
59 %license LICENSE.BSD-2-Clause
60 %license LICENSE.BSD-3-Clause
61 %{_libdir}/libtota.so.*
62 #%manifest fota.manifest
63
64 %files devel
65 %defattr(-,root,root,-)
66 %{_libdir}/libtota.so
67 %{_libdir}/libtota.a
68 %{_libdir}/pkgconfig/tota.pc
69 %{_includedir}/fota_common.h
70 %{_includedir}/fota_log.h
71 %{_includedir}/fota_tar.h
72 %{_includedir}/SS_Common.h
73 %{_includedir}/SS_Engine_Errors.h
74 %{_includedir}/SS_Engine_Update.h
75 %{_includedir}/SS_FSUpdate.h
76 %{_includedir}/SS_ImageUpdate.h
77 %{_includedir}/SS_MultiProcessUpdate.h
78 %{_includedir}/SS_Nand.h
79 %{_includedir}/SS_UPI.h
80
81 %files -n tota-bsdiff
82 %{_bindir}/ss_bsdiff
83 %{_bindir}/ss_bspatch