b7d7850ae3a8f1f74051fe4265e42832155c1004
[platform/core/api/wav-player.git] / packaging / capi-media-wav-player.spec
1 Name:       capi-media-wav-player
2 Summary:    A wav player library in Tizen C API
3 Version:    0.3.7
4 Release:    0
5 Group:      Multimedia/API
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001:     capi-media-wav-player.manifest
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(dlog)
11 BuildRequires:  pkgconfig(capi-base-common)
12 BuildRequires:  pkgconfig(capi-media-sound-manager)
13 BuildRequires:  pkgconfig(gio-2.0)
14
15 %description
16 A wav player library in Tizen C API.
17
18 %package devel
19 Summary:  A wav player library in Tizen C API (Development)
20 Group:    Development/Multimedia
21 Requires: %{name} = %{version}-%{release}
22
23 %description devel
24 %devel_desc
25
26 %if 0%{?gcov:1}
27 %package gcov
28 Summary: Line Coverage files
29 Group: Development/Multimedia
30
31 %description gcov
32 Collection of files related to line coverage using gcov.
33 %endif
34
35 %prep
36 %setup -q
37 cp %{SOURCE1001} .
38
39 %build
40 %if 0%{?gcov:1}
41 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
42 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
43 export LDFLAGS+=" -lgcov"
44 %endif
45
46 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
47 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
48 %if "%{tizen_profile_name}" != "tv"
49     -DTIZEN_FEATURE_TESTSUITE=On
50 %else
51     -DTIZEN_FEATURE_TESTSUITE=Off
52 %endif
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 %make_install
62
63 %if 0%{?gcov:1}
64 mkdir -p %{buildroot}%{_datadir}/gcov/obj/%{name}
65 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj/%{name}
66 %endif
67
68 %post -p /sbin/ldconfig
69
70 %postun -p /sbin/ldconfig
71
72 %files
73 %manifest %{name}.manifest
74 %license LICENSE.APLv2
75 %{_libdir}/libcapi-media-wav-player.so.*
76 %if "%{tizen_profile_name}" != "tv"
77 %{_bindir}/wav_player_test
78 %endif
79
80 %files devel
81 %manifest %{name}.manifest
82 %{_includedir}/media/*.h
83 %{_libdir}/pkgconfig/*.pc
84 %{_libdir}/libcapi-media-wav-player.so
85
86 %if 0%{?gcov:1}
87 %files gcov
88 %{_datadir}/gcov/obj/*
89 %endif