23ded05d2d0376fbb3284d22808a9e0ed078b0d3
[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.7.2b
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 Source1001:     libmm-sound.manifest
11 Requires(post): /sbin/ldconfig
12 Requires(post): /usr/bin/vconftool
13 Requires(postun): /sbin/ldconfig
14 BuildRequires: pkgconfig(mm-common)
15 BuildRequires: pkgconfig(avsystem)
16 BuildRequires: pkgconfig(mm-log)
17 BuildRequires: pkgconfig(mm-session)
18 BuildRequires: pkgconfig(audio-session-mgr)
19 BuildRequires: pkgconfig(sysman)
20 BuildRequires: pkgconfig(glib-2.0)
21 BuildRequires: pkgconfig(vconf)
22 BuildRequires: pkgconfig(heynoti)
23 BuildRequires: pkgconfig(security-server)
24
25 %description
26 MMSound Package contains client lib and sound_server binary for sound system
27
28
29 %package devel
30 Summary: MMSound development package
31 Group:      Development/Libraries
32 Requires:   %{name} = %{version}-%{release}
33
34 %description devel
35 MMSound development package for sound system
36
37 %package sdk-devel
38 Summary: MMSound development package
39 Group:      Development/Libraries
40 Requires:   %{name}-devel = %{version}-%{release}
41
42 %description sdk-devel
43 MMSound development package for sound system
44
45 %package tool
46 Summary: MMSound utility package - contians mm_sound_testsuite, sound_check
47 Group:      TO_BE/FILLED_IN
48 Requires:   %{name} = %{version}-%{release}
49
50 %description tool
51 MMSound utility package - contians mm_sound_testsuite, sound_check for sound system
52
53
54
55 %prep
56 %setup -q
57 cp %{SOURCE1001} .
58
59
60 %build
61 ./autogen.sh
62 %ifarch %{arm}
63 CFLAGS="%{optflags} -fvisibility=hidden -DMM_DEBUG_FLAG -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\""; export CFLAGS
64 %else
65 %if 0%{?simulator}
66 CFLAGS="%{optflags} -fvisibility=hidden -DMM_DEBUG_FLAG -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\""; export CFLAGS
67 %else
68 CFLAGS="%{optflags} -fvisibility=hidden -DMM_DEBUG_FLAG -DSEPARATE_SPEAKER_AND_WIRED_ACCESSORY -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\""; export CFLAGS
69 %endif
70 %endif
71 %if 0%{?enable_murphy}
72 CFLAGS=$CFLAGS" -DMURPHY"; export CFLAGS
73 %endif
74 %configure --prefix=/usr --enable-pulse --enable-security
75 make %{?_smp_mflags}
76
77 %install
78 %make_install
79 install -d %{buildroot}/usr/lib/systemd/system/multi-user.target.wants
80 install -m0644 %{SOURCE1} %{buildroot}/usr/lib/systemd/system/
81 install -m0644 %{SOURCE2} %{buildroot}/usr/lib/systemd/system/
82 ln -sf ../sound-server.path %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/sound-server.path
83
84 # FIXME: remove after systemd is in
85 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d
86 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc4.d
87 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d
88 ln -s %{_sysconfdir}/rc.d/init.d/soundserver %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S23soundserver
89 ln -s %{_sysconfdir}/rc.d/init.d/soundserver %{buildroot}%{_sysconfdir}/rc.d/rc4.d/S23soundserver
90
91
92
93 %post
94 /sbin/ldconfig
95
96 /usr/bin/vconftool set -t int memory/Sound/ASMReady 0 -g 29 -f -i
97
98 /usr/bin/vconftool set -t int file/private/sound/volume/system 5 -g 29 -f
99 /usr/bin/vconftool set -t int file/private/sound/volume/notification 7 -g 29 -f
100 /usr/bin/vconftool set -t int file/private/sound/volume/alarm 7 -g 29 -f
101 /usr/bin/vconftool set -t int file/private/sound/volume/ringtone 13 -g 29 -f
102 /usr/bin/vconftool set -t int file/private/sound/volume/media 7 -g 29 -f
103 /usr/bin/vconftool set -t int file/private/sound/volume/call 7 -g 29 -f
104 /usr/bin/vconftool set -t int file/private/sound/volume/voip 7 -g 29 -f
105 /usr/bin/vconftool set -t int file/private/sound/volume/fixed 0 -g 29 -f
106 /usr/bin/vconftool set -t int file/private/sound/volume/java 11 -g 29 -f
107
108 %postun -p /sbin/ldconfig
109
110
111 %files
112 %manifest %{name}.manifest
113 %defattr(-,root,root,-)
114 %{_bindir}/sound_server
115 %{_libdir}/libmmfsound.so.*
116 %{_libdir}/libmmfsoundcommon.so.*
117 %{_libdir}/libmmfkeysound.so.*
118 %{_libdir}/libsoundplugintone.so*
119 %{_libdir}/libsoundpluginwave.so*
120 %{_libdir}/libsoundpluginkeytone.so*
121 %{_libdir}/soundplugins/libsoundplugintone.so
122 %{_libdir}/soundplugins/libsoundpluginwave.so
123 %{_libdir}/soundplugins/libsoundpluginkeytone.so
124 %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/soundserver
125 %{_sysconfdir}/rc.d/rc3.d/S23soundserver
126 %{_sysconfdir}/rc.d/rc4.d/S23soundserver
127 /usr/share/sounds/sound-server/*
128 /usr/lib/systemd/system/multi-user.target.wants/sound-server.path
129 /usr/lib/systemd/system/sound-server.service
130 /usr/lib/systemd/system/sound-server.path
131
132 %files devel
133 %manifest %{name}.manifest
134 %defattr(-,root,root,-)
135 %{_libdir}/libmmfkeysound.so
136 %{_libdir}/libmmfsound.so
137 %{_libdir}/libmmfsoundcommon.so
138 %{_includedir}/mmf/mm_sound_private.h
139 %{_includedir}/mmf/mm_sound_plugin.h
140 %{_includedir}/mmf/mm_sound_plugin_hal.h
141
142
143 %files sdk-devel
144 %manifest %{name}.manifest
145 %defattr(-,root,root,-)
146 %{_includedir}/mmf/mm_sound.h
147 %{_libdir}/pkgconfig/mm-keysound.pc
148 %{_libdir}/pkgconfig/mm-sound.pc
149
150 %files tool
151 %manifest %{name}.manifest
152 %defattr(-,root,root,-)
153 %{_bindir}/mm_sound_testsuite