File alsa-utils.spec of Package alsa-utils

# spec file for package alsa-utils
# Copyright (c) 2011 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

%if %suse_version > 1130
%define use_systemd	1
%define use_varlib	1
%define use_systemd	0
%define use_varlib	0

Name:           alsa-utils
BuildRequires:  alsa-devel ncurses-devel pkgconfig xmlto
%define package_version
License:        GPLv2+
Group:          Productivity/Multimedia/Sound/Players
Provides:       alsa-conf
Requires:       dialog pciutils
Summary:        Advanced Linux Sound Architecture Utilities
Release:        8
# Patch:          alsa-utils-git-fixes.diff
Patch1:         0001-alsamixer-fix-display-of-active-inactive-controls.patch
Patch2:         0002-alsaloop-libsamplerate-requires-specific-formats-for.patch
Patch3:         0003-alsaloop-another-try-to-force-correct-formats-for-li.patch
Patch4:         0004-alsamixer-fix-build-on-uClibc.patch
Patch5:         0005-alsactl-init-Mute-CD-Playback-volume-by-default.patch
Patch6:         0006-Revert-alsactl-Display-help-for-names-command.patch
Patch7:         0007-alsaucm-Add-list1-command-for-non-tuple-lists.patch
Patch8:         0008-alsaucm-Don-t-double-free-empty-lists.patch
Patch9:         0009-aplay-Add-i-option-for-interactive-mode.patch
Patch10:        0010-aplay-Avoid-recursive-signal-handling.patch
Patch13:        0013-Updated-COPYING-with-the-recent-FSF-address.patch
Patch14:        0014-alsamixer-Fix-64bit-issues.patch
Patch15:        0015-aplay-Add-include-files-for-mkdir.patch
Patch16:        0016-aplay-Use-standard-endian-convesions.patch
Patch17:        0017-speaker-test.1-Clarify-man-page-by-giving-examples.patch
Patch18:        0018-alsa-utils-amixer-Fix-SND_CTL_TLVT_DB_RANGE-handling.patch
Patch19:        0019-aplay-increase-channel-limit-to-256.patch
Patch20:        0020-fix-use-of-SED.patch
Patch21:        0021-alsamixer-Fix-X-win-related-crash-for-PulseAudio-plu.patch
Patch22:        0022-alsactl-Initialize-Front-Speaker-etc.patch
Patch99:        alsa-utils-gettext-version-removal.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

This package contains utility programs supporting ALSA, Advanced Linux
Sound Architecture.

%setup -q -n %{name}-%{package_version}
# fix stupid automake's automatic action
sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/'
# rm -f po/Makefile* po/*.gmo po/*.pot po/*.header po/stamp-*
# patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%if %suse_version < 1020
%patch99 -p1

export AUTOMAKE_JOBS="%{?_smp_mflags}"
%if %suse_version < 1020
gettextize -f
autoreconf -fi
%if %use_systemd
opts="$opts --with-systemdsystemunitdir=/lib/systemd/system"
%if ! %use_varlib
opts="$opts --with-asound-state-dir=/etc"
%if %suse_version < 1030
opts="$opts --disable-xmlto"
%configure --with-curses=ncursesw $opts
make %{?_smp_mflags}

%find_lang %{name} --all-name
%if %use_systemd
ln -s alsa-restore.service $RPM_BUILD_ROOT/lib/systemd/system/alsasound.service
%if %use_varlib
mkdir -p $RPM_BUILD_ROOT/var/lib/alsa

%files -f %{name}.lang
%defattr(-, root, root)
%doc seq/aconnect/README*
%doc seq/aseqnet/README*
%doc %{_mandir}/man*/*
%doc %{_mandir}/fr
%if %use_systemd
%if %use_varlib

openSUSE Build Service is sponsored by