File qastools.spec of Package qastools
#
# spec file for package qastools
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: qastools
Version: 0.23.0
Release: 0
Summary: Qt-based ALSA tools
License: GPL
Group: Productivity/Multimedia/Sound/Mixers
URL: https://gitlab.com/sebholt/qastools
Source: https://gitlab.com/sebholt/qastools/-/archive/v%{version}/%{name}-v%{version}.tar.bz2
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: libqt5-linguist-devel
BuildRequires: libqt5-qtbase-devel
BuildRequires: pkgconfig
BuildRequires: cmake(Qt5Svg)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(libudev)
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
%package -n qasmixer
Summary: ALSA simple mixer
Group: Productivity/Multimedia/Sound/Utilities
Requires: %{name}
%package -n qashctl
Summary: ALSA complex mixer
Group: Productivity/Multimedia/Sound/Utilities
Requires: %{name}
%package -n qasconfig
Summary: ALSA config browser
Group: Productivity/Multimedia/Sound/Utilities
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 %{_sysconfdir}/asound.conf and ~/.asoundrc.
QasConfig is a graphical browser for the configuration tree and can help to analyze and debug an ALSA setup.
%prep
%autosetup -p1 -n %{name}-v%{version}
%build
mkdir build
pushd build
# FIXME: you should use the %%cmake macros
cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=release
%make_build
popd
%install
pushd build
%make_install
popd
%if 0%{?suse_version}
%suse_update_desktop_file qasmixer
%suse_update_desktop_file qashctl
%suse_update_desktop_file qasconfig
%endif
%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
%license COPYING
%doc CHANGELOG TODO
%{_datadir}/%{name}/
%files -n qasmixer
%{_bindir}/qasmixer
%{_datadir}/applications/qasmixer.desktop
%{_datadir}/icons/hicolor/*/apps/qasmixer.*
%{_mandir}/man?/qasmixer.?.gz
%{_datadir}/metainfo/qasmixer.appdata.xml
%files -n qashctl
%{_bindir}/qashctl
%{_datadir}/applications/qashctl.desktop
%{_datadir}/icons/hicolor/*/apps/qashctl.*
%{_mandir}/man?/qashctl.?.gz
%{_datadir}/metainfo/qashctl.appdata.xml
%files -n qasconfig
%{_bindir}/qasconfig
%{_datadir}/applications/qasconfig.desktop
%{_datadir}/icons/hicolor/*/apps/qasconfig.*
%{_mandir}/man?/qasconfig.?.gz
%{_datadir}/metainfo/qasconfig.appdata.xml
%changelog