- Backport upstream fixes / enhancements: mostly small fixes spotted by coccinelle and oethers, the fixes for proper rewind support, a new DSD format support, hwdep definitions sync, and addition of PAZ00 UCM configs. 0022-pcm-fix-snd_pcm_mmap_hw_avail-near-the-boundary.patch 0023-pcm-fix-return-value-of-snd_pcm_share_slave_avail.patch 0024-pcm-add-new-32-bit-DSD-sample-format.patch 0025-dmix-actually-rewind-when-running-or-being-drained.patch 0026-pcm-express-the-rewind-size-limitation-logic-better.patch 0027-pcm-handle-negative-values-from-snd_pcm_mmap_hw_avai.patch 0028-pcm-rate-use-the-snd_pcm_mmap_hw_avail-function.patch 0029-pcm-null-use-the-snd_pcm_mmap_avail-function.patch 0030-rate-handle-negative-values-from-snd_pcm_mmap_playba.patch 0031-dsnoop-rewindable-and-forwardable-logic-was-swapped.patch 0033-pcm-file-don-t-recurse-in-the-rewindable-and-forward.patch 0034-pcm-route-Fix-the-bad-condition-always-false.patch 0035-pcm-rate-hw_avail-must-not-be-negative-before-starti.patch 0036-hwdep-add-missing-declaration-for-snd_hwdep_poll_des.patch 0037-mixer-fixed-double-free.patch 0038-pcm_file-fixed-missing-free.patch 0039-sbase-fixed-missing-free.patch 0040-rawmidi-close-handle-h.patch 0041-pcm_share-fixing-missing-mutex-unlock.patch 0042-simple_abst-null-check-for-lib.patch 0043-socket-missing-socket-close.patch 0044-pcm_hooks-null-check-for-h.patch 0045-conf-return-negative-value-in-case-of-error.patch 0046-control-return-negative-value-in-case-of-error.patch 0047-pcm-return-negative-value-in-case-of-error.patch 0048-mixer-Fix-missing-hctl-handle-free-in-snd_mixer_atta.patch OBS-URL: https://build.opensuse.org/request/show/257835 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=170
378 lines
12 KiB
RPMSpec
378 lines
12 KiB
RPMSpec
#
|
|
# spec file for package alsa
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define package_version 1.0.28
|
|
%if 0%{?suse_version} > 1200
|
|
%define _udevdir %(pkg-config --variable=udevdir udev)
|
|
%else
|
|
%define _udevdir /lib/udev
|
|
%endif
|
|
Name: alsa
|
|
Version: 1.0.28
|
|
Release: 0
|
|
#
|
|
Summary: Advanced Linux Sound Architecture
|
|
License: LGPL-2.1+
|
|
Group: System/Libraries
|
|
Url: http://www.alsa-project.org/
|
|
Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2
|
|
Source2: baselibs.conf
|
|
Source8: 40-alsa.rules
|
|
Source9: 42-hd-audio-pm.rules
|
|
Source11: alsasound
|
|
Source12: sysconfig.sound
|
|
Source13: joystick
|
|
Source14: sysconfig.joystick
|
|
Source16: set_default_volume
|
|
Source17: test.wav
|
|
Source21: README.testwav
|
|
Source30: all_notes_off
|
|
Source31: all_notes_off.bin
|
|
Source32: all_notes_off.mid
|
|
Source34: alsa-init.sh
|
|
Source40: 50-alsa.conf
|
|
Source41: install-snd-module
|
|
# Patch: alsa-lib-git-fixes.diff
|
|
# upstream fixes
|
|
Patch1: 0001-ucm-Document-PlaybackPCMIsDummy-and-CapturePCMIsDumm.patch
|
|
Patch2: 0002-ICE1712-add-surround71-pcm-definition.patch
|
|
Patch3: 0003-USB-Audio-Add-second-S-PDIF-device-on-Phiree-U2.patch
|
|
Patch4: 0004-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch
|
|
Patch5: 0005-pcm-Provide-a-CLOCK_MONOTONIC_RAW-timestamp-type.patch
|
|
Patch6: 0006-Add-timestamp-type-to-sw_params-internal-only.patch
|
|
Patch7: 0007-pcm-Add-sw_params-API-functions-to-get-set-timestamp.patch
|
|
Patch8: 0008-pcm-Implement-timestamp-type-setup-in-hw-plugin.patch
|
|
Patch9: 0009-pcm-Implement-timestamp-type-handling-in-all-plugins.patch
|
|
Patch10: 0010-test-audio_time-Set-timestamp-type-explicitly.patch
|
|
Patch11: 0011-pcm-route-Use-get-put-labels-for-all-3-byte-formats.patch
|
|
Patch12: 0012-pcm-Fill-sw_params-proto-field.patch
|
|
Patch13: 0013-pcm-route-Use-get32-for-multi-source-route-calculati.patch
|
|
Patch14: 0014-pcm-Drop-snd_pcm_linear_-get-put-32_index.patch
|
|
Patch15: 0015-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch
|
|
Patch16: 0016-pcm-Fix-DSD-formats-userland-usability.patch
|
|
Patch17: 0017-Sync-include-sound-asound.h-with-3.17-rc1-kernel.patch
|
|
Patch18: 0018-pcm-Add-missing-signed-and-endianess-definitions-for.patch
|
|
Patch19: 0019-Sync-enum-snd_hwdep_iface_t-with-include-asound-asou.patch
|
|
Patch20: 0020-pcm-2nd-round-of-pcm_misc-DSD-fixes.patch
|
|
Patch21: 0021-doc-fix-cross-compiling-example.patch
|
|
Patch22: 0022-pcm-fix-snd_pcm_mmap_hw_avail-near-the-boundary.patch
|
|
Patch23: 0023-pcm-fix-return-value-of-snd_pcm_share_slave_avail.patch
|
|
Patch24: 0024-pcm-add-new-32-bit-DSD-sample-format.patch
|
|
Patch25: 0025-dmix-actually-rewind-when-running-or-being-drained.patch
|
|
Patch26: 0026-pcm-express-the-rewind-size-limitation-logic-better.patch
|
|
Patch27: 0027-pcm-handle-negative-values-from-snd_pcm_mmap_hw_avai.patch
|
|
Patch28: 0028-pcm-rate-use-the-snd_pcm_mmap_hw_avail-function.patch
|
|
Patch29: 0029-pcm-null-use-the-snd_pcm_mmap_avail-function.patch
|
|
Patch30: 0030-rate-handle-negative-values-from-snd_pcm_mmap_playba.patch
|
|
Patch31: 0031-dsnoop-rewindable-and-forwardable-logic-was-swapped.patch
|
|
Patch33: 0033-pcm-file-don-t-recurse-in-the-rewindable-and-forward.patch
|
|
Patch34: 0034-pcm-route-Fix-the-bad-condition-always-false.patch
|
|
Patch35: 0035-pcm-rate-hw_avail-must-not-be-negative-before-starti.patch
|
|
Patch36: 0036-hwdep-add-missing-declaration-for-snd_hwdep_poll_des.patch
|
|
Patch37: 0037-mixer-fixed-double-free.patch
|
|
Patch38: 0038-pcm_file-fixed-missing-free.patch
|
|
Patch39: 0039-sbase-fixed-missing-free.patch
|
|
Patch40: 0040-rawmidi-close-handle-h.patch
|
|
Patch41: 0041-pcm_share-fixing-missing-mutex-unlock.patch
|
|
Patch42: 0042-simple_abst-null-check-for-lib.patch
|
|
Patch43: 0043-socket-missing-socket-close.patch
|
|
Patch44: 0044-pcm_hooks-null-check-for-h.patch
|
|
Patch45: 0045-conf-return-negative-value-in-case-of-error.patch
|
|
Patch46: 0046-control-return-negative-value-in-case-of-error.patch
|
|
Patch47: 0047-pcm-return-negative-value-in-case-of-error.patch
|
|
Patch48: 0048-mixer-Fix-missing-hctl-handle-free-in-snd_mixer_atta.patch
|
|
Patch49: 0049-conf-ucm-PAZ00-add-Toshiba-AC100-Dynabook-AZ-new-con.patch
|
|
# rest suse patches
|
|
Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff
|
|
BuildRequires: doxygen
|
|
BuildRequires: libtool
|
|
BuildRequires: pkg-config
|
|
Requires: alsa-utils
|
|
# FIXME: use proper Requires(pre/post/preun/...)
|
|
PreReq: %fillup_prereq
|
|
PreReq: %insserv_prereq
|
|
Recommends: alsa-oss
|
|
Recommends: alsa-plugins
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%if 0%{?suse_version} > 1200
|
|
BuildRequires: libudev-devel
|
|
%else
|
|
BuildRequires: udev
|
|
%endif
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: alsa-64bit
|
|
%endif
|
|
|
|
%description
|
|
ALSA stands for Advanced Linux Sound Architecture. It supports many
|
|
PCI, ISA PnP and USB sound cards.
|
|
|
|
This package contains the ALSA init scripts to start the sound system
|
|
on your Linux box. To set it up, run yast2 or alsaconf.
|
|
|
|
%package devel
|
|
Summary: Include Files and Libraries mandatory for Development
|
|
License: LGPL-2.1+
|
|
Group: Development/Libraries/C and C++
|
|
Requires: glibc-devel
|
|
Requires: libasound2 = %{version}
|
|
Obsoletes: alsadev
|
|
Provides: alsa-lib-devel
|
|
Provides: alsadev
|
|
|
|
%description devel
|
|
This package contains all necessary include files and libraries needed
|
|
to develop applications that require these.
|
|
|
|
%package docs
|
|
Summary: Additional Package Documentation
|
|
License: GPL-2.0+
|
|
Group: Documentation/Other
|
|
%if 0%{?suse_version} > 1110
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%description docs
|
|
This package contains optional documentation provided in addition to
|
|
this package's base documentation.
|
|
|
|
%package -n libasound2
|
|
Summary: Advanced Linux Sound Architecture Library
|
|
License: LGPL-2.1+
|
|
Group: System/Libraries
|
|
Provides: alsa-lib
|
|
|
|
%description -n libasound2
|
|
This package contains the library for ALSA, Advanced Linux Sound
|
|
Architecture.
|
|
|
|
%prep
|
|
%setup -q -n alsa-lib-%{package_version}
|
|
# %patch -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
%patch4 -p1
|
|
%patch5 -p1
|
|
%patch6 -p1
|
|
%patch7 -p1
|
|
%patch8 -p1
|
|
%patch9 -p1
|
|
%patch10 -p1
|
|
%patch11 -p1
|
|
%patch12 -p1
|
|
%patch13 -p1
|
|
%patch14 -p1
|
|
%patch15 -p1
|
|
%patch16 -p1
|
|
%patch17 -p1
|
|
%patch18 -p1
|
|
%patch19 -p1
|
|
%patch20 -p1
|
|
%patch21 -p1
|
|
%patch22 -p1
|
|
%patch23 -p1
|
|
%patch24 -p1
|
|
%patch25 -p1
|
|
%patch26 -p1
|
|
%patch27 -p1
|
|
%patch28 -p1
|
|
%patch29 -p1
|
|
%patch30 -p1
|
|
%patch31 -p1
|
|
%patch33 -p1
|
|
%patch34 -p1
|
|
%patch35 -p1
|
|
%patch36 -p1
|
|
%patch37 -p1
|
|
%patch38 -p1
|
|
%patch39 -p1
|
|
%patch40 -p1
|
|
%patch41 -p1
|
|
%patch42 -p1
|
|
%patch43 -p1
|
|
%patch44 -p1
|
|
%patch45 -p1
|
|
%patch46 -p1
|
|
%patch47 -p1
|
|
%patch48 -p1
|
|
%patch49 -p1
|
|
%if 0%{?suse_version} == 1130
|
|
%patch99 -p1
|
|
%endif
|
|
# hack to fix build on older distros
|
|
%if 0%{?suse_version} < 1100
|
|
%ifarch %{ix86}
|
|
test -f $RPM_SOURCE_DIR/baselibs.conf && \
|
|
sed -i -e'/recommends.*alsa-oss/d' $RPM_SOURCE_DIR/baselibs.conf
|
|
%endif
|
|
%endif
|
|
|
|
%build
|
|
export AUTOMAKE_JOBS="%{?_smp_mflags}"
|
|
# build alsa-lib
|
|
autoreconf -fi
|
|
%configure \
|
|
--disable-static \
|
|
--enable-symbolic-functions \
|
|
--disable-aload \
|
|
--disable-alisp \
|
|
--disable-python
|
|
make V=1 %{?_smp_mflags}
|
|
# run doxygen
|
|
make -C doc doc %{?_smp_mflags}
|
|
|
|
%install
|
|
# install shared library
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
|
# clean up unneeded files
|
|
rm -f %{buildroot}%{_libdir}/*.*a
|
|
rm -f %{buildroot}%{_libdir}/alsa-lib/smixer/*.*a
|
|
rm -f %{buildroot}%{_bindir}/aserver
|
|
#
|
|
# install helper scripts
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
mkdir -p %{buildroot}%{_sbindir}
|
|
install -c -m 0755 %{SOURCE16} %{buildroot}%{_bindir}
|
|
install -c -m 0755 %{SOURCE34} %{buildroot}%{_sbindir}/alsa-init
|
|
%if 0%{?suse_version} < 1140
|
|
sed -i -e 's@%{_localstatedir}/lib/alsa/asound.state@%{_sysconfdir}/asound.state@g' %{buildroot}%{_bindir}/set_default_volume
|
|
sed -i -e 's@%{_localstatedir}/lib/alsa/asound.state@%{_sysconfdir}/asound.state@g' %{buildroot}%{_sbindir}/alsa-init
|
|
%endif
|
|
# install test wave file
|
|
mkdir -p %{buildroot}%{_datadir}/sounds/alsa
|
|
install -c -m 0644 %{SOURCE17} %{buildroot}%{_datadir}/sounds/alsa/test.wav
|
|
# install all_notes_off stuff
|
|
install -c -m 0755 %{SOURCE30} %{buildroot}%{_bindir}
|
|
mkdir -p %{buildroot}%{_prefix}/lib
|
|
install -c -m 0644 %{SOURCE31} %{buildroot}%{_prefix}/lib
|
|
install -c -m 0644 %{SOURCE32} %{buildroot}%{_prefix}/lib
|
|
%if 0%{?suse_version} <= 1310
|
|
#
|
|
# install init scripts
|
|
#
|
|
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
|
install -c -m 0755 %{SOURCE11} %{buildroot}%{_sysconfdir}/init.d
|
|
install -c -m 0755 %{SOURCE13} %{buildroot}%{_sysconfdir}/init.d
|
|
%if 0%{?suse_version} < 1140
|
|
sed -i -e 's@%{_localstatedir}/lib/alsa/asound.state@%{_sysconfdir}/asound.state@g' %{buildroot}%{_initddir}/alsasound
|
|
%endif
|
|
rm -f %{buildroot}%{_sbindir}/rcalsasound
|
|
ln -s ../..%{_initddir}/alsasound %{buildroot}%{_sbindir}/rcalsasound
|
|
rm -f %{buildroot}%{_sbindir}/rcjoystick
|
|
ln -s ../..%{_initddir}/joystick %{buildroot}%{_sbindir}/rcjoystick
|
|
%endif
|
|
#
|
|
# udev rules (only for non-systemd)
|
|
#
|
|
mkdir -p %{buildroot}%{_udevdir}/rules.d
|
|
%if 0%{?suse_version} < 1140
|
|
install -c -m 0644 %{SOURCE8} %{buildroot}%{_udevdir}/rules.d
|
|
%endif
|
|
install -c -m 0644 %{SOURCE9} %{buildroot}%{_udevdir}/rules.d
|
|
#
|
|
# modprobe config and the module install script for loading OSS-emulation
|
|
# and sequencer modules automatically
|
|
%if 0%{?suse_version} > 1220
|
|
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d
|
|
install -c -m 0644 %{SOURCE40} %{buildroot}%{_sysconfdir}/modprobe.d
|
|
mkdir -p %{buildroot}/sbin
|
|
install -c -m 0755 %{SOURCE41} %{buildroot}/sbin
|
|
%endif
|
|
#
|
|
# install template to update rc.config and sysconfig files:
|
|
# (updating the actual files is done in the %post-script)
|
|
#
|
|
mkdir -p -m 755 %{buildroot}%{_localstatedir}/adm/fillup-templates
|
|
mkdir -p -m 755 %{buildroot}%{_sysconfdir}/sysconfig
|
|
install -m 644 $RPM_SOURCE_DIR/sysconfig.sound %{buildroot}%{_localstatedir}/adm/fillup-templates
|
|
%if 0%{?suse_version} <= 1310
|
|
install -m 644 $RPM_SOURCE_DIR/sysconfig.joystick %{buildroot}%{_localstatedir}/adm/fillup-templates
|
|
%endif
|
|
#
|
|
# documents
|
|
#
|
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
|
cp $RPM_SOURCE_DIR/README* %{buildroot}%{_docdir}/%{name}
|
|
mkdir -p %{buildroot}%{_docdir}/%{name}/alsa-lib
|
|
cp COPYING ChangeLog INSTALL TODO MEMORY-LEAK %{buildroot}%{_docdir}/%{name}/alsa-lib
|
|
cp doc/asoundrc.txt %{buildroot}%{_docdir}/%{name}/alsa-lib
|
|
|
|
%post
|
|
%if 0%{?suse_version} > 1310
|
|
%{fillup_only -n sound}
|
|
%else
|
|
%{fillup_and_insserv -ny sound alsasound}
|
|
%{fillup_and_insserv -n joystick joystick}
|
|
%endif
|
|
exit 0
|
|
|
|
%if 0%{?suse_version} <= 1310
|
|
|
|
%preun
|
|
%stop_on_removal alsasound joystick
|
|
exit 0
|
|
|
|
%postun
|
|
%restart_on_update alsasound joystick
|
|
%insserv_cleanup
|
|
exit 0
|
|
%endif
|
|
|
|
%post -n libasound2 -p /sbin/ldconfig
|
|
|
|
%postun -n libasound2 -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
%doc %{_docdir}/%{name}
|
|
%if 0%{?suse_version} <= 1310
|
|
%{_initddir}/*
|
|
%endif
|
|
%if 0%{?suse_version} > 1220
|
|
%{_sysconfdir}/modprobe.d
|
|
/sbin/*
|
|
%endif
|
|
%{_sbindir}/*
|
|
%{_bindir}/*
|
|
%{_prefix}/lib/all_notes_off.*
|
|
%{_datadir}/sounds/alsa
|
|
%{_localstatedir}/adm/fillup-templates/*
|
|
%{_udevdir}/rules.d/*
|
|
|
|
%files devel
|
|
%defattr(-, root, root)
|
|
%{_libdir}/libasound.so
|
|
%{_includedir}/sys/*
|
|
%{_includedir}/alsa
|
|
%{_datadir}/aclocal/*.m4
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
%files docs
|
|
%defattr(-, root, root)
|
|
%doc doc/doxygen/html/*
|
|
|
|
%files -n libasound2
|
|
%defattr(-, root, root)
|
|
%{_libdir}/libasound.so.*
|
|
%{_libdir}/alsa-lib
|
|
%{_datadir}/alsa
|
|
|
|
%changelog
|