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