File qastools.spec of Package qastools

#
# spec file for package qastools
#
# Copyright (c) 2016 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/
#

Name:		qastools
Version:	0.21.0
Release:	0
License:	GPL
Vendor:		Sebastian Holtermann <sebholt@xwmw.org>
URL:		http://xwmw.org/qastools/
Source:		http://sourceforge.net/project/qastools/%{version}/%{name}_%{version}.tar.xz
Group:		Productivity/Multimedia/Sound/Mixers
Summary:	Qt-based ALSA tools
BuildRequires:	gcc-c++
BuildRequires:	cmake
BuildRequires:	cmake(Qt5Svg)
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  libqt5-linguist-devel
BuildRequires:	hicolor-icon-theme
BuildRequires:	pkgconfig
BuildRequires:	pkgconfig(alsa)
BuildRequires:	pkgconfig(libudev)
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif  
BuildRoot:	%{_tmppath}/%{name}-%{version}-build

%package	-n qasmixer
Summary:	ALSA simple mixer
Group:		Utility
Requires:	%{name}

%package	-n qashctl
Summary:	ALSA complex mixer
Group:		Utility
Requires:	%{name}

%package	-n qasconfig
Summary:	ALSA config browser
Group:		Utility
Requires:	%{name}

%description
QasTools is a collection of desktop applications for the Linux sound system ALSA.
At the current stage it contains two mixer applications and a configuration browser.

%description	-n qasmixer
QasMixer is a desktop mixer application for ALSA's "Simple Mixer Interface".
This is the same interface that gets used by the console alsamixer.

%description	-n qashctl
Mixer for ALSA's more complex "High level Control Interface".

%description	-n qasconfig
ALSA's configuration resides in a tree structure which gets built from the contents of the configuration files /etc/asound.conf and ~/.asoundrc.
QasConfig is a graphical browser for the configuration tree and can help to analyze and debug an ALSA setup. 

%prep
%setup -q -n %{name}_%{version}

%build
mkdir build
pushd build
cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=release
make
popd

%install
%{__rm} -rf %{buildroot}
pushd build
make DESTDIR=%{buildroot} install
popd
%if 0%{?suse_version}
	%suse_update_desktop_file qasmixer
	%suse_update_desktop_file qashctl
	%suse_update_desktop_file qasconfig
%endif
# hack
#rm -rf %{buildroot}/%{_datadir}/doc

%clean
%{__rm} -rf %{buildroot}

%post -n qasmixer
%icon_theme_cache_post

%post -n qashctl
%icon_theme_cache_post

%post -n qasconfig
%icon_theme_cache_post

%postun -n qasmixer
%icon_theme_cache_postun

%postun -n qashctl
%icon_theme_cache_postun

%postun -n qasconfig
%icon_theme_cache_postun

%files
%defattr(-,root,root,-)
%doc CHANGELOG COPYING README TODO
%{_datadir}/%{name}/

%files	-n qasmixer
%defattr(-,root,root,-)
%{_bindir}/qasmixer
%{_datadir}/applications/qasmixer.desktop
%{_datadir}/icons/hicolor/*/apps/qasmixer.*
%{_mandir}/man?/qasmixer.?.gz

%files	-n qashctl
%defattr(-,root,root,-)
%{_bindir}/qashctl
%{_datadir}/applications/qashctl.desktop
%{_datadir}/icons/hicolor/*/apps/qashctl.*
%{_mandir}/man?/qashctl.?.gz

%files	-n qasconfig
%defattr(-,root,root,-)
%{_bindir}/qasconfig
%{_datadir}/applications/qasconfig.desktop
%{_datadir}/icons/hicolor/*/apps/qasconfig.*
%{_mandir}/man?/qasconfig.?.gz

%changelog
* Sun Mar 11 2012 TI_Eugene <ti.eugene@gmail.com> 0.17.1
- Next version (as QasTools)

* Tue Mar 15 2011 TI_Eugene <ti.eugene@gmail.com> 0.9.0
- Next version

* Fri Feb 04 2011 TI_Eugene <ti.eugene@gmail.com> 0.7.0
- Next version (as qamixer)

* Fri Jan 07 2011 TI_Eugene <ti.eugene@gmail.com> 0.6.0
- Initial build on OBS (as alsamixer-qt)