File blackwidowcontrol.spec of Package blackwidowcontrol

#
# spec file
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2018 Martchus
#
# 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/
#


%define reponame blackwidowcontrol

# prevent `Empty %files file /home/abuild/rpmbuild/BUILD/.../debugsourcefiles.list` as of Fedora 41
%global debug_package %{nil}

Name:           %{reponame}
Version:        1.2.0
Release:        0
Summary:        Enable macro keys of the Razer BlackWidow keyboard
License:        GPL-2.0-or-later
Group:          Development/Libraries/C and C++
URL:            https://github.com/Martchus/%{reponame}
Source:         https://github.com/Martchus/%{reponame}/archive/v%{version}/%{reponame}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       python3-pyusb

%description
Python script to enable macro keys of the Razer BlackWidow keyboard under GNU/Linux

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

%install
install -Dm755 "blackwidowcontrol.py" "%{buildroot}/%{_bindir}/blackwidowcontrol"
install -Dm644 "razer_blackwidow.rules" "%{buildroot}/etc/udev/rules.d/70-razer_blackwidow.rules"

%files
%defattr(-,root,root)
%{_bindir}/blackwidowcontrol
%{_sysconfdir}/udev/
%{_sysconfdir}/udev/rules.d/
%{_sysconfdir}/udev/rules.d/70-razer_blackwidow.rules

%changelog
openSUSE Build Service is sponsored by