Remove useless codes for making pipe and reading pipe in keytone plugin
[platform/core/multimedia/libmm-sound.git] / packaging / libmm-sound.spec
1 Name:       libmm-sound
2 Summary:    MMSound Package contains client lib and sound_server binary
3 Version:    0.9.254
4 Release:    0
5 Group:      System/Libraries
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1:    sound-server.service
9 Source2:    sound-server.path
10 Source3:    sound-server.conf
11 Source4:    focus-server.service
12 Source5:    focus-server.path
13 Source6:    focus-server.conf
14 Requires(post): /sbin/ldconfig
15 Requires(post): /usr/bin/vconftool
16 Requires(postun): /sbin/ldconfig
17 BuildRequires: pkgconfig(mm-common)
18 BuildRequires: pkgconfig(mm-log)
19 BuildRequires: pkgconfig(mm-session)
20 BuildRequires: pkgconfig(audio-session-mgr)
21 BuildRequires: pkgconfig(glib-2.0)
22 BuildRequires: pkgconfig(gio-2.0)
23 BuildRequires: pkgconfig(vconf)
24 BuildRequires: pkgconfig(libpulse)
25 BuildRequires: pkgconfig(iniparser)
26 %if "%{?tizen_profile_name}" != "tv"
27 BuildRequires: pkgconfig(capi-network-bluetooth)
28 %endif
29 %ifarch %{arm}
30 %endif
31 BuildRequires: pkgconfig(libtremolo)
32
33 %description
34 MMSound Package contains client lib and sound_server binary for sound system
35
36
37 %package devel
38 Summary: MMSound development package
39 Group:      Development/Libraries
40 Requires:   %{name} = %{version}-%{release}
41
42 %description devel
43 MMSound development package for sound system
44
45 %package sdk-devel
46 Summary: MMSound development package
47 Group:      Development/Libraries
48 Requires:   %{name}-devel = %{version}-%{release}
49
50 %description sdk-devel
51 MMSound development package for sound system
52
53 %package tool
54 Summary: MMSound utility package - contians mm_sound_testsuite, sound_check
55 Group:      TO_BE/FILLED_IN
56 Requires:   %{name} = %{version}-%{release}
57
58 %description tool
59 MMSound utility package - contians mm_sound_testsuite, sound_check for sound system
60
61 %prep
62 %setup -q
63
64 %build
65 %define tizen_audio_feature_ogg_enable 1
66
67 %if "%{?tizen_profile_name}" == "tv"
68 %define tizen_audio_feature_bluetooth_enable 0
69 %else
70 %define tizen_audio_feature_bluetooth_enable 1
71 %endif
72
73 %ifarch %{arm}
74         CFLAGS="%{optflags} -fvisibility=hidden -DSUPPORT_CONTAINER -D_TIZEN_PUBLIC_ -DUSE_FOCUS -DMM_DEBUG_FLAG -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\"" ;export CFLAGS
75 %else
76         CFLAGS="%{optflags} -fvisibility=hidden -DSUPPORT_CONTAINER -D_TIZEN_PUBLIC_ -DUSE_FOCUS -DMM_DEBUG_FLAG -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\"" ;export CFLAGS
77 %endif
78
79 %if "%{?tizen_profile_name}" == "wearable"
80         CFLAGS+=" -DTIZEN_MICRO";export CFLAGS
81 %endif
82 %if "%{?tizen_profile_name}" == "tv"
83         CFLAGS+=" -DTIZEN_TV";export CFLAGS
84 %endif
85
86 ./autogen.sh
87 %configure \
88 %if 0%{?tizen_audio_feature_ogg_enable}
89        --enable-ogg \
90        --with-plugindir=%{_libdir}/soundplugins/ \
91 %endif
92 %ifarch %{arm}
93         --prefix=/usr --enable-pulse --enable-focus --disable-security
94 %else
95         --prefix=/usr --enable-pulse --enable-focus --disable-security
96 %endif
97
98 make %{?_smp_mflags}
99
100 %install
101 rm -rf %{buildroot}
102 mkdir -p %{buildroot}/usr/share/license
103 cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
104 cp LICENSE.APLv2 %{buildroot}/usr/share/license/libmm-sound-tool
105 mkdir -p %{buildroot}/opt/etc/dump.d/module.d/
106 cp dump_audio.sh %{buildroot}/opt/etc/dump.d/module.d/dump_audio.sh
107 mkdir -p %{buildroot}/etc/dbus-1/system.d/
108 cp %{SOURCE3} %{buildroot}/etc/dbus-1/system.d/sound-server.conf
109 cp %{SOURCE6} %{buildroot}/etc/dbus-1/system.d/focus-server.conf
110
111 %make_install
112 install -d %{buildroot}%{_unitdir}/multi-user.target.wants
113 install -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/
114 install -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/
115 install -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/
116 install -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/
117 ln -sf ../sound-server.path %{buildroot}%{_unitdir}/multi-user.target.wants/sound-server.path
118 ln -sf ../focus-server.path %{buildroot}%{_unitdir}/multi-user.target.wants/focus-server.path
119
120 %post
121 /sbin/ldconfig
122
123 %postun -p /sbin/ldconfig
124
125
126 %files
127 %manifest libmm-sound.manifest
128 %defattr(-,root,root,-)
129 %caps(cap_chown,cap_dac_override,cap_fowner,cap_mac_override,cap_lease=eip) %{_bindir}/sound_server
130 %caps(cap_chown,cap_dac_override,cap_fowner,cap_mac_override,cap_lease=eip) %{_bindir}/focus_server
131 %{_bindir}/focus_server
132 %{_libdir}/libmmfsound.so.*
133 %{_libdir}/libmmfsoundcommon.so.*
134 %{_libdir}/libmmfkeysound.so.*
135 %{_libdir}/libmmfbootsound.so.*
136 %{_libdir}/libsoundplugintone.so*
137 %{_libdir}/libsoundpluginwave.so*
138 %{_libdir}/libsoundpluginkeytone.so*
139 %if 0%{?tizen_audio_feature_ogg_enable}
140 %{_libdir}/libsoundplugintremoloogg.so*
141 %endif
142 %{_libdir}/soundplugins/libsoundplugintone.so
143 %{_libdir}/soundplugins/libsoundpluginwave.so
144 %{_libdir}/soundplugins/libsoundpluginkeytone.so
145 %if 0%{?tizen_audio_feature_ogg_enable}
146 %{_libdir}/soundplugins/libsoundplugintremoloogg.so
147 %endif
148 %{_unitdir}/multi-user.target.wants/sound-server.path
149 %{_unitdir}/multi-user.target.wants/focus-server.path
150 %{_unitdir}/sound-server.service
151 %{_unitdir}/sound-server.path
152 %{_unitdir}/focus-server.service
153 %{_unitdir}/focus-server.path
154 /usr/share/sounds/sound-server/*
155 %{_datadir}/license/%{name}
156 %{_datadir}/license/libmm-sound-tool
157 /usr/share/sounds/sound-server/*
158 /opt/etc/dump.d/module.d/dump_audio.sh
159 /etc/dbus-1/system.d/sound-server.conf
160 /etc/dbus-1/system.d/focus-server.conf
161
162 %files devel
163 %defattr(-,root,root,-)
164 %{_libdir}/libmmfkeysound.so
165 %{_libdir}/libmmfbootsound.so
166 %{_libdir}/libmmfsound.so
167 %{_libdir}/libmmfsoundcommon.so
168 %{_includedir}/mmf/mm_sound_private.h
169 %exclude %{_includedir}/mmf/mm_sound_pa_client.h
170
171 %files sdk-devel
172 %defattr(-,root,root,-)
173 %{_includedir}/mmf/mm_sound.h
174 %{_includedir}/mmf/mm_sound_pcm_async.h
175 %{_includedir}/mmf/mm_sound_focus.h
176 %exclude %{_includedir}/mmf/mm_sound_pa_client.h
177 %{_libdir}/pkgconfig/mm-keysound.pc
178 %{_libdir}/pkgconfig/mm-bootsound.pc
179 %{_libdir}/pkgconfig/mm-sound.pc
180
181 %files tool
182 %manifest libmm-sound-tool.manifest
183 %defattr(-,root,root,-)
184 %{_bindir}/mm_sound_testsuite