98316a5d7aa4a92ca4375349a75b04adb58cc246
[platform/core/api/mediastreamrecorder.git] / packaging / capi-media-streamrecorder.spec
1 Name:       capi-media-streamrecorder
2 Summary:    A Streamrecorder library in Tizen Native API
3 Version:    0.0.32
4 Release:    0
5 Group:      Multimedia/Other
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 BuildRequires:  cmake
9 BuildRequires:  pkgconfig(dlog)
10 Buildrequires:  pkgconfig(mm-streamrecorder)
11 BuildRequires:  pkgconfig(capi-base-common)
12 BuildRequires:  pkgconfig(capi-media-tool)
13 BuildRequires:  pkgconfig(capi-system-info)
14 BuildRequires:  pkgconfig(libtbm)
15 Requires(post): /sbin/ldconfig
16 Requires(postun): /sbin/ldconfig
17
18 %description
19 A StreamRecorder library in Tizen Native API to record live buffer sent by the application
20
21
22 %package devel
23 Summary:  A StreamRecorder library in Tizen Native API (Development)
24 Requires: %{name} = %{version}-%{release}
25
26
27 %description devel
28 A MediaStreamRecorder library in Tizen Native API Development Package to record live buffer
29
30 %if 0%{?gcov:1}
31 %package gcov
32 Summary: Line Coverage of Stream Recorder library in Tizen C API
33 Group: Development/Multimedia
34
35 %description gcov
36 Collection of files related to Line Coverage. It is teseted as gcov for a stream recorder library in Tizen native API
37 %endif
38
39 %prep
40 %setup -q
41
42
43 %build
44 %if 0%{?gcov:1}
45 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
46 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
47 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
48 export LDFLAGS+=" -lgcov"
49 %endif
50
51 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
52 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
53
54
55 make %{?jobs:-j%jobs}
56
57 %if 0%{?gcov:1}
58 mkdir -p gcov-obj
59 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
60 %endif
61
62 %install
63 rm -rf %{buildroot}
64 %make_install
65
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 -p /sbin/ldconfig
72
73
74 %postun -p /sbin/ldconfig
75
76 %files
77 %manifest capi-media-streamrecorder.manifest
78 %license LICENSE.APLv2
79 %{_libdir}/libcapi-media-streamrecorder.so.*
80 %{_bindir}/*
81
82 %files devel
83 %{_includedir}/media/streamrecorder.h
84 %{_libdir}/pkgconfig/*.pc
85 %{_libdir}/libcapi-media-streamrecorder.so
86
87 %if 0%{?gcov:1}
88 %files gcov
89 %{_datadir}/gcov/obj/*
90 %endif