Add new custom error of Generic Text Classifier
[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.54
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 %if 0%{?gcov:1}
56 mkdir -p gcov-obj
57 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
58 %endif
59
60 %install
61 rm -rf %{buildroot}
62 %make_install
63
64 %if 0%{?gcov:1}
65 mkdir -p %{buildroot}%{_datadir}/gcov/obj
66 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
67 %endif
68
69 %post -p /sbin/ldconfig
70
71 %postun -p /sbin/ldconfig
72
73
74 %files
75 %manifest %{name}.manifest
76 %{_libdir}/libcapi-base-common.so.*
77 %license LICENSE
78
79 %files devel
80 %{_includedir}/*.h
81 %{_libdir}/pkgconfig/capi-base-common.pc
82 %{_libdir}/libcapi-base-common.so
83
84 %if 0%{?gcov:1}
85 %files gcov
86 %{_datadir}/gcov/obj/*
87 %endif