diff --git a/.gitignore b/.gitignore index afa8efe..963bc80 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /bat-0.17.1.crate /bat-0.18.3.crate /bat-0.21.0.crate +/bat-0.23.0.crate diff --git a/README.md b/README.md deleted file mode 100644 index fa868ff..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-bat - -The rust-bat package \ No newline at end of file diff --git a/bat-fix-metadata-auto.diff b/bat-fix-metadata-auto.diff new file mode 100644 index 0000000..6729d64 --- /dev/null +++ b/bat-fix-metadata-auto.diff @@ -0,0 +1,15 @@ +--- bat-0.23.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ bat-0.23.0/Cargo.toml 2023-07-15T20:08:40.190846+00:00 +@@ -191,12 +191,6 @@ + regex-fancy = ["syntect/regex-fancy"] + regex-onig = ["syntect/regex-onig"] + +-[target."cfg(target_os = \"macos\")".dependencies.dirs] +-version = "5.0.0" +- +-[target."cfg(target_os = \"macos\")".dependencies.plist] +-version = "1.3" +- + [target."cfg(unix)".dev-dependencies.nix] + version = "0.26.2" + features = ["term"] diff --git a/bat-fix-metadata.diff b/bat-fix-metadata.diff index e310e28..17a8069 100644 --- a/bat-fix-metadata.diff +++ b/bat-fix-metadata.diff @@ -1,8 +1,16 @@ ---- bat-0.21.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ bat-0.21.0/Cargo.toml 2022-07-21T08:43:28.724045+00:00 -@@ -93,9 +93,8 @@ +--- bat-0.23.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ bat-0.23.0/Cargo.toml 2023-07-15T20:09:07.077957+00:00 +@@ -30,7 +30,6 @@ + [profile.release] + lto = true + codegen-units = 1 +-strip = true + + [dependencies.ansi_colours] + version = "^1.2" +@@ -94,9 +93,8 @@ [dependencies.once_cell] - version = "1.10" + version = "1.17" -[dependencies.path_abs] -version = "0.5" @@ -11,4 +19,4 @@ +version = "3" [dependencies.regex] - version = "1.5.5" + version = "1.7.0" diff --git a/rust-bat.spec b/rust-bat.spec index e387651..157d93f 100644 --- a/rust-bat.spec +++ b/rust-bat.spec @@ -1,10 +1,10 @@ -# Generated by rust2rpm 23 +# Generated by rust2rpm 24 %bcond_without check %global crate bat Name: rust-bat -Version: 0.21.0 +Version: 0.23.0 Release: %autorelease Summary: Cat(1) clone with wings @@ -12,7 +12,10 @@ Summary: Cat(1) clone with wings License: MIT OR Apache-2.0 URL: https://crates.io/crates/bat Source: %{crates_source} +# Automatically generated patch to strip foreign dependencies +Patch: bat-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes +# * remove compiler settings that are incompatible with RPM packaging # * Port from path_abs to path-absolutize: # https://github.com/sharkdp/bat/pull/1025 Patch: bat-fix-metadata.diff @@ -21,27 +24,30 @@ Patch: 0001-port-from-path_abs-to-path-absolutize.patch BuildRequires: rust-packaging >= 23 %global _description %{expand: -Cat(1) clone with wings.} +A cat(1) clone with wings.} %description %{_description} %package -n %{crate} Summary: %{summary} -# 0BSD or MIT or ASL 2.0 -# ASL 2.0 -# ASL 2.0 or Boost -# ASL 2.0 or MIT -# BSD -# CC0 -# LGPLv3+ +# (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 +# CC0-1.0 +# LGPL-3.0-or-later # MIT -# MIT and GPLv2 with exceptions and BSD -# MIT or ASL 2.0 -# MIT or ASL 2.0 or zlib -# MIT or zlib or ASL 2.0 -# Unlicense or MIT -# zlib or ASL 2.0 or MIT -License: ASL 2.0 and BSD and CC0 and GPLv2 with exceptions and LGPLv3+ and MIT +# MIT OR Apache-2.0 +# MIT OR Apache-2.0 OR Zlib +# MIT OR Zlib OR Apache-2.0 +# MPL-2.0 +# Unlicense OR MIT +# Zlib OR Apache-2.0 OR MIT +License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-2.0-only WITH GCC-exception-2.0 AND LGPL-3.0-or-later AND MIT AND MPL-2.0 AND Unicode-DFS-2016 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 (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT) # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} @@ -56,13 +62,9 @@ License: ASL 2.0 and BSD and CC0 and GPLv2 with exceptions and LGPLv3+ an %doc README.md %{_bindir}/bat %{_mandir}/man1/bat.1* -%{_datadir}/bash-completion/completions/bat -%dir %{_datadir}/zsh -%dir %{_datadir}/zsh/site-functions -%{_datadir}/zsh/site-functions/_bat -%dir %{_datadir}/fish -%dir %{_datadir}/fish/vendor_completions.d -%{_datadir}/fish/vendor_completions.d/bat.fish +%{bash_completions_dir}/bat.bash +%{fish_completions_dir}/bat.fish +%{zsh_completions_dir}/_bat %package devel Summary: %{summary} @@ -154,16 +156,16 @@ use the "clap" feature of the "%{crate}" crate. %files -n %{name}+clap-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+dirs-next-devel +%package -n %{name}+dirs-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+dirs-next-devel %{_description} +%description -n %{name}+dirs-devel %{_description} This package contains library source intended for building other packages which -use the "dirs-next" feature of the "%{crate}" crate. +use the "dirs" feature of the "%{crate}" crate. -%files -n %{name}+dirs-next-devel +%files -n %{name}+dirs-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+git-devel @@ -312,31 +314,21 @@ use the "wild" feature of the "%{crate}" crate. %install %cargo_install - +# install man page install -Dpm0644 target/release/build/%{crate}-*/out/assets/manual/bat.1 \ - -t %{buildroot}%{_mandir}/man1/ - + -t %{buildroot}%{_mandir}/man1/ +# install shell completions install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.bash \ - %{buildroot}%{_datadir}/bash-completion/completions/bat - -install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.zsh \ - %{buildroot}%{_datadir}/zsh/site-functions/_bat - + %{buildroot}/%{bash_completions_dir}/bat.bash install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.fish \ - -t %{buildroot}%{_datadir}/fish/vendor_completions.d/ + %{buildroot}/%{fish_completions_dir}/bat.fish +install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.zsh \ + %{buildroot}/%{zsh_completions_dir}/_bat %if %{with check} %check -%ifarch %{arm} ppc64le -# * doctests fail to compile on armv7hl with LLVM 14: -# https://bugzilla.redhat.com/show_bug.cgi?id=2086106 -# * doctests fail to compile on ppc64le with LLVM 15: -# https://bugzilla.redhat.com/show_bug.cgi?id=2142648 -%cargo_test -- --lib -%else %cargo_test %endif -%endif %changelog %autochangelog diff --git a/sources b/sources index ceb8108..e197a3f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bat-0.21.0.crate) = 5d3b3e00b961da9875eb0c74a82acd50c12bb5a0c76bfcd41109e5524344de67b78dca6c5bd5a801e833bff69529950d6c9cfa7e1964af4d0167664037d62aa9 +SHA512 (bat-0.23.0.crate) = a81b2021f710b7a9b13d3500cd715de14cc87dbab0412eb90677de4ae25d29b0e295931961d664c8238a8b10db2a7472fbc3de27153a84524aceafdc78e80a50