# Generated by rust2rpm 27 %bcond check 1 # prevent library files from being installed %global cargo_install_lib 0 %global crate solo2 Name: rust-solo2 Version: 0.2.2 Release: %autorelease Summary: Library and CLI for the SoloKeys Solo 2 security key License: Apache-2.0 OR MIT URL: https://crates.io/crates/solo2 Source: %{crates_source} Source: https://github.com/xanderlent/solokeys-rpms/releases/download/rust-solo2-0.2.2-vendor-1/solo2-0.2.2-vendor.tar.xz # Manually created patch for downstream crate metadata changes # * Bump dialoguer to 0.11, compatible # * Bump indicatif to 0.18, compatible # * Bump webbrowsser to 1.0.5, compatible # * Bump x509-parser to 0.16.0, compatible Patch: solo2-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 26 BuildRequires: pkgconfig(hidapi-hidraw) BuildRequires: pkgconfig(libpcsclite) BuildRequires: pkgconfig(libudev) # The vendored spec fails on ppc64le/s390x due to ring's prebuilts. Yuck. # For now, fail fast on those arches to avoid wasting community resources. ExclusiveArch: %{x86_64} %{arm64} %global _description %{expand: Library and CLI for the SoloKeys Solo 2 security key.} %description %{_description} %package -n %{crate} Summary: %{summary} # FIXME: paste output of %%cargo_license_summary here License: # FIXME # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE-APACHE %license LICENSE-MIT %license LICENSE.dependencies %license cargo-vendor.txt %doc CHANGELOG.md %doc README.md %{_bindir}/solo2 %{bash_completions_dir}/solo2.bash %{fish_completions_dir}/solo2.fish %{zsh_completions_dir}/_solo2 %prep %autosetup -n %{crate}-%{version} -p1 -a1 %cargo_prep -v vendor %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} %install %cargo_install install -Dpm 0644 target/rpm/solo2.bash -t %{buildroot}%{bash_completions_dir} install -Dpm 0644 target/rpm/solo2.fish -t %{buildroot}%{fish_completions_dir} install -Dpm 0644 target/rpm/_solo2 -t %{buildroot}%{zsh_completions_dir} %if %{with check} %check %cargo_test %endif %changelog %autochangelog