Change gcov object install path
[platform/core/api/sound-pool.git] / packaging / capi-media-sound-pool.spec
1 Name:       capi-media-sound-pool
2 Version:    0.0.22
3 Summary:    Tizen Sound Pool module
4 Release:    0
5 Group:      Multimedia/Framework
6 License:    Apache-2.0
7 URL:        http://source.tizen.org
8 Source0:    %{name}-%{version}.tar.gz
9 Source1001:    %{name}.manifest
10 BuildRequires: cmake
11 BuildRequires: pkgconfig(dlog)
12 BuildRequires: pkgconfig(glib-2.0)
13 BuildRequires: pkgconfig(openal)
14 #BuildRequires: pkgconfig(freealut)
15 BuildRequires: pkgconfig(alure)
16
17 %description
18 Tizen Sound Pool Module allowing sounds playing for audio resources.
19
20 %package devel
21 Summary:    Tizen Module allowing sounds playing for audio resources (Development)
22 Group:      Multimedia/Framework
23 Requires:   %{name} = %{version}-%{release}
24
25 %description devel
26 SoundPool Library in Tizen Native API (DEV).
27
28 %if 0%{?gcov:1}
29 %package gcov
30 Summary: Line Coverage files
31 Group: Development/Multimedia
32
33 %description gcov
34 Collection of files related to line coverage using gcov.
35 %endif
36
37 %prep
38 %setup -q
39 cp %{SOURCE1001} .
40
41 %build
42 export ENABLE_ALURE=1
43
44 %if 0%{?gcov:1}
45 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
46 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
47 export LDFLAGS+=" -lgcov"
48 %endif
49
50 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
51 %cmake . -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
63 %make_install
64
65 %if 0%{?gcov:1}
66 mkdir -p %{buildroot}%{_datadir}/gcov/obj/%{name}
67 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj/%{name}
68 %endif
69
70 %post -p /sbin/ldconfig
71 %postun -p /sbin/ldconfig
72
73 %files
74 %manifest %{name}.manifest
75 %license LICENSE.APLv2
76 %{_libdir}/lib%{name}.so.*
77 %{_bindir}/*
78
79 %files devel
80 %manifest %{name}.manifest
81 %{_includedir}/media/*.h
82 %{_libdir}/pkgconfig/*.pc
83 %{_libdir}/lib%{name}.so
84
85 %if 0%{?gcov:1}
86 %files gcov
87 %{_datadir}/gcov/obj/*
88 %endif