This repository has been archived on 2026-04-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
hf-cli-rpm/hf-cli.spec
T
demus e434796e4b
Build and provide rpm of demus profiles / rpmbuild (release) Failing after 59s
Release 1.0.0: hf-cli rpm and systemd timer
2025-02-07 11:09:15 +01:00

82 lines
2.0 KiB
RPMSpec

%{?!python3_pkgversion:%global python3_pkgversion 3}
%global srcname hf-cli
%global subpackage user-systemd
%global debug_package %{nil}
Name: hf-cli
Version: 1.1.0
Release: 1%{?dist}
Summary: Huafetcher CLI
License: GPL-3.0-or-later
URL: https://git.demus.dk/demus/hf-cli
Source0: https://git.demus.dk/demus/%{name}/archive/%{version}.tar.gz
Source1: hf-cli.service
Source2: hf-cli.timer
Source3: README-%{subpackage}.md
BuildRequires: python3-devel
BuildRequires: pyproject-srpm-macros
%description
If you use GadgetBridge with an AmazFit gadget, you have probably used
Huafetcher to get keys and update aGPS.
This project extracts the non-Kivy parts of Huafetcher into a cli app,
that can be used to get keys or various forms of aGPS files from the
command-line or for example on a daily schedule.
%package %subpackage
Summary: Huafetcher CLI systemd user unit
BuildRequires: systemd-rpm-macros
%{?%systemd_requires}
%description user-systemd
Contains a systemd user unit and timer to automate downloading of fresh
agps files to a selected location ready to be flashed onto your gagdet.
%post %subpackage
%systemd_user_post %{name}.service %{name}.timer
%preun %subpackage
%systemd_user_preun %{name}.service %{name}.timer
%postun %subpackage
%systemd_user_postun %{name}.service %{name}.timer
%prep
%autosetup -p1 -n %{srcname}
%{__cp} %{SOURCE3} .
%generate_buildrequires
%pyproject_buildrequires -p
%build
%pyproject_wheel
%check
%pyproject_check_import
%pytest
%install
# rm -rf $RPM_BUILD_ROOT
%pyproject_install
%pyproject_save_files -L hf_cli +auto
install -m 0755 -vd %{buildroot}%{_userunitdir}
install -D -m 0644 -vp %{SOURCE1} %{buildroot}%{_userunitdir}/%{name}.service
install -D -m 0644 -vp %{SOURCE2} %{buildroot}%{_userunitdir}/%{name}.timer
%files -f %{pyproject_files}
%license LICENSE
%doc README.md
%files %subpackage
%license LICENSE
%dnl %doc README-%{subpackage}.md
%{_userunitdir}/*
%changelog
* Fri Nov 15 2024 Daniel Demus <dde@nine.dk>
- Initial release