File alsa-plugins.spec of Package alsa-plugins
#
# spec file for package alsa-plugins
#
# Copyright (c) 2017 SUSE LINUX 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.1.5
%if 0%{?suse_version} > 1030
%define build_pulse 1
%define build_speex 1
%else
%define build_pulse 0
%define build_speex 0
%endif
%if 0%{?is_opensuse}
%define build_avcodec 1
%else
%define build_avcodec 0
%endif
Name: alsa-plugins
Version: 1.1.5
Release: 0
Summary: Extra Plug-Ins for the ALSA Library
License: LGPL-2.1+
Group: System/Libraries
Url: http://www.alsa-project.org/
Source: ftp://ftp.alsa-project.org/pub/plugins/alsa-plugins-%{package_version}.tar.bz2
Source1: asound-pulse.conf
Source2: alsa-pulse.conf
Source3: baselibs.conf
BuildRequires: alsa-devel
BuildRequires: dbus-1-devel
%if %build_avcodec
BuildRequires: libavcodec-devel
%endif
BuildRequires: libjack-devel
BuildRequires: libjack0
BuildRequires: libsamplerate-devel
BuildRequires: libtool
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{build_pulse}
BuildRequires: libpulse-devel
%endif
%if %{build_speex}
%if 0%{?suse_version} > 1230
BuildRequires: pkgconfig(speexdsp) >= 1.2
%else
BuildRequires: speex-devel
%endif
%endif
%ifarch s390x
Recommends: %{name}-32bit = %{version}
%endif
%description
This package contains the extra plug-ins for the ALSA library.
%package jack
Summary: JACK I/O Plug-In for the ALSA Library
License: LGPL-2.1+
Group: System/Libraries
Requires: jack
%ifarch s390x
Recommends: %{name}-jack-32bit = %{version}
%endif
%description jack
This package contains the JACK (Jack Audio Connection Kit) I/O plug-in
for the ALSA library.
%if %{build_pulse}
%package pulse
Summary: Pulseaudio Plug-In for the ALSA Library
License: GPL-2.0+ and LGPL-2.1+
Group: System/Libraries
Requires: pulseaudio
%ifarch s390x
Recommends: %{name}-pulse-32bit = %{version}
%endif
%description pulse
pulseaudio is a networked sound server for Linux and other Unix like
operating systems and Microsoft Windows. It is intended to be an
improved drop-in replacement for the Enlightened Sound Daemon (ESOUND).
This package contains the polypaudio I/O plug-in for the ALSA library.
%endif
%package maemo
Summary: Maemo Plug-Ins for the ALSA Library
License: LGPL-2.1+
Group: System/Libraries
%description maemo
This package contains the ALSA-library plug-ins using maemo SDK for
Nokia 770.
%package samplerate
Summary: Samplerate Plug-In for the ALSA Library
License: GPL-2.0+
Group: System/Libraries
%ifarch s390x
Recommends: %{name}-samplerate-32bit = %{version}
%endif
%description samplerate
This package contains the sample rate converter plugin for the ALSA
library using libsamplerate.
%if %{build_speex}
%package speex
Summary: Speex Prerocessor Plug-In for the ALSA Library
License: LGPL-2.1+
Group: System/Libraries
%ifarch s390x
Recommends: %{name}-speex-32bit = %{version}
%endif
%description speex
This package contains the Speex preprocessor plugin for the ALSA
library using libspeexdsp.
%endif
%if %build_avcodec
%package a52
Summary: A52 Output Plug-In for the ALSA Library
License: LGPL-2.1+
Group: System/Libraries
%description a52
This package contains the A52 (aka AC3) output plug-in for the ALSA library.
%package lavcrate
Summary: Rate Converter Plug-In for the ALSA Library using libavcodec
License: LGPL-2.1+
Group: System/Libraries
%description lavcrate
This package contains the sample rate converter plugin for the ALSA
library using libavcodec.
%endif
%prep
%setup -q -n %{name}-%{package_version}
%build
export AUTOMAKE_JOBS="%{?_smp_mflags}"
# autoreconf -fi
%configure --enable-maemo-plugin --enable-maemo-resource-manager \
--with-speex=builtin
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
mkdir -p %{buildroot}%{_sysconfdir}/
%if %{build_pulse}
install -m 0644 %{_sourcedir}/asound-pulse.conf %{buildroot}%{_sysconfdir}/
install -m 0644 %{_sourcedir}/alsa-pulse.conf %{buildroot}%{_sysconfdir}/
%endif
# modules don't need *.la files
find %{buildroot} -type f -name "*.la" -delete -print
%post pulse
if command -v setup-pulseaudio > /dev/null; then
setup-pulseaudio --auto
fi
exit 0
%postun pulse
if command -v setup-pulseaudio > /dev/null; then
setup-pulseaudio --auto
fi
exit 0
%files
%defattr(-, root, root)
%doc COPYING
%doc doc/README-pcm-oss
%doc doc/README-arcam-av
%doc doc/upmix.txt
%doc doc/vdownmix.txt
%doc doc/speexrate.txt
%dir %{_libdir}/alsa-lib
%{_libdir}/alsa-lib/libasound_module_ctl_oss.so
%{_libdir}/alsa-lib/libasound_module_pcm_oss.so
%{_libdir}/alsa-lib/libasound_module_pcm_upmix.so
%{_libdir}/alsa-lib/libasound_module_pcm_vdownmix.so
%{_libdir}/alsa-lib/libasound_module_pcm_usb_stream.so
%{_libdir}/alsa-lib/libasound_module_rate_speexrate*.so
%{_libdir}/alsa-lib/libasound_module_ctl_arcam_av.so
%files jack
%defattr(-, root, root)
%doc COPYING
%doc doc/README-jack
%{_libdir}/alsa-lib/libasound_module_pcm_jack.so
%if %{build_pulse}
%files pulse
%defattr(-, root, root)
%doc COPYING
%doc doc/README-pulse
%{_libdir}/alsa-lib/libasound_module_ctl_pulse.so
%{_libdir}/alsa-lib/libasound_module_pcm_pulse.so
%{_libdir}/alsa-lib/libasound_module_conf_pulse.so
%config %{_sysconfdir}/asound-pulse.conf
%config %{_sysconfdir}/alsa-pulse.conf
%{_datadir}/alsa/alsa.conf.d
%endif
%files maemo
%defattr(-, root, root)
%doc COPYING
%doc doc/README-maemo
%{_libdir}/alsa-lib/libasound_module_ctl_dsp_ctl.so
%{_libdir}/alsa-lib/libasound_module_pcm_alsa_dsp.so
%files samplerate
%defattr(-, root, root)
%doc COPYING.GPL
%doc doc/samplerate.txt
%{_libdir}/alsa-lib/libasound_module_rate_samplerate*.so
%if %{build_speex}
%files speex
%defattr(-, root, root)
%doc COPYING
%doc doc/speexdsp.txt
%{_libdir}/alsa-lib/libasound_module_pcm_speex.so
%endif
%if %build_avcodec
%files a52
%defattr(-, root, root)
%doc COPYING
%doc doc/a52.txt
%{_libdir}/alsa-lib/libasound_module_pcm_a52.so
%files lavcrate
%defattr(-, root, root)
%doc COPYING
%doc doc/lavcrate.txt
%{_libdir}/alsa-lib/libasound_module_rate_lavcrate.so
%{_libdir}/alsa-lib/libasound_module_rate_lavcrate_fast.so
%{_libdir}/alsa-lib/libasound_module_rate_lavcrate_faster.so
%{_libdir}/alsa-lib/libasound_module_rate_lavcrate_high.so
%{_libdir}/alsa-lib/libasound_module_rate_lavcrate_higher.so
%endif
%changelog