94b44331de584e7eca2cb48cd3a096042f2fc36d
[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.21
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 %ifarch %{arm}
31 %endif
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
66 CFLAGS="%{optflags} -fvisibility=hidden -D_TIZEN_PUBLIC_ -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\"" ;export CFLAGS
67
68 %if "%{tizen_profile_name}" == "tv"
69         CFLAGS+=" -DTIZEN_TV";export CFLAGS
70 %endif
71
72 ./autogen.sh
73 %configure \
74        --with-plugindir=%{_libdir}/soundplugins \
75 %if "%{tizen_profile_name}" == "tv"
76        --enable-prelink \
77        --enable-lwipc \
78 %endif
79         --prefix=/usr --enable-pulse
80
81 make %{?_smp_mflags}
82
83 %install
84 rm -rf %{buildroot}
85 mkdir -p %{buildroot}/etc/dbus-1/system.d/
86 cp %{SOURCE3} %{buildroot}/etc/dbus-1/system.d/sound-server.conf
87 cp %{SOURCE6} %{buildroot}/etc/dbus-1/system.d/focus-server.conf
88 %if "%{tizen_profile_name}" == "tv"
89 cp %{SOURCE8} %{SOURCE4}
90 %endif
91 mkdir -p %{buildroot}/usr/share/dbus-1/system-services/
92 cp %{SOURCE9} %{buildroot}/usr/share/dbus-1/system-services/org.tizen.SoundServer.service
93
94 %make_install
95 %if "%{tizen_profile_name}" == "tv"
96 mkdir -p %{buildroot}%{_sysconfdir}/notstrip
97 install -m0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/notstrip/libmm-sound.notstrip
98 install -d %{buildroot}%{_unitdir}/sysinit.target.wants
99 %else
100 install -d %{buildroot}%{_unitdir}/multi-user.target.wants
101 %endif
102 install -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/
103 install -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/
104 install -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/
105 %if "%{tizen_profile_name}" == "tv"
106 ln -sf ../focus-server.path %{buildroot}%{_unitdir}/sysinit.target.wants/focus-server.path
107 %else
108 ln -sf ../focus-server.path %{buildroot}%{_unitdir}/multi-user.target.wants/focus-server.path
109 %endif
110 %post
111 /sbin/ldconfig
112
113 %postun -p /sbin/ldconfig
114
115
116 %files
117 %manifest libmm-sound.manifest
118 %defattr(-,root,root,-)
119 %{_bindir}/focus_server
120 %{_bindir}/sound_server
121 %{_libdir}/libmmfsound.so.*
122 %{_libdir}/libmmfsoundcommon.so.*
123 %{_libdir}/libmmfkeysound.so.*
124 %{_libdir}/libmmfbootsound.so.*
125 %{_libdir}/soundplugins/libsoundplugintone.so
126 %{_libdir}/soundplugins/libsoundpluginwave.so
127 %if 0%{?tizen_audio_feature_ogg_enable}
128 %{_libdir}/soundplugins/libsoundplugintremoloogg.so
129 %endif
130 %if "%{tizen_profile_name}" == "tv"
131 %{_sysconfdir}/notstrip/libmm-sound.notstrip
132 %{_unitdir}/sysinit.target.wants/focus-server.path
133 %else
134 %{_unitdir}/multi-user.target.wants/focus-server.path
135 %endif
136 %{_unitdir}/focus-server.service
137 %{_unitdir}/focus-server.path
138 /usr/share/sounds/sound-server/*
139 %license LICENSE.APLv2
140 /etc/dbus-1/system.d/sound-server.conf
141 /etc/dbus-1/system.d/focus-server.conf
142 %{_datadir}/dbus-1/system-services/org.tizen.SoundServer.service
143 %{_unitdir}/sound-server.service
144
145 %files devel
146 %defattr(-,root,root,-)
147 %{_libdir}/libmmfkeysound.so
148 %{_libdir}/libmmfbootsound.so
149 %{_libdir}/libmmfsound.so
150 %{_libdir}/libmmfsoundcommon.so
151 %{_includedir}/mmf/mm_sound_private.h
152 %exclude %{_includedir}/mmf/mm_sound_focus_socket.h
153 %exclude %{_includedir}/mmf/mm_sound_focus_private.h
154 %exclude %{_includedir}/mmf/mm_sound_pa_client.h
155
156 %files sdk-devel
157 %defattr(-,root,root,-)
158 %{_includedir}/mmf/mm_sound.h
159 %{_includedir}/mmf/mm_sound_focus.h
160 %{_includedir}/mmf/mm_sound_device.h
161 %exclude %{_includedir}/mmf/mm_sound_focus_socket.h
162 %exclude %{_includedir}/mmf/mm_sound_focus_private.h
163 %exclude %{_includedir}/mmf/mm_sound_pa_client.h
164 %{_libdir}/pkgconfig/mm-keysound.pc
165 %{_libdir}/pkgconfig/mm-bootsound.pc
166 %{_libdir}/pkgconfig/mm-sound.pc
167
168 %files tool
169 %manifest libmm-sound-tool.manifest
170 %defattr(-,root,root,-)
171 %{_bindir}/mm_sound_testsuite
172 %license LICENSE.APLv2