Blob Blame History Raw
# Many modules not packaged. Some of them deprecated.
%bcond_with tests

%global pypi_name linux_thermaltake_rgb
%global sys_name linux_thermaltake_riing

Name: linux-thermaltake-rgb
Version: 0.2.0
Release: 1%{?dist}
Summary: Python driver and daemon to control thermaltake Riing fans and pumps
BuildArch: noarch

License: GPLv2

# GitHub source because pypi version outdated
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz

BuildRequires: python3-devel
BuildRequires: systemd-rpm-macros
BuildRequires: python3dist(setuptools)

%if %{with tests}
# BuildRequires: python3dist(base_test_object)
# BuildRequires: python3dist(pep8)
# BuildRequires: python3dist(usb)
BuildRequires: python3dist(pytest)

Linux driver and daemon for Thermaltake Riing

Currently supported devices are (as they show up in thermaltakes TTRGBPLUS

- Flow Riing RGB
- Lumi Plus LED Strip
- Pacific PR22-D5 Plus
- Pacific Rad Plus LED Panel
- Pacific V-GTX 1080Ti Plus GPU Waterblock
- Pacific W4 Plus CPU Waterblock
- Riing Plus

%autosetup -n %{sys_name}-%{version} -p1
sed -i 's/PROJECTVERSION/%{version}/g'

# fix wrong package requirement for GObject
sed -i 's/GObject/PyGObject/g'

# Remove bundled egg-info
rm -rf %{name}.egg-info



mkdir -p %{buildroot}%{_unitdir}
mv %{buildroot}%{_datadir}/%{pypi_name}/%{name}.service \

mkdir -p %{buildroot}%{_sysconfdir}/%{pypi_name}
mv %{buildroot}%{_datadir}/%{pypi_name}/config.yml \

%if %{with tests}
%{python3} -m pytest -v

%systemd_post %{name}.service

%systemd_preun %{name}.service

%systemd_postun_with_restart %{name}.service

%license LICENSE.txt
%doc roadmap.txt protocol.txt
%config(noreplace) %{_sysconfdir}/%{pypi_name}/config.yml
%dir %{_sysconfdir}/%{pypi_name}

* Sun Jan 31 2021 Artem Polishchuk <> - 0.2.0-1
- Initial package