|
| 1 | +%global pypi_name pi-topd |
| 2 | +%global commit eb4edb5e1649732db22520c4033a93e1c3e35d5e |
| 3 | +%global shortcommit %(c=%{commit}; echo ${c:0:7}) |
| 4 | +%global commit_date 20250123 |
| 5 | + |
| 6 | +Name: python-%{pypi_name} |
| 7 | +Version: 0~%commit_date.git~%shortcommit |
| 8 | +Release: 1%{?dist} |
| 9 | +Summary: Daemon for managing pi-top functionality by managing the pi-top hub connection |
| 10 | + |
| 11 | +License: Apache-2.0 |
| 12 | +URL: https://github.com/pi-top/pi-topd |
| 13 | +Source0: %url/archive/%commit.tar.gz |
| 14 | +BuildRequires: pyproject-rpm-macros |
| 15 | +BuildRequires: python3-devel |
| 16 | +BuildRequires: python3dist(pip) |
| 17 | +BuildRequires: python3dist(setuptools) |
| 18 | +BuildArch: noarch |
| 19 | +Packager: Jaiden Riordan <jade@fyralabs.com> |
| 20 | + |
| 21 | +%global _description %{expand: |
| 22 | +%summary. |
| 23 | +} |
| 24 | + |
| 25 | +%description %_description |
| 26 | + |
| 27 | +%package -n python3-%{pypi_name} |
| 28 | +Summary: %{summary} |
| 29 | + |
| 30 | +%description -n python3-%{pypi_name} %_description |
| 31 | + |
| 32 | +%prep |
| 33 | +%autosetup -n %{pypi_name}-%{commit} |
| 34 | + |
| 35 | +%build |
| 36 | +%if 0%{?fedora} <= 41 || 0%{?rhel} |
| 37 | +%py3_build |
| 38 | +%else |
| 39 | +%pyproject_wheel |
| 40 | +%endif |
| 41 | + |
| 42 | +%install |
| 43 | +%if 0%{?fedora} <= 41 || 0%{?rhel} |
| 44 | +%py3_install |
| 45 | +%else |
| 46 | +%pyproject_install |
| 47 | +%pyproject_save_files pitopd |
| 48 | +%endif |
| 49 | + |
| 50 | +%if 0%{?fedora} > 43 |
| 51 | +%check |
| 52 | +%pyproject_check_import |
| 53 | +%endif |
| 54 | + |
| 55 | +%if 0%{?fedora} <= 41 || 0%{?rhel} |
| 56 | +%files -n python3-%{pypi_name} |
| 57 | +%license LICENSE |
| 58 | +%doc README.rst |
| 59 | +%{python3_sitelib}/__pycache__/* |
| 60 | +%{python3_sitelib}/%{pypi_name}.py |
| 61 | +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ |
| 62 | +%else |
| 63 | +%files -n python3-%{pypi_name} -f %{pyproject_files} |
| 64 | +%license LICENSE |
| 65 | +%doc README.rst |
| 66 | +%endif |
| 67 | + |
| 68 | +%changelog |
| 69 | +* Sun Oct 26 2025 Jaiden Riordan <jade@fyralabs.com> - 5.7.0-1 |
| 70 | +- ehehehe :3 |
0 commit comments