%global commit0 1e72330c4a457d7939c894f4934d334b5b9c4380 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global bumpver 0 Name: matugen-git Version: 2.4.1%{?bumpver:^%{bumpver}.git%{shortcommit0}} Release: %autorelease Summary: matugen License: GPL-2.0-only URL: https://github.com/InioX/matugen Source0: %{url}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz BuildRequires: cargo-rpm-macros Obsoletes: matugen < %{version}-%{release} %description A material you color generation tool with templates %prep %autosetup -n matugen-%{commit0} cargo vendor %cargo_prep -v vendor %build %cargo_build %install install -Dm755 target/release/matugen -t %{buildroot}%{_bindir} %files %license LICENSE %doc CHANGELOG.md README.md %{_bindir}/matugen %changelog %autochangelog