File cargo-bininstall.spec of Package cargo-binstall

#
# spec file for package cargo-binstall
#
# Copyright (c) 2025 mantarimay
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%bcond_without test
Name:           cargo-binstall
Version:        1.10.19
Release:        0
Summary:        Binary installation for rust projects
License:        GPL-3.0-or-later
URL:            https://github.com/cargo-bins/cargo-binstall
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1:        vendor.tar.zst
BuildRequires:  cargo-packaging

%description
Binstall provides a low-complexity mechanism for installing Rust binaries
as an alternative to building from source (via cargo install) or manually
downloading packages. This is intended to work with existing CI artifacts
and infrastructure, and with minimal overhead for package maintainers.

%prep
%autosetup -a1 -p1

%build
%{cargo_build}

%install
install -Dm755 target/release/%{name} -t %{buildroot}%{_bindir}

%if %{with test}
%check
%{cargo_test} -- \
    --skip=quickinstall::test::test_get_quickinstall_supported_targets \
    --skip=download::test::test_and_extract \
    --skip=test::test_crates_io_git_registry \
    --skip=test::test_crates_io_sparse_registry \
    --skip=test::test_ignore_dot_git_for_github_repos \
    --skip=gh_api_client::test::rate_limited_test_get_repo_info \
    --skip=gh_api_client::test::rate_limited_test_has_release_artifact_and_download_artifacts
%endif

%files
%license crates/bin/LICENSE
%doc README*
%{_bindir}/%{name}

%changelog
openSUSE Build Service is sponsored by