Support ogg loop playback
[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.10.94
4 Release:    0
5 Group:      System/Libraries
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source3:    sound-server.conf
9 Source4:    focus-server.service
10 Source5:    focus-server.path
11 Source6:    focus-server.conf
12 Requires: security-config
13 %if "%{?tizen_profile_name}" == "tv"
14 Source8:    focus-server-tv.service
15 %endif
16 Source9:    org.tizen.SoundServer.service
17 Requires(post): /sbin/ldconfig
18 Requires(postun): /sbin/ldconfig
19 BuildRequires: pkgconfig(mm-common)
20 BuildRequires: pkgconfig(mm-log)
21 BuildRequires: pkgconfig(mm-session)
22 BuildRequires: pkgconfig(glib-2.0)
23 BuildRequires: pkgconfig(gio-2.0)
24 BuildRequires: pkgconfig(vconf)
25 BuildRequires: pkgconfig(libpulse)
26 %if "%{?TIZEN_PRODUCT_TV}" == "1"
27 BuildRequires: pkgconfig(lwipc)
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 CFLAGS="%{optflags} -fvisibility=hidden -D_TIZEN_PUBLIC_ -DMM_DEBUG_FLAG -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\"" ;export CFLAGS
74
75 %if "%{?tizen_profile_name}" == "wearable"
76         CFLAGS+=" -DTIZEN_MICRO";export CFLAGS
77 %endif
78 %if "%{?tizen_profile_name}" == "tv"
79         CFLAGS+=" -DTIZEN_TV";export CFLAGS
80 %endif
81
82 ./autogen.sh
83 %configure \
84 %if 0%{?tizen_audio_feature_ogg_enable}
85        --enable-ogg \
86        --with-plugindir=%{_libdir}/soundplugins/ \
87 %endif
88 %if "%{?TIZEN_PRODUCT_TV}" == "1"
89        --enable-prelink \
90        --enable-lwipc \
91 %endif
92         --prefix=/usr --enable-pulse --enable-focus
93
94 make %{?_smp_mflags}
95
96 %install
97 rm -rf %{buildroot}
98 mkdir -p %{buildroot}/usr/share/license
99 cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
100 cp LICENSE.APLv2 %{buildroot}/usr/share/license/libmm-sound-tool
101 mkdir -p %{buildroot}/etc/dbus-1/system.d/
102 cp %{SOURCE3} %{buildroot}/etc/dbus-1/system.d/sound-server.conf
103 cp %{SOURCE6} %{buildroot}/etc/dbus-1/system.d/focus-server.conf
104 %if "%{?tizen_profile_name}" == "tv"
105 cp %{SOURCE8} %{SOURCE4}
106 %endif
107 mkdir -p %{buildroot}/usr/share/dbus-1/system-services/
108 cp %{SOURCE9} %{buildroot}/usr/share/dbus-1/system-services/org.tizen.SoundServer.service
109
110 %make_install
111 %if "%{?tizen_profile_name}" == "tv"
112 install -d %{buildroot}%{_unitdir}/sysinit.target.wants
113 %else
114 install -d %{buildroot}%{_unitdir}/multi-user.target.wants
115 %endif
116 install -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/
117 install -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/
118 %if "%{?tizen_profile_name}" == "tv"
119 ln -sf ../focus-server.path %{buildroot}%{_unitdir}/sysinit.target.wants/focus-server.path
120 %else
121 ln -sf ../focus-server.path %{buildroot}%{_unitdir}/multi-user.target.wants/focus-server.path
122 %endif
123 %post
124 /sbin/ldconfig
125
126 %postun -p /sbin/ldconfig
127
128
129 %files
130 %manifest libmm-sound.manifest
131 %defattr(-,root,root,-)
132 %caps(cap_chown,cap_fowner,cap_lease=eip) %{_bindir}/focus_server
133 %caps(cap_chown,cap_fowner,cap_lease=eip) %{_bindir}/sound_server
134 %{_libdir}/libmmfsound.so.*
135 %{_libdir}/libmmfsoundcommon.so.*
136 %{_libdir}/libmmfkeysound.so.*
137 %{_libdir}/libmmfbootsound.so.*
138 %{_libdir}/libsoundplugintone.so*
139 %{_libdir}/libsoundpluginwave.so*
140 %if 0%{?tizen_audio_feature_ogg_enable}
141 %{_libdir}/libsoundplugintremoloogg.so*
142 %endif
143 %{_libdir}/soundplugins/libsoundplugintone.so
144 %{_libdir}/soundplugins/libsoundpluginwave.so
145 %if 0%{?tizen_audio_feature_ogg_enable}
146 %{_libdir}/soundplugins/libsoundplugintremoloogg.so
147 %endif
148 %if "%{?tizen_profile_name}" == "tv"
149 %{_unitdir}/sysinit.target.wants/focus-server.path
150 %else
151 %{_unitdir}/multi-user.target.wants/focus-server.path
152 %endif
153 %{_unitdir}/focus-server.service
154 %{_unitdir}/focus-server.path
155 /usr/share/sounds/sound-server/*
156 %{_datadir}/license/%{name}
157 %{_datadir}/license/libmm-sound-tool
158 /etc/dbus-1/system.d/sound-server.conf
159 /etc/dbus-1/system.d/focus-server.conf
160 %{_datadir}/dbus-1/system-services/org.tizen.SoundServer.service
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_focus.h
175 %{_includedir}/mmf/mm_sound_device.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