# Generated by rust2rpm 28 %bcond check 1 # prevent library files from being installed %global cargo_install_lib 0 %global crate sequoia-git Name: rust-sequoia-git Version: 0.4.0 Release: %autorelease Summary: Tool for managing and enforcing a commit signing policy License: LGPL-2.0-or-later URL: https://crates.io/crates/sequoia-git Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * switch crypto backend from Nettle to OpenSSL # * bump git2 dependency from v0.19 to v0.20 # * bump toml dependency from v0.8 to v0.9 # * drop noop vergen build-dependency Patch: sequoia-git-fix-metadata.diff # * proposed fixes for shell completion generation logic Patch2: https://gitlab.com/sequoia-pgp/sequoia-git/-/merge_requests/100.patch # * drop references to vergen (no git repository state available) Patch3: 0001-drop-references-to-vergen.patch BuildRequires: cargo-rpm-macros >= 26 %if %{with check} BuildRequires: faketime BuildRequires: git-core %endif %global _description %{expand: A tool for managing and enforcing a commit signing policy.} %description %{_description} %package -n %{crate} Summary: %{summary} # (Apache-2.0 OR MIT) AND BSD-3-Clause # (MIT OR Apache-2.0) AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND MIT # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # 0BSD OR MIT OR Apache-2.0 # Apache-2.0 # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-2-Clause OR Apache-2.0 OR MIT # BSD-3-Clause # BSL-1.0 # LGPL-2.0-or-later # MIT # MIT OR Apache-2.0 # MIT OR Apache-2.0 OR Zlib # MIT OR Zlib OR Apache-2.0 # MPL-2.0 # Unicode-3.0 # Unlicense OR MIT # Zlib # Zlib OR Apache-2.0 OR MIT # bzip2-1.0.6 License: %{shrink: LGPL-2.0-or-later AND Apache-2.0 AND BSD-3-Clause AND BSL-1.0 AND GPL-2.0-only WITH GCC-exception-2.0 AND MIT AND MPL-2.0 AND Unicode-3.0 AND Unicode-DFS-2016 AND Zlib AND bzip2-1.0.6 AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT) } # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE.txt %license LICENSE.dependencies %doc NEWS %doc README.md %{_bindir}/sq-git %{_mandir}/man1/sq-git* %{bash_completions_dir}/sq-git.bash %{fish_completions_dir}/sq-git.fish %{zsh_completions_dir}/_sq-git %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build export ASSET_OUT_DIR=target/assets %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install %cargo_install # install manual pages mkdir -p %{buildroot}/%{_mandir}/man1 cp -pav target/assets/man-pages/sq-git*.1 %{buildroot}/%{_mandir}/man1/ # install shell completions install -Dpm 0644 target/assets/shell-completions/sq-git.bash \ %{buildroot}/%{bash_completions_dir}/sq-git.bash install -Dpm 0644 target/assets/shell-completions/sq-git.fish \ %{buildroot}/%{fish_completions_dir}/sq-git.fish install -Dpm 0644 target/assets/shell-completions/_sq-git \ %{buildroot}/%{zsh_completions_dir}/_sq-git %if %{with check} %check %cargo_test %endif %changelog %autochangelog