%bcond_without check %bcond_without vendor %global cargo_install_lib 0 %if %{with vendor} %global _cargo_generate_buildrequires 0 %endif Name: fastboop Version: 0.0.1 Release: 1.20260208203841275965.main%{?dist} Summary: Ephemeral Linux boot tool for USB-enabled pocket computers License: GPL-3.0-only URL: https://github.com/samcday/fastboop Source: fastboop-0.0.1.tar.gz BuildRequires: cargo-rpm-macros >= 24 BuildRequires: clang-devel BuildRequires: pkgconfig(libusb-1.0) %description fastboop ephemerally boots Linux installations on pocket computers that expose a non-mutating USB-enabled bootloader interface (i.e. fastboot), without flashing or permanently modifying the device. %prep %autosetup -n fastboop-0.0.1 -p1 %if %{with vendor} %{__cargo} vendor --locked --versioned-dirs vendor %cargo_prep -v vendor %else %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %endif %build %cargo_build %cargo_vendor_manifest %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install install -Dpm0755 target/rpm/fastboop-cli \ %{buildroot}%{_bindir}/fastboop %if %{with check} %check %cargo_test %endif %files %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %doc README.md %{_bindir}/fastboop %changelog %autochangelog