1 %bcond_with pulseaudio_pmapi
2 %bcond_without pulseaudio_dlog
3 %bcond_with pulseaudio_bt_profile_set
4 %bcond_without pulseaudio_udev_with_usb_only
5 %bcond_with pulseaudio_with_bluez5
8 %define udev_dir %{_prefix}/lib/udev
9 %define upgrade_script_dir %{_datadir}/upgrade/scripts
12 Summary: Improved Linux sound server
15 Group: Multimedia/Audio
17 URL: http://pulseaudio.org
18 Source0: http://www.freedesktop.org/software/pulseaudio/releases/%{name}-%{version}.tar.gz
19 Source99: baselibs.conf
20 Source1001: pulseaudio.manifest
21 Source1: 500.pulseaudio-upgrade.patch.sh
22 BuildRequires: libtool-ltdl-devel
23 BuildRequires: libtool
24 BuildRequires: intltool
26 BuildRequires: pkgconfig(speexdsp)
27 BuildRequires: pkgconfig(sndfile)
28 BuildRequires: pkgconfig(alsa)
29 BuildRequires: pkgconfig(glib-2.0)
30 %if "%{?tizen_target_name}" != "hawkp"
31 BuildRequires: pkgconfig(sbc)
33 BuildRequires: pkgconfig(dbus-1)
35 BuildRequires: pkgconfig(xi)
37 BuildRequires: pkgconfig(libudev)
38 BuildRequires: pkgconfig(openssl)
39 BuildRequires: pkgconfig(json-c)
40 BuildRequires: pkgconfig(vconf)
41 BuildRequires: systemd-devel
42 BuildRequires: libcap-devel
43 BuildRequires: pkgconfig(cynara-client)
44 BuildRequires: pkgconfig(cynara-creds-socket)
45 BuildRequires: pkgconfig(cynara-session)
46 %if %{with pulseaudio_dlog}
47 BuildRequires: pkgconfig(dlog)
49 %if "%{?TIZEN_PRODUCT_TV}" == "1"
50 BuildRequires: pkgconfig(lwipc)
53 Requires(post): /sbin/ldconfig
54 Requires(postun): /sbin/ldconfig
57 PulseAudio is a sound server for Linux and other Unix like operating
58 systems. It is intended to be an improved drop-in replacement for the
59 Enlightened Sound Daemon (ESOUND).
62 Summary: PulseAudio client libraries
63 Group: Multimedia/Audio
65 %description -n libpulse
66 Client libraries used by applications that access a PulseAudio sound server
67 via PulseAudio's native interface.
69 %package -n libpulse-mainloop-glib
71 Group: Multimedia/Audio
73 %description -n libpulse-mainloop-glib
74 pulseaudio is a networked sound server for Linux and other Unix like
75 operating systems and Microsoft Windows. It is intended to be an
76 improved drop-in replacement for the Enlightened Sound Daemon (ESOUND).
78 This package contains the GLIB Main Loop bindings for the PulseAudio
81 %package -n libpulse-devel
82 Summary: PulseAudio client development headers and libraries
83 Group: Multimedia/Development
84 Requires: libpulse = %{version}
85 Requires: libpulse-mainloop-glib = %{version}
87 %description -n libpulse-devel
88 Headers and libraries for developing applications that access a PulseAudio
89 sound server via PulseAudio's native interface
92 Summary: Command line tools for the PulseAudio sound server
93 Group: Multimedia/Audio
94 Requires: %{name} = %{version}-%{release}
97 These tools provide command line access to various features of the
98 PulseAudio sound server. Included tools are:
99 pabrowse - Browse available PulseAudio servers on the local network.
100 paplay - Playback a WAV file via a PulseAudio sink.
101 pacat - Cat raw audio data to a PulseAudio sink.
102 parec - Cat raw audio data from a PulseAudio source.
103 pacmd - Connect to PulseAudio's built-in command line control interface.
104 pactl - Send a control command to a PulseAudio server.
105 padsp - /dev/dsp wrapper to transparently support OSS applications.
106 pax11publish - Store/retrieve PulseAudio default server/sink/source
107 settings in the X11 root window.
109 %package module-bluetooth
110 Summary: Bluetooth module for PulseAudio sound server
111 Group: Multimedia/Audio
112 Requires: %{name} = %{version}-%{release}
114 %description module-bluetooth
115 This module enables PulseAudio to work with bluetooth devices, like headset
118 %package module-devel
119 Summary: Headers and libraries for PulseAudio module development
121 Group: Multimedia/Development
122 Requires: libpulse-devel = %{version}
124 %description module-devel
125 Headers and libraries for developing pulseaudio modules outside
129 Summary: PA default configuration
130 Group: System Environment/Configuration
133 Default configuration for PulseAudio.
135 %package cascaded-setup
136 Summary: Configuration for enabling the "cascaded" PulseAudio setup
137 Group: Multimedia/Audio
139 %description cascaded-setup
140 This package enables the system PulseAudio instance, and changes the user
141 instance configuration so that user instances access the hardware via the
142 system instance instead of accessing the hardware directly. This allows
143 multiple users to use the hardware simultaneously.
146 Summary: PA module-raop
147 Group: Multimedia/Audio
149 %description module-raop
150 PulseAudio module-raop.
152 %package module-filter
153 Summary: PA module-filter
154 Group: Multimedia/Audio
156 %description module-filter
157 PulseAudio module-filter.
159 %package module-augment-properties
160 Summary: PA module-augment-properties
161 Group: Multimedia/Audio
163 %description module-augment-properties
164 PulseAudio module-augment-properties.
166 %package module-dbus-protocol
167 Summary: PA module-dbus-protocol
168 Group: Multimedia/Audio
170 %description module-dbus-protocol
171 PulseAudio module-dbus-protocol.
173 %package module-switch-on-connect
174 Summary: PA module-swich-on-connect
175 Group: Multimedia/Audio
177 %description module-switch-on-connect
178 PulseAudio module-swich-on-connect.
180 %package vala-bindings
181 Summary: PA Vala bindings
182 Group: Multimedia/Audio
183 Requires: %{name} = %{version}-%{release}
185 %description vala-bindings
186 PulseAudio Vala bindings.
188 %package realtime-scheduling
189 Summary: PA realtime scheduling
190 Group: Multimedia/Audio
191 Requires: %{name} = %{version}-%{release}
192 Requires: libcap-tools
194 %description realtime-scheduling
195 PulseAudio realtime-scheduling.
199 echo "%{version}" > .tarball-version
201 %if "%{?tizen_profile_name}" == "tv"
202 cp src/daemon/systemd/system/pulseaudio-tv.service.in src/daemon/systemd/system/pulseaudio.service.in
206 export CFLAGS="%{optflags} -fno-strict-aliasing -D__TIZEN__ -D__TIZEN_BT__ -D__TIZEN_LOG__ -DBLUETOOTH_APTX_SUPPORT"
207 %if 0%{?sec_build_binary_debug_enable}
208 export CFLAGS+=" -DTIZEN_DEBUG_ENABLE"
209 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
210 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
213 %if "%{?tizen_profile_name}" == "mobile"
214 echo "tizen profile mobile"
215 export CFLAGS+=" -DTIZEN_PROFILE_MOBILE "
218 %if "%{?tizen_profile_name}" == "wearable"
219 echo "tizen profile werable"
220 export CFLAGS+=" -DTIZEN_PROFILE_WEARABLE -DADJUST_ANDROID_BITPOOL"
223 %if "%{?tizen_profile_name}" == "tv"
224 echo "tizen profile tv"
225 export CFLAGS+=" -DTIZEN_PROFILE_TV "
226 %if "%{?TIZEN_PRODUCT_TV}" == "1"
227 export CFLAGS+=" -DTIZEN_FEATURE_TV_PROD "
231 export LD_AS_NEEDED=0
232 NOCONFIGURE=yes ./bootstrap.sh
233 %configure --prefix=%{_prefix} \
237 --disable-oss-output \
238 --disable-oss-wrapper \
240 --disable-hal-compat \
246 %if "%{?tizen_target_name}" != "hawkp"
250 --with-bluetooth-headset-backend=ofono \
252 %if %{with pulseaudio_dlog}
255 %if %{with pulseaudio_pmapi}
258 %if %{with pulseaudio_bt_profile_set}
259 --enable-bt-profile-set \
261 %if %{with pulseaudio_udev_with_usb_only}
262 --enable-udev-with-usb-only \
264 %if "%{?TIZEN_PRODUCT_TV}" == "1"
268 --with-udev-rules-dir=%{udev_dir}/rules.d \
269 --with-system-user=pulse \
270 --with-system-group=pulse \
271 --with-access-group=pulse-access \
275 %__make %{?_smp_mflags} V=0
282 cd %{buildroot}%{_sysconfdir}/pulse/filter
283 ln -sf filter_8000_44100.dat filter_11025_44100.dat
284 ln -sf filter_8000_44100.dat filter_12000_44100.dat
285 ln -sf filter_8000_44100.dat filter_16000_44100.dat
286 ln -sf filter_8000_44100.dat filter_22050_44100.dat
287 ln -sf filter_8000_44100.dat filter_24000_44100.dat
288 ln -sf filter_8000_44100.dat filter_32000_44100.dat
291 rm -rf %{buildroot}%{_sysconfdir}/xdg/autostart/pulseaudio-kde.desktop
292 rm -rf %{buildroot}%{_bindir}/start-pulseaudio-kde
293 rm -rf %{buildroot}%{_bindir}/start-pulseaudio-x11
294 rm -rf %{buildroot}%{_libdir}/pulse-%{version}/modules/module-device-manager.so
296 mkdir -p %{buildroot}%{_includedir}/pulsemodule/pulse
297 mkdir -p %{buildroot}%{_includedir}/pulsemodule/pulsecore
299 cp %{buildroot}%{_includedir}/pulse/*.h %{buildroot}%{_includedir}/pulsemodule/pulse
301 %if "%{?tizen_profile_name}" == "tv"
302 mkdir -p %{buildroot}%{_unitdir}/sysinit.target.wants/
303 ln -s ../pulseaudio.service %{buildroot}%{_unitdir}/sysinit.target.wants/pulseaudio.service
305 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants/
306 ln -s ../pulseaudio.service %{buildroot}%{_unitdir}/multi-user.target.wants/pulseaudio.service
309 mkdir -p %{buildroot}%{upgrade_script_dir}
310 cp %{SOURCE1} %{buildroot}%{upgrade_script_dir}/
312 fdupes %{buildroot}%{_datadir}
313 fdupes %{buildroot}%{_includedir}
315 # get rid of *.la files
316 rm -f %{buildroot}%{_libdir}/*.la
317 rm -f %{buildroot}%{_libdir}/pulseaudio/*.la
321 if [ $1 -eq 1 ] ; then
322 # Initial installation
323 systemctl --user --global preset pulseaudio.socket >/dev/null 2>&1 || :
327 if [ $1 -eq 0 ] ; then
328 # Package removal, not upgrade
329 systemctl --no-reload --user --global disable pulseaudio.socket > /dev/null 2>&1 || :
333 %postun -p /sbin/ldconfig
335 %post -n libpulse -p /sbin/ldconfig
336 %postun -n libpulse -p /sbin/ldconfig
338 %post -n libpulse-mainloop-glib -p /sbin/ldconfig
339 %postun -n libpulse-mainloop-glib -p /sbin/ldconfig
341 %post realtime-scheduling
342 setcap cap_sys_nice+ep /usr/bin/pulseaudio
344 %postun realtime-scheduling
345 setcap -r /usr/bin/pulseaudio
348 # TODO: Check if there's a macro in Tizen for doing this.
349 if [ $1 -eq 1 ] ; then
350 # Initial installation
351 systemctl preset pulseaudio.service >/dev/null 2>&1 || :
354 %preun cascaded-setup
355 # TODO: Check if there's a macro in Tizen for doing this.
356 if [ $1 -eq 0 ] ; then
357 # Package removal, not upgrade
358 systemctl --no-reload disable pulseaudio.service >/dev/null 2>&1 || :
359 systemctl stop pulseaudio.service >/dev/null 2>&1 || :
362 %postun cascaded-setup
363 # TODO: Check if there's a macro in Tizen for doing this.
364 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
365 if [ $1 -ge 1 ] ; then
366 # Package upgrade, not uninstall
367 systemctl try-restart pulseaudio.service >/dev/null 2>&1 || :
373 %manifest %{name}.manifest
374 %defattr(-,root,root,-)
375 %license LICENSE LGPL
376 %config %{_sysconfdir}/pulse/filter/*.dat
377 %exclude %{_bindir}/esdcompat
378 %{_bindir}/pulseaudio
379 %{_libdir}/libpulsecore-%{version}.so
380 %{udev_dir}/rules.d/90-pulseaudio.rules
381 %config(noreplace) /etc/dbus-1/system.d/pulseaudio-system.conf
383 %{_libdir}/pulse-%{version}/modules/libalsa-util.so
384 %{_libdir}/pulse-%{version}/modules/libcli.so
385 %{_libdir}/pulse-%{version}/modules/liblogind.so
386 %{_libdir}/pulse-%{version}/modules/libprotocol-cli.so
387 %{_libdir}/pulse-%{version}/modules/libprotocol-http.so
388 %{_libdir}/pulse-%{version}/modules/libprotocol-native.so
389 %{_libdir}/pulse-%{version}/modules/libprotocol-simple.so
390 %{_libdir}/pulse-%{version}/modules/librtp.so
391 %{_libdir}/pulse-%{version}/modules/libtunnel-manager.so
392 %{_libdir}/pulse-%{version}/modules/module-alsa-sink.so
393 %{_libdir}/pulse-%{version}/modules/module-alsa-source.so
394 %{_libdir}/pulse-%{version}/modules/module-always-sink.so
395 %{_libdir}/pulse-%{version}/modules/module-console-kit.so
396 %{_libdir}/pulse-%{version}/modules/module-device-restore.so
397 %{_libdir}/pulse-%{version}/modules/module-stream-restore.so
398 %{_libdir}/pulse-%{version}/modules/module-tunnel-manager.so
399 %{_libdir}/pulse-%{version}/modules/module-cli-protocol-tcp.so
400 %{_libdir}/pulse-%{version}/modules/module-cli-protocol-unix.so
401 %{_libdir}/pulse-%{version}/modules/module-cli.so
402 %{_libdir}/pulse-%{version}/modules/module-combine.so
403 %{_libdir}/pulse-%{version}/modules/module-combine-sink.so
404 %{_libdir}/pulse-%{version}/modules/module-default-device-restore.so
405 %{_libdir}/pulse-%{version}/modules/module-detect.so
406 %{_libdir}/pulse-%{version}/modules/module-esound-sink.so
407 %{_libdir}/pulse-%{version}/modules/module-http-protocol-tcp.so
408 %{_libdir}/pulse-%{version}/modules/module-http-protocol-unix.so
409 %{_libdir}/pulse-%{version}/modules/module-intended-roles.so
410 %{_libdir}/pulse-%{version}/modules/module-ladspa-sink.so
411 %{_libdir}/pulse-%{version}/modules/module-match.so
412 %{_libdir}/pulse-%{version}/modules/module-mmkbd-evdev.so
413 %{_libdir}/pulse-%{version}/modules/module-native-protocol-fd.so
414 %{_libdir}/pulse-%{version}/modules/module-native-protocol-tcp.so
415 %{_libdir}/pulse-%{version}/modules/module-native-protocol-unix.so
416 %{_libdir}/pulse-%{version}/modules/module-null-sink.so
417 %{_libdir}/pulse-%{version}/modules/module-null-source.so
418 %{_libdir}/pulse-%{version}/modules/module-pipe-sink.so
419 %{_libdir}/pulse-%{version}/modules/module-pipe-source.so
420 %{_libdir}/pulse-%{version}/modules/module-position-event-sounds.so
421 %{_libdir}/pulse-%{version}/modules/module-remap-sink.so
422 %{_libdir}/pulse-%{version}/modules/module-remap-source.so
423 %{_libdir}/pulse-%{version}/modules/module-rescue-streams.so
424 %{_libdir}/pulse-%{version}/modules/module-rtp-recv.so
425 %{_libdir}/pulse-%{version}/modules/module-rtp-send.so
426 %{_libdir}/pulse-%{version}/modules/module-simple-protocol-tcp.so
427 %{_libdir}/pulse-%{version}/modules/module-simple-protocol-unix.so
428 %{_libdir}/pulse-%{version}/modules/module-sine.so
429 %{_libdir}/pulse-%{version}/modules/module-tunnel-sink.so
430 %{_libdir}/pulse-%{version}/modules/module-tunnel-sink-new.so
431 %{_libdir}/pulse-%{version}/modules/module-tunnel-source.so
432 %{_libdir}/pulse-%{version}/modules/module-tunnel-source-new.so
433 %{_libdir}/pulse-%{version}/modules/module-suspend-on-idle.so
434 %{_libdir}/pulse-%{version}/modules/module-volume-restore.so
435 %{_libdir}/pulse-%{version}/modules/module-alsa-card.so
436 %{_libdir}/pulse-%{version}/modules/module-card-restore.so
437 %{_libdir}/pulse-%{version}/modules/module-sine-source.so
438 %{_libdir}/pulse-%{version}/modules/module-loopback.so
439 %{_libdir}/pulse-%{version}/modules/module-rygel-media-server.so
440 %{_libdir}/pulse-%{version}/modules/module-echo-cancel.so
441 %{_libdir}/pulse-%{version}/modules/module-virtual-sink.so
442 %{_libdir}/pulse-%{version}/modules/module-virtual-source.so
443 %{_libdir}/pulse-%{version}/modules/libprotocol-esound.so
444 %{_libdir}/pulse-%{version}/modules/module-esound-compat-spawnfd.so
445 %{_libdir}/pulse-%{version}/modules/module-esound-compat-spawnpid.so
446 %{_libdir}/pulse-%{version}/modules/module-esound-protocol-tcp.so
447 %{_libdir}/pulse-%{version}/modules/module-esound-protocol-unix.so
448 %{_libdir}/pulse-%{version}/modules/module-udev-detect.so
449 %{_libdir}/pulse-%{version}/modules/module-role-cork.so
450 %{_libdir}/pulse-%{version}/modules/module-switch-on-port-available.so
451 %{_libdir}/pulse-%{version}/modules/module-virtual-surround-sink.so
452 %{_libdir}/pulse-%{version}/modules/module-role-ducking.so
453 %{_libdir}/pulse-%{version}/modules/module-systemd-login.so
454 %{_unitdir_user}/pulseaudio.service
455 %{_unitdir_user}/pulseaudio.socket
456 %{_unitdir}/pulseaudio.service
457 %if "%{?tizen_profile_name}" == "tv"
458 %{_unitdir}/sysinit.target.wants/pulseaudio.service
460 %{_unitdir}/multi-user.target.wants/pulseaudio.service
463 %exclude %config(noreplace) /etc/bash_completion.d/pulseaudio-bash-completion.sh
465 %{upgrade_script_dir}/500.pulseaudio-upgrade.patch.sh
468 %manifest %{name}.manifest
469 %defattr(-,root,root,-)
470 %{_libdir}/libpulse.so.*
471 %{_libdir}/libpulse-simple.so.*
472 %{_libdir}/pulseaudio/libpulsecommon-*.so
474 %files -n libpulse-devel
475 %manifest %{name}.manifest
476 %defattr(-,root,root,-)
477 %{_includedir}/pulse/*
478 %{_includedir}/pulsecore/*
479 %{_libdir}/libpulse.so
480 %{_libdir}/libpulse-simple.so
481 %{_libdir}/libpulse-mainloop-glib.so
482 %{_libdir}/pkgconfig/libpulse*.pc
483 %{_libdir}/pkgconfig/pulsecore.pc
484 %{_datadir}/vala/vapi/libpulse.vapi
486 %{_libdir}/cmake/PulseAudio/PulseAudioConfig.cmake
487 %{_libdir}/cmake/PulseAudio/PulseAudioConfigVersion.cmake
489 %files -n libpulse-mainloop-glib
490 %manifest %{name}.manifest
491 %defattr(-,root,root)
492 %{_libdir}/libpulse-mainloop-glib.so.*
495 %manifest %{name}.manifest
496 %defattr(-,root,root,-)
497 %doc %{_mandir}/man1/*
498 %doc %{_mandir}/man5/*
506 %{_bindir}/pasuspender
508 %files module-bluetooth
509 %manifest %{name}.manifest
510 %if "%{?tizen_target_name}" != "hawkp"
511 %defattr(-,root,root,-)
512 %{_libdir}/pulse-%{version}/modules/module-bluetooth-discover.so
513 %{_libdir}/pulse-%{version}/modules/module-bluetooth-policy.so
514 %{_libdir}/pulse-%{version}/modules/module-bluez5-discover.so
515 %{_libdir}/pulse-%{version}/modules/module-bluez5-device.so
516 %{_libdir}/pulse-%{version}/modules/libbluez5-util.so
520 %manifest %{name}.manifest
521 %defattr(-,root,root,-)
522 %{_libdir}/pulse-%{version}/modules/libraop.so
523 %{_libdir}/pulse-%{version}/modules/module-raop*.so
526 %manifest %{name}.manifest
527 %defattr(-,root,root,-)
528 %{_libdir}/pulse-%{version}/modules/module-filter-*.so
530 %files module-augment-properties
531 %manifest %{name}.manifest
532 %defattr(-,root,root,-)
533 %{_libdir}/pulse-%{version}/modules/module-augment-properties.so
535 %files module-dbus-protocol
536 %manifest %{name}.manifest
537 %defattr(-,root,root,-)
538 %{_libdir}/pulse-%{version}/modules/module-dbus-protocol.so
540 %files module-switch-on-connect
541 %manifest %{name}.manifest
542 %defattr(-,root,root,-)
543 %{_libdir}/pulse-%{version}/modules/module-switch-on-connect.so
546 %manifest %{name}.manifest
547 %defattr(-,root,root,-)
548 %config(noreplace) %{_sysconfdir}/pulse/daemon.conf
549 %config(noreplace) %{_sysconfdir}/pulse/default.pa
550 %config(noreplace) %{_sysconfdir}/pulse/client.conf
551 %config(noreplace) %{_sysconfdir}/pulse/system.pa
553 %{_datadir}/pulseaudio/alsa-mixer/paths/*
554 %{_datadir}/pulseaudio/alsa-mixer/profile-sets/*
556 %files cascaded-setup
557 %config(noreplace) %{_sysconfdir}/pulse/cascaded.pa
558 %config(noreplace) %{_sysconfdir}/pulse/tunnel-manager.conf
559 %{_unitdir}/pulseaudio.service
560 %{_unitdir}/pulseaudio.socket
563 %manifest %{name}.manifest
564 %defattr(-,root,root)
565 %{_includedir}/pulsemodule/pulsecore/*.h
566 %{_includedir}/pulsemodule/pulse/*.h
567 %{_libdir}/pkgconfig/pulseaudio-module-devel.pc
570 %manifest %{name}.manifest
571 %defattr(-,root,root,-)
572 %{_datadir}/vala/vapi/*
574 %files realtime-scheduling
575 %defattr(-,root,root,-)