spec: Change gcov object installation
[platform/core/api/sound-pool.git] / packaging / capi-media-sound-pool.spec
1 Name:       capi-media-sound-pool
2 Version:    0.0.23
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 %install
56 rm -rf %{buildroot}
57
58 %make_install
59
60 %if 0%{?gcov:1}
61 builddir=$(basename $PWD)
62 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
63 mkdir -p "$gcno_obj_dir"
64 find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
65 %endif
66
67 %post -p /sbin/ldconfig
68 %postun -p /sbin/ldconfig
69
70 %files
71 %manifest %{name}.manifest
72 %license LICENSE.APLv2
73 %{_libdir}/lib%{name}.so.*
74 %{_bindir}/*
75
76 %files devel
77 %manifest %{name}.manifest
78 %{_includedir}/media/*.h
79 %{_libdir}/pkgconfig/*.pc
80 %{_libdir}/lib%{name}.so
81
82 %if 0%{?gcov:1}
83 %files gcov
84 %{_datadir}/gcov/obj/*
85 %endif