mm_sound_server: Terminate the server when MMSoundThreadPoolRun() is failed
[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.12.51
4 Release:    0
5 Group:      System/Libraries
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source2:    sound-server.service
9 Source3:    sound-server.conf
10 Source4:    focus-server.service
11 Source5:    focus-server.path
12 Source6:    focus-server.conf
13 Requires: security-config
14 %if "%{tizen_profile_name}" == "tv"
15 Source7:    libmm-sound.notstrip
16 Source8:    focus-server-tv.service
17 %endif
18 Source9:    org.tizen.SoundServer.service
19 Requires(post): /sbin/ldconfig
20 Requires(postun): /sbin/ldconfig
21 BuildRequires: pkgconfig(mm-common)
22 BuildRequires: pkgconfig(glib-2.0)
23 BuildRequires: pkgconfig(gio-2.0)
24 BuildRequires: pkgconfig(vconf)
25 BuildRequires: pkgconfig(libpulse)
26 BuildRequires: pkgconfig(sndfile)
27 %if "%{tizen_profile_name}" == "tv"
28 BuildRequires: pkgconfig(lwipc)
29 %endif
30 %if 0%{?gtests:1}
31 BuildRequires:  pkgconfig(gmock)
32 %endif
33
34 %description
35 MMSound Package contains client lib and sound_server binary for sound system
36
37
38 %package devel
39 Summary: MMSound development package
40 Group:      Development/Libraries
41 Requires:   %{name} = %{version}-%{release}
42
43 %description devel
44 MMSound development package for sound system
45
46 %package sdk-devel
47 Summary: MMSound development package
48 Group:      Development/Libraries
49 Requires:   %{name}-devel = %{version}-%{release}
50
51 %description sdk-devel
52 MMSound development package for sound system
53
54 %package tool
55 Summary: MMSound utility package - contians mm_sound_testsuite, sound_check
56 Group:      TO_BE/FILLED_IN
57 Requires:   %{name} = %{version}-%{release}
58
59 %description tool
60 MMSound utility package - contians mm_sound_testsuite, sound_check for sound system
61
62 %prep
63 %setup -q
64
65 %build
66
67 CFLAGS="%{optflags} -fvisibility=hidden -D_TIZEN_PUBLIC_ -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\"" ;export CFLAGS
68
69 %if "%{tizen_profile_name}" == "tv"
70         CFLAGS+=" -DTIZEN_TV";export CFLAGS
71 %endif
72
73 ./autogen.sh
74 %configure \
75        --with-plugindir=%{_libdir}/soundplugins \
76 %if "%{tizen_profile_name}" == "tv"
77        --enable-prelink \
78        --enable-lwipc \
79 %endif
80 %if 0%{?gtests:1}
81        --enable-unittests \
82 %endif
83         --prefix=/usr --enable-pulse
84
85 make %{?_smp_mflags}
86
87 %install
88 rm -rf %{buildroot}
89 mkdir -p %{buildroot}/etc/dbus-1/system.d/
90 cp %{SOURCE3} %{buildroot}/etc/dbus-1/system.d/sound-server.conf
91 cp %{SOURCE6} %{buildroot}/etc/dbus-1/system.d/focus-server.conf
92 %if "%{tizen_profile_name}" == "tv"
93 cp %{SOURCE8} %{SOURCE4}
94 %endif
95 mkdir -p %{buildroot}/usr/share/dbus-1/system-services/
96 cp %{SOURCE9} %{buildroot}/usr/share/dbus-1/system-services/org.tizen.SoundServer.service
97
98 %make_install
99 %if "%{tizen_profile_name}" == "tv"
100 mkdir -p %{buildroot}%{_sysconfdir}/notstrip
101 install -m0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/notstrip/libmm-sound.notstrip
102 %endif
103 install -d %{buildroot}%{_unitdir}/paths.target.wants
104 install -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/
105 install -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/
106 install -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/
107 ln -sf ../focus-server.path %{buildroot}%{_unitdir}/paths.target.wants/focus-server.path
108 %post
109 /sbin/ldconfig
110
111 %postun -p /sbin/ldconfig
112
113
114 %files
115 %manifest libmm-sound.manifest
116 %defattr(-,root,root,-)
117 %{_bindir}/focus_server
118 %{_bindir}/sound_server
119 %{_libdir}/libmmfsound.so.*
120 %{_libdir}/libmmfsoundcommon.so.*
121 %{_libdir}/libmmfkeysound.so.*
122 %{_libdir}/libmmfbootsound.so.*
123 %{_libdir}/soundplugins/libsoundplugintone.so
124 %{_libdir}/soundplugins/libsoundpluginwave.so
125 %if 0%{?tizen_audio_feature_ogg_enable}
126 %{_libdir}/soundplugins/libsoundplugintremoloogg.so
127 %endif
128 %if "%{tizen_profile_name}" == "tv"
129 %{_sysconfdir}/notstrip/libmm-sound.notstrip
130 %endif
131 %{_unitdir}/paths.target.wants/focus-server.path
132 %{_unitdir}/focus-server.service
133 %{_unitdir}/focus-server.path
134 /usr/share/sounds/sound-server/*
135 %license LICENSE.APLv2
136 /etc/dbus-1/system.d/sound-server.conf
137 /etc/dbus-1/system.d/focus-server.conf
138 %{_datadir}/dbus-1/system-services/org.tizen.SoundServer.service
139 %{_unitdir}/sound-server.service
140 %if 0%{?gtests:1}
141 %{_bindir}/gtest-libmm-sound
142 %endif
143
144 %files devel
145 %defattr(-,root,root,-)
146 %{_libdir}/libmmfkeysound.so
147 %{_libdir}/libmmfbootsound.so
148 %{_libdir}/libmmfsound.so
149 %{_libdir}/libmmfsoundcommon.so
150 %{_includedir}/mmf/mm_sound_private.h
151 %exclude %{_includedir}/mmf/mm_sound_focus_socket.h
152 %exclude %{_includedir}/mmf/mm_sound_focus_private.h
153 %exclude %{_includedir}/mmf/mm_sound_pa_client.h
154
155 %files sdk-devel
156 %defattr(-,root,root,-)
157 %{_includedir}/mmf/mm_sound.h
158 %{_includedir}/mmf/mm_sound_focus.h
159 %{_includedir}/mmf/mm_sound_device.h
160 %exclude %{_includedir}/mmf/mm_sound_focus_socket.h
161 %exclude %{_includedir}/mmf/mm_sound_focus_private.h
162 %exclude %{_includedir}/mmf/mm_sound_pa_client.h
163 %{_libdir}/pkgconfig/mm-keysound.pc
164 %{_libdir}/pkgconfig/mm-bootsound.pc
165 %{_libdir}/pkgconfig/mm-sound.pc
166
167 %files tool
168 %manifest libmm-sound-tool.manifest
169 %defattr(-,root,root,-)
170 %{_bindir}/mm_sound_testsuite
171 %license LICENSE.APLv2