# Taken from official packaging
Name:           HeadsetControl
Version:        2.7.0
Release:        1%{?dist}
Summary:        A tool to control certain aspects of USB-connected headsets on Linux
# The entire source code is GPLv3+ except cmake_modules/Findhidapi.cmake which is Boost
License:        GPLv3+ and Boost 
URL:            https://github.com/Sapd/HeadsetControl
Source0:        %{url}/archive/refs/tags/%{version}.tar.gz

BuildRequires:  gcc-c++
BuildRequires:  cmake
BuildRequires:  hidapi-devel

%description
A tool to control certain aspects of USB-connected headsets on Linux

%prep
%setup -q -n HeadsetControl-%{version}

%build
%cmake
%cmake_build


%install
%cmake_install

%check
%ctest

%files
%{_bindir}/headsetcontrol
%{_prefix}/lib/udev/rules.d/70-headsets.rules
%license license
%doc README.md