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
790309acb1
Related: RHEL-84164
This commit is contained in:
parent
54cdde1a2d
commit
ca2cf7466f
@ -108,6 +108,7 @@ License: %{shrink:
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
export ASSET_OUT_DIR=target/assets
|
||||||
%cargo_build
|
%cargo_build
|
||||||
%{cargo_license_summary}
|
%{cargo_license_summary}
|
||||||
%{cargo_license} > LICENSE.dependencies
|
%{cargo_license} > LICENSE.dependencies
|
||||||
@ -116,13 +117,13 @@ License: %{shrink:
|
|||||||
%cargo_install
|
%cargo_install
|
||||||
# install manual pages
|
# install manual pages
|
||||||
mkdir -p %{buildroot}/%{_mandir}/man1
|
mkdir -p %{buildroot}/%{_mandir}/man1
|
||||||
cp -pav target/release/build/%{crate}-*/out/man-pages/sqv*.1 %{buildroot}/%{_mandir}/man1/
|
cp -pav target/assets/man-pages/sqv*.1 %{buildroot}/%{_mandir}/man1/
|
||||||
# install shell completions
|
# install shell completions
|
||||||
install -Dpm 0644 target/release/build/%{crate}-*/out/shell-completions/sqv.bash \
|
install -Dpm 0644 target/assets/shell-completions/sqv.bash \
|
||||||
%{buildroot}/%{bash_completions_dir}/sqv.bash
|
%{buildroot}/%{bash_completions_dir}/sqv.bash
|
||||||
install -Dpm 0644 target/release/build/%{crate}-*/out/shell-completions/sqv.fish \
|
install -Dpm 0644 target/assets/shell-completions/sqv.fish \
|
||||||
%{buildroot}/%{fish_completions_dir}/sqv.fish
|
%{buildroot}/%{fish_completions_dir}/sqv.fish
|
||||||
install -Dpm 0644 target/release/build/%{crate}-*/out/shell-completions/_sqv \
|
install -Dpm 0644 target/assets/shell-completions/_sqv \
|
||||||
%{buildroot}/%{zsh_completions_dir}/_sqv
|
%{buildroot}/%{zsh_completions_dir}/_sqv
|
||||||
|
|
||||||
%if %{with check}
|
%if %{with check}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
cargo-toml-patch-comments = [
|
cargo-toml-patch-comments = [
|
||||||
"switch crypto backend from Nettle to OpenSSL",
|
"switch crypto backend from Nettle to OpenSSL",
|
||||||
"exclude files that are only useful for upstream development",
|
|
||||||
"drop features for unsupported crypto backends",
|
"drop features for unsupported crypto backends",
|
||||||
]
|
]
|
||||||
extra-files = [
|
extra-files = [
|
||||||
@ -12,16 +11,19 @@ extra-files = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[scripts]
|
[scripts]
|
||||||
|
build.pre = [
|
||||||
|
"export ASSET_OUT_DIR=target/assets",
|
||||||
|
]
|
||||||
install.post = [
|
install.post = [
|
||||||
"# install manual pages",
|
"# install manual pages",
|
||||||
"mkdir -p %{buildroot}/%{_mandir}/man1",
|
"mkdir -p %{buildroot}/%{_mandir}/man1",
|
||||||
"cp -pav target/release/build/%{crate}-*/out/man-pages/sqv*.1 %{buildroot}/%{_mandir}/man1/",
|
"cp -pav target/assets/man-pages/sqv*.1 %{buildroot}/%{_mandir}/man1/",
|
||||||
"# install shell completions",
|
"# install shell completions",
|
||||||
"install -Dpm 0644 target/release/build/%{crate}-*/out/shell-completions/sqv.bash \\",
|
"install -Dpm 0644 target/assets/shell-completions/sqv.bash \\",
|
||||||
" %{buildroot}/%{bash_completions_dir}/sqv.bash",
|
" %{buildroot}/%{bash_completions_dir}/sqv.bash",
|
||||||
"install -Dpm 0644 target/release/build/%{crate}-*/out/shell-completions/sqv.fish \\",
|
"install -Dpm 0644 target/assets/shell-completions/sqv.fish \\",
|
||||||
" %{buildroot}/%{fish_completions_dir}/sqv.fish",
|
" %{buildroot}/%{fish_completions_dir}/sqv.fish",
|
||||||
"install -Dpm 0644 target/release/build/%{crate}-*/out/shell-completions/_sqv \\",
|
"install -Dpm 0644 target/assets/shell-completions/_sqv \\",
|
||||||
" %{buildroot}/%{zsh_completions_dir}/_sqv",
|
" %{buildroot}/%{zsh_completions_dir}/_sqv",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user