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

# norootforbuild

%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
AutoReqProv:    on
Summary:        Advanced Linux Sound Architecture Utilities
Release:        1
# Patch:          alsa-utils-git-fixes.diff
Patch99:        alsa-utils-gettext-version-removal.diff
# Patch100:       alsa-utils-po-pre-patch.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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

    Jaroslav Kysela <>
    Takashi Iwai <>

%setup -q -n %{name}-%{package_version}
# fix stupid automake's automatic action
sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/'
# fix po changes in tarball first
# %patch100 -p1
# rm -f po/Makefile* po/*.gmo po/*.pot po/*.header po/stamp-*
# %%patch -p1
%if %suse_version < 1020
%patch99 -p1

export AUTOMAKE_JOBS=%{?jobs:%jobs}
%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 %{?jobs:-j %jobs}

%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

[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%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