rust-sequoia-sq/rust2rpm.toml
Jakub Jelen 56ab30f457 Make installation of shell completions and man pages more robust
Without this, OpenScanHub fails to run the install step as it injects
clippy build into the process, which creates different configuration and
therefore different build directory.

Taken from Fedora change

1bcf609430

Related: RHEL-84033
2025-03-27 15:50:33 +01:00

40 lines
1.2 KiB
TOML

[package]
cargo-toml-patch-comments = [
"switch crypto backend from Nettle to OpenSSL",
"exclude files that are only useful for upstream development",
"drop automated generation of upstream integration tests",
"drop features for unsupported crypto backends",
]
extra-files = [
"%{_mandir}/man1/sq*",
"%{bash_completions_dir}/sq.bash",
"%{fish_completions_dir}/sq.fish",
"%{zsh_completions_dir}/_sq",
]
doc-files.exclude = [
"sq-subplot.md",
]
[scripts]
prep.post = [
"# drop broken integration tests",
"rm -vr subplot/",
"rm -v tests/sq-subplot.rs",
]
build.pre = [
"export ASSET_OUT_DIR=target/assets",
]
install.post = [
"# install manual pages",
"mkdir -p %{buildroot}/%{_mandir}/man1",
"cp -pav target/assets/man-pages/sq*.1 %{buildroot}/%{_mandir}/man1/",
"# install shell completions",
"install -Dpm 0644 target/assets/shell-completions/sq.bash \\",
" %{buildroot}/%{bash_completions_dir}/sq.bash",
"install -Dpm 0644 target/assets/shell-completions/sq.fish \\",
" %{buildroot}/%{fish_completions_dir}/sq.fish",
"install -Dpm 0644 target/assets/shell-completions/_sq \\",
" %{buildroot}/%{zsh_completions_dir}/_sq",
]