Fix SVACE defect
[platform/core/api/sound-manager.git] / packaging / capi-media-sound-manager.spec
1 Name:       capi-media-sound-manager
2 Summary:    Sound Manager library
3 Version:    0.3.101
4 Release:    0
5 Group:      Multimedia/API
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001:     capi-media-sound-manager.manifest
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(dlog)
11 BuildRequires:  pkgconfig(mm-sound)
12 BuildRequires:  pkgconfig(mm-session)
13 BuildRequires:  pkgconfig(capi-base-common)
14 BuildRequires:  pkgconfig(vconf)
15 BuildRequires:  pkgconfig(libpulse)
16 BuildRequires:  pkgconfig(gio-2.0)
17 BuildRequires:  pkgconfig(capi-system-info)
18 Requires(post): /sbin/ldconfig
19 Requires(postun): /sbin/ldconfig
20
21 %description
22 A Sound Manager library in Tizen C API
23
24 %package devel
25 Summary:  Sound Manager library (Development)
26 Group:    Multimedia/Development
27 Requires: %{name} = %{version}-%{release}
28
29 %description devel
30 A Sound Manager library in Tizen C API (DEV)
31
32 %devel_desc
33
34 %prep
35 %setup -q
36 cp %{SOURCE1001} .
37
38 %if "%{?TIZEN_PRODUCT_TV}" == "1"
39 echo "tizen_product_tv"
40 mv include/sound_manager_internal_tv.h include/sound_manager_internal.h
41 %else
42 rm include/sound_manager_internal_tv.h
43 %endif
44
45 %build
46 %if "%{?TIZEN_PRODUCT_TV}" == "1"
47 export CFLAGS+=" -DTIZEN_FEATURE_TV_PROD"
48 %endif
49
50 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
51 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
52 %if "%{TIZEN_PRODUCT_TV}" != "1"
53     -DTIZEN_FEATURE_TESTSUITE=On
54 %else
55     -DTIZEN_FEATURE_TESTSUITE=Off
56 %endif
57 %__make %{?jobs:-j%jobs}
58
59 %install
60 rm -rf %{buildroot}
61 mkdir -p %{buildroot}/usr/share/license
62 cp LICENSE %{buildroot}/usr/share/license/%{name}
63
64 %make_install
65
66 %post
67 /sbin/ldconfig
68
69 %postun -p /sbin/ldconfig
70
71
72 %files
73 %manifest %{name}.manifest
74 %{_libdir}/libcapi-media-sound-manager.so.*
75 %{_datadir}/license/%{name}
76 %if "%{TIZEN_PRODUCT_TV}" != "1"
77 %{_bindir}/sound_manager_test
78 %endif
79
80 %files devel
81 %manifest %{name}.manifest
82 %{_includedir}/media/sound_manager.h
83 %{_includedir}/media/sound_manager_internal.h
84 %{_libdir}/pkgconfig/*.pc
85 %{_libdir}/libcapi-media-sound-manager.so