File rust-komac.spec of Package komac
Name: Komac
# This will be set by osc services, that will run after this.
Version: 2.5.0~0
Release: 1
Summary: Manifest creator for winget-pkgs
# If you know the license, put it's SPDX string here.
# Alternately, you can use cargo lock2rpmprovides to help generate this.
License: GPL-3.0
Url: https://github.com/russellbanks/Komac
Source0: Komac-%{version}.tar.zst
Source1: vendor.tar.zst
BuildRequires: cargo-packaging
# Disable this line if you wish to support all platforms.
# In most situations, you will likely only target tier1 arches for user facing components.
# ExclusiveArch: %{rust_tier1_arches}
%description
Komac is an advanced CLI designed to create manifests for the WinGet Community Repository.
Komac is both blazingly fast 🔥 and incredibly low on memory
%prep
# The number passed to -a (a stands for "after") should be equivalent to the Source tag number
# of the vendor tarball, 1 in this case (from Source1).
%autosetup -p1 -a1
# Remove exec bits to prevent an issue in fedora shebang checking. Uncomment only if required.
# find vendor -type f -name \*.rs -exec chmod -x '{}' \;
%build
%{cargo_build}
%install
# using cargo_install (only supports bindir)
%{cargo_install}
# manual process, this can place binaries in other directories like sbindin
# install -D -d -m 0755 %{buildroot}%{_bindir}
# install -m 0755 %{_builddir}/%{name}-%{version}/target/release/%{name} %{buildroot}%{_bindir}/%{name}
%check
%{cargo_test}
%files
%license src/types/license.rs
%license src/types/urls/license_url.rs
%license LICENSE.dependencies
%doc README.md
%{_bindir}/%{name}
%changelog