Accepting request 667885 from multimedia:libs

OBS-URL: https://build.opensuse.org/request/show/667885
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/alsa-utils?expand=0&rev=114
This commit is contained in:
Dominique Leuenberger 2019-01-26 21:18:41 +00:00 committed by Git OBS Bridge
commit 11b7d97e1b
2 changed files with 28 additions and 52 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Jan 22 12:27:31 CET 2019 - tiwai@suse.de
- Remove the ugly conditionals to build for (too) old distros
- Drop alsaconf script that rather brings the inconsistent setup
on modern systems
- Move alsabat-test.sh into alsabat package, too
- Run spec-cleaner
-------------------------------------------------------------------
Tue Jan 8 12:23:11 CET 2019 - tiwai@suse.de

View File

@ -12,33 +12,18 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?suse_version} > 1130
%define use_systemd 1
%define use_varlib 1
%if 0%{?suse_version} == 1140
%define _unitdir /lib/systemd/system
%endif
BuildRequires: systemd
%else
%define use_systemd 0
%define use_varlib 0
%endif
%if 0%{?suse_version} > 1200
%define _udevdir %(pkg-config --variable=udevdir udev)
%else
%define _udevdir /lib/udev
%endif
Name: alsa-utils
Version: 1.1.8
Release: 0
Summary: Advanced Linux Sound Architecture Utilities
License: GPL-2.0-or-later
Group: Productivity/Multimedia/Sound/Players
Url: http://www.alsa-project.org/
URL: http://www.alsa-project.org/
Source: ftp://ftp.alsa-project.org/pub/utils/alsa-utils-%{version}.tar.bz2
Source1: 01beep.conf
Patch101: alsa-utils-configure-version-revert.patch
@ -48,15 +33,13 @@ BuildRequires: fftw3-devel
BuildRequires: libsamplerate-devel
BuildRequires: ncurses-devel
BuildRequires: pkgconfig
BuildRequires: systemd
BuildRequires: xmlto
BuildRequires: pkgconfig(udev)
Requires: alsa
# for alsa-info.sh
Requires: dialog
Requires: pciutils
Provides: alsa-conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1200
BuildRequires: pkgconfig(udev)
%endif
%description
This package contains utility programs supporting ALSA, Advanced Linux
@ -86,67 +69,51 @@ export AUTOMAKE_JOBS="%{?_smp_mflags}"
%if 0%{?do_autoreconf}
autoreconf -fi
%endif
opts=""
%if %{use_systemd}
opts="$opts --with-systemdsystemunitdir=%{_unitdir}"
%endif
%if ! %{use_varlib}
opts="$opts --with-asound-state-dir=/etc"
%endif
opts="$opts --with-udev-rules-dir=%{_udevdir}/rules.d"
%configure --with-curses=ncursesw $opts
%configure --with-curses=ncursesw \
--with-systemdsystemunitdir=%{_unitdir} \
--with-asound-state-dir=%{_sysconfdir} \
--with-udev-rules-dir=%{_udevdir}/rules.d
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
%make_install
mkdir -p %{buildroot}%{_datadir}/alsa/init/preinit
mkdir -p %{buildroot}%{_datadir}/alsa/init/postinit
for i in %{_sourcedir}/[0-9]*.conf; do
install -c -m 0644 $i %{buildroot}%{_datadir}/alsa/init/postinit
done
# remove obsoleted alsaconf script
rm -f %{buildroot}%{_sbindir}/alsaconf
rm -f %{buildroot}%{_datadir}/locale/*/*/alsaconf.mo
rm -f %{buildroot}%{_mandir}/*/man*/alsaconf.*
rm -f %{buildroot}%{_mandir}/man*/alsaconf.*
%find_lang %{name} --all-name
%if %{use_systemd}
ln -s alsa-restore.service %{buildroot}%{_unitdir}/alsasound.service
%endif
%if %{use_varlib}
mkdir -p %{buildroot}%{_localstatedir}/lib/alsa
%endif
%files -f %{name}.lang
%defattr(-, root, root)
%if 0%{?suse_version} >= 1200
%license COPYING
%else
%doc COPYING
%endif
%doc ChangeLog INSTALL README.md TODO
%doc seq/aconnect/README*
%doc seq/aseqnet/README*
%{_mandir}/man*/*
%{_mandir}/fr
%{_bindir}/*
%exclude %{_bindir}/alsabat
%exclude %{_mandir}/man*/alsabat.*
%{_sbindir}/*
%exclude %{_bindir}/alsabat
%exclude %{_sbindir}/alsabat-test.sh
%exclude %{_mandir}/man*/alsabat.*
%{_datadir}/sounds/alsa
%{_datadir}/alsa
%{_udevdir}
%if %{use_systemd}
%{_unitdir}/*.service
%{_unitdir}/sound.target.wants
%endif
%if %{use_varlib}
%{_localstatedir}/lib/alsa
%endif
%files -n alsabat
%defattr(-, root, root)
%if 0%{?suse_version} >= 1200
%license COPYING
%else
%doc COPYING
%endif
%{_bindir}/alsabat
%{_sbindir}/alsabat-test.sh
%{_mandir}/man*/alsabat.*
%changelog