summaryrefslogtreecommitdiff
path: root/packaging/libmm-sound.spec
blob: 6a2f59a95fad8c58c66266659d3e7f8e0e0ee3db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
Name:       libmm-sound
Summary:    MMSound Package contains client lib and sound_server binary
Version:    0.4.1
Release:    1
Group:      TO_BE/FILLED_IN
License:    LGPL
Source0:    %{name}-%{version}.tar.gz
Requires(pre): /bin/pidof
Requires(post): /sbin/ldconfig
Requires(post): /usr/bin/vconftool
Requires(postun): /sbin/ldconfig
BuildRequires: vconf-keys-devel
BuildRequires: pkgconfig(mm-common)
BuildRequires: pkgconfig(avsystem)
BuildRequires: pkgconfig(mm-log)
BuildRequires: pkgconfig(mm-session)
BuildRequires: pkgconfig(audio-session-mgr)
BuildRequires: pkgconfig(sysman)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(heynoti)


%description
MMSound Package contains client lib and sound_server binary for sound system


%package devel
Summary: MMSound development package
Group:      Development/Libraries
Requires:   %{name} = %{version}-%{release}

%description devel
MMSound development package for sound system

%package sdk-devel
Summary: MMSound development package
Group:      Development/Libraries
Requires:   %{name}-devel = %{version}-%{release}

%description sdk-devel
MMSound development package for sound system

%package tool
Summary: MMSound utility package - contians mm_sound_testsuite, sound_check
Group:      TO_BE/FILLED_IN
Requires:   %{name} = %{version}-%{release}

%description tool
MMSound utility package - contians mm_sound_testsuite, sound_check for sound system



%prep
%setup -q


%build
./autogen.sh
CFLAGS="%{optflags} -fvisibility=hidden -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\""; export CFLAGS
%configure --prefix=/usr --enable-sdk --enable-pulse

make %{?jobs:-j%jobs}

%install
rm -rf %{buildroot}
%make_install


mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc4.d
ln -s %{_sysconfdir}/init.d/soundserver %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S40soundserver
ln -s %{_sysconfdir}/init.d/soundserver %{buildroot}%{_sysconfdir}/rc.d/rc4.d/S40soundserver

%pre
#PID=`/bin/pidof sound_server`
#if [ -n "$PID" ]; then
#    echo "preinst: kill current sound server"
#    /usr/bin/killall -9 sound_server
#fi


%post
/sbin/ldconfig
/usr/bin/vconftool set -t int db/volume/system 5 -g 29
/usr/bin/vconftool set -t int db/volume/notification 7 -g 29
/usr/bin/vconftool set -t int db/volume/alarm 6 -g 29
/usr/bin/vconftool set -t int db/volume/ringtone 13 -g 29
/usr/bin/vconftool set -t int db/volume/media 7 -g 29
/usr/bin/vconftool set -t int db/volume/call 7 -g 29
/usr/bin/vconftool set -t int db/volume/fixed 0 -g 29
/usr/bin/vconftool set -t int db/volume/java 11 -g 29
/usr/bin/vconftool set -t int memory/Sound/RoutePolicy 0 -i -g 29

if [ -n "`env|grep SBOX`" ]; then
    echo "postinst: sbox installation skip lauching daemon"
else
        echo "postinst: run sound server again"
        /usr/bin/sound_server -S&
fi

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%{_bindir}/sound_server
%{_libdir}/libmmfsound.so.*
%{_libdir}/libsoundplugindtmf.so.*
%{_libdir}/libmmfsoundcommon.so.*
%{_libdir}/libsoundpluginwave.so.*
%{_libdir}/libsoundpluginkeytone.so.*
%{_libdir}/libmmfkeysound.so.*
%{_libdir}/libsoundpluginheadset.so.*
%{_libdir}/soundplugins/libsoundpluginkdtmf.so
%{_libdir}/soundplugins/libsoundpluginheadset.so
%{_libdir}/soundplugins/libsoundpluginwave.so
%{_libdir}/soundplugins/libsoundpluginkeytone.so
%{_sysconfdir}/rc.d/init.d/soundserver
%{_sysconfdir}/rc.d/rc3.d/S40soundserver
%{_sysconfdir}/rc.d/rc4.d/S40soundserver
/opt/system/dtmf_all.raw

%files devel
%defattr(-,root,root,-)
%{_libdir}/libmmfkeysound.so
%{_libdir}/libmmfsound.so
%{_libdir}/libsoundpluginheadset.so
%{_libdir}/libsoundplugindtmf.so
%{_libdir}/libmmfsoundcommon.so
%{_libdir}/libsoundpluginwave.so
%{_libdir}/libsoundpluginkeytone.so
%{_includedir}/mmf/mm_sound_private.h


%files sdk-devel
%defattr(-,root,root,-)
%{_includedir}/mmf/mm_sound.h
%{_libdir}/pkgconfig/mm-keysound.pc
%{_libdir}/pkgconfig/mm-sound.pc

%files tool
%defattr(-,root,root,-)
%{_bindir}/mm_sound_testsuite