[ACR-1843] Add Web Authentication error codes
[platform/core/api/common.git] / packaging / capi-base-common.spec
1 Name:       capi-base-common
2 Summary:    Common header files of Tizen Native API
3 Version:    0.4.80
4 Release:    1
5 Group:      Base
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8
9 BuildRequires: cmake
10 %if 0%{?gcov:1}
11 BuildRequires: lcov
12 %endif
13
14 Requires(post): /sbin/ldconfig
15 Requires(postun): /sbin/ldconfig
16
17 %description
18 Common header files of Tizen Native API
19
20 %package devel
21 License:  Apache-2.0
22 Summary:  Common header files of Tizen Native API (Development)
23 Group:    Base
24 Requires: %{name} = %{version}-%{release}
25
26 %description devel
27 Common header files of Tizen Native API
28
29 %if 0%{?gcov:1}
30 %package gcov
31 Summary:    Common header files of Tizen Native API (gcov)
32 Group:      Base
33 %description gcov
34 Common header files of Tizen Native API gcov objects
35 %endif
36
37 %prep
38 %setup -q
39
40 %build
41 %if 0%{?gcov:1}
42 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
43 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
44 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
45 export LDFLAGS+=" -lgcov"
46 %endif
47
48 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
49
50 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR:PATH=%{_libdir} -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \
51 -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
52
53 make %{?jobs:-j%jobs}
54
55 %install
56 rm -rf %{buildroot}
57 %make_install
58
59 %if 0%{?gcov:1}
60 builddir=$(basename $PWD)
61 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
62 mkdir -p "$gcno_obj_dir"
63 find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
64 %endif
65
66 %post -p /sbin/ldconfig
67
68 %postun -p /sbin/ldconfig
69
70
71 %files
72 %manifest %{name}.manifest
73 %{_libdir}/libcapi-base-common.so.*
74 %license LICENSE
75
76 %files devel
77 %{_includedir}/*.h
78 %{_libdir}/pkgconfig/capi-base-common.pc
79 %{_libdir}/libcapi-base-common.so
80
81 %if 0%{?gcov:1}
82 %files gcov
83 %{_datadir}/gcov/obj/*
84 %endif