Revise some testsuite code
[platform/core/api/video-util.git] / packaging / capi-media-video-util.spec
1 Name:       capi-media-video-util
2 Summary:    A Video Utility library in Tizen Native API
3 Version:    0.1.16
4 Release:    0
5 Group:      System/Libraries
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001: capi-media-video-util.manifest
9 BuildRequires:  pkgconfig(dlog)
10 BuildRequires:  pkgconfig(mm-common)
11 BuildRequires:  pkgconfig(mm-transcode)
12 BuildRequires:  pkgconfig(capi-base-common)
13 BuildRequires:  pkgconfig(capi-system-info)
14
15 BuildRequires:  cmake
16 BuildRequires:  gettext-devel
17
18 %description
19 A Video Utility library in Tizen Native API
20
21 %package devel
22 Summary:    A Video Utility library in Tizen Native API (Developement)
23 Group:      TO_BE_FILLED
24 Requires:   %{name} = %{version}-%{release}
25 Requires:  pkgconfig(dlog)
26 Requires:  pkgconfig(mm-common)
27 Requires:  pkgconfig(mm-transcode)
28 Requires:  pkgconfig(capi-base-common)
29
30 %description devel
31 A Video Utility library in Tizen Native API (Developement)
32
33 %if 0%{?gcov:1}
34 %package gcov
35 Summary: Line Coverage of Video Utility library in Tizen C API
36 Group: Development/Multimedia
37
38 %description gcov
39 Collection of files related to Line Coverage. It is tested as gcov for a video utility library in Tizen native API
40 %endif
41
42 %prep
43 %setup -q
44 cp %{SOURCE1001} .
45
46 %build
47 %if 0%{?gcov:1}
48 export CFLAGS+=" -DTIZEN_EXCLUDE_COVERAGE -fprofile-arcs -ftest-coverage"
49 export CXXFLAGS+=" -DTIZEN_EXCLUDE_COVERAG -fprofile-arcs -ftest-coverage"
50 export FFLAGS+=" -DTIZEN_EXCLUDE_COVERAGE -fprofile-arcs -ftest-coverage"
51 export LDFLAGS+=" -lgcov"
52 %endif
53
54 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
55 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
56 make %{?jobs:-j%jobs}
57 %if 0%{?gcov:1}
58 mkdir -p gcov-obj
59 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
60 %endif
61
62 %install
63 %make_install
64 mkdir -p %{buildroot}%{_bindir}
65 cp test/video_util_test %{buildroot}%{_bindir}
66 %if 0%{?gcov:1}
67 mkdir -p %{buildroot}%{_datadir}/gcov/obj
68 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
69 %endif
70
71 %post
72
73 %postun
74
75 %files
76 %manifest %{name}.manifest
77 %{_libdir}/lib*.so.*
78 %license LICENSE.Apache-2.0
79 %{_bindir}/*
80
81 %files devel
82 %manifest %{name}.manifest
83 %{_libdir}/lib*.so
84 %{_libdir}/pkgconfig/*.pc
85 %{_includedir}/media/*.h
86
87 %if 0%{?gcov:1}
88 %files gcov
89 %{_datadir}/gcov/obj/*
90 %endif