From b9a07f6f9eb6247394af31a1d4b17c1fa848c5c1 Mon Sep 17 00:00:00 2001 From: Artem Polishchuk Date: Mar 10 2021 23:56:00 +0000 Subject: Initial import --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..118a6c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/linux-thermaltake-rgb-0.2.0.tar.gz diff --git a/linux-thermaltake-rgb.spec b/linux-thermaltake-rgb.spec new file mode 100644 index 0000000..e403900 --- /dev/null +++ b/linux-thermaltake-rgb.spec @@ -0,0 +1,102 @@ +# 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 +URL: https://github.com/chestm007/linux_thermaltake_riing + +# 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) +%endif + +%description +Linux driver and daemon for Thermaltake Riing + +Currently supported devices are (as they show up in thermaltakes TTRGBPLUS +software: + +- 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 + + +%prep +%autosetup -n %{sys_name}-%{version} -p1 +sed -i 's/PROJECTVERSION/%{version}/g' setup.py + +# fix wrong package requirement for GObject +# https://github.com/chestm007/linux_thermaltake_riing/pull/37 +sed -i 's/GObject/PyGObject/g' setup.py + +# Remove bundled egg-info +rm -rf %{name}.egg-info + + +%build +%py3_build + + +%install +%py3_install + +mkdir -p %{buildroot}%{_unitdir} +mv %{buildroot}%{_datadir}/%{pypi_name}/%{name}.service \ + %{buildroot}%{_unitdir} + +mkdir -p %{buildroot}%{_sysconfdir}/%{pypi_name} +mv %{buildroot}%{_datadir}/%{pypi_name}/config.yml \ + %{buildroot}%{_sysconfdir}/%{pypi_name} + + +%if %{with tests} +%check +%{python3} -m pytest -v +%endif + + +%post +%systemd_post %{name}.service + +%preun +%systemd_preun %{name}.service + +%postun +%systemd_postun_with_restart %{name}.service + + +%files +%license LICENSE.txt +%doc README.md roadmap.txt protocol.txt +%config(noreplace) %{_sysconfdir}/%{pypi_name}/config.yml +%dir %{_sysconfdir}/%{pypi_name} +%{_bindir}/%{name} +%{_unitdir}/*.service +%{python3_sitelib}/%{pypi_name}-%{version}-py*.egg-info/ +%{python3_sitelib}/%{pypi_name}/ + + +%changelog +* Sun Jan 31 2021 Artem Polishchuk - 0.2.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..f66d221 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (linux-thermaltake-rgb-0.2.0.tar.gz) = a1aede29008882adcc1f15b6d2ad3aa098239104b3cdcb757e92f8e030c1c76d5a73aa8dad4371f0de4cbd8d421dc3a5972c96625df2012e95495547ac4e4e0b