Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5f29080dc0 | ||
|
79226b012d | ||
|
1918166b8a | ||
|
aedcb16b3c | ||
|
7a0dcc0534 | ||
|
0ae1ca8f8d | ||
|
19104e20a1 | ||
|
1f9c12a6f5 | ||
|
178a122e07 | ||
|
b61b947fa9 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,3 +15,4 @@
|
|||||||
/bat-0.16.0.crate
|
/bat-0.16.0.crate
|
||||||
/bat-0.17.1.crate
|
/bat-0.17.1.crate
|
||||||
/bat-0.18.3.crate
|
/bat-0.18.3.crate
|
||||||
|
/bat-0.21.0.crate
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
[DEFAULT]
|
|
||||||
unwanted-features =
|
|
||||||
regex-fancy
|
|
@ -1,44 +0,0 @@
|
|||||||
From d565131b04db44067f1bf07eafc863022c6b7c55 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Igor Raits <i.gnatenko.brain@gmail.com>
|
|
||||||
Date: Sun, 21 Jun 2020 10:16:03 +0200
|
|
||||||
Subject: [PATCH] Siwtch to path-absolutize
|
|
||||||
|
|
||||||
This reverts commit bd17fd571f99d52b4d76a24aee719dcd89a0244d.
|
|
||||||
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
|
|
||||||
---
|
|
||||||
src/assets.rs | 8 +++-----
|
|
||||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/assets.rs b/src/assets.rs
|
|
||||||
index 86c3fe0..3899d7c 100644
|
|
||||||
--- a/src/assets.rs
|
|
||||||
+++ b/src/assets.rs
|
|
||||||
@@ -1,3 +1,4 @@
|
|
||||||
+use std::borrow::Cow;
|
|
||||||
use std::collections::BTreeMap;
|
|
||||||
use std::ffi::OsStr;
|
|
||||||
use std::fs::{self, File};
|
|
||||||
@@ -8,7 +9,7 @@ use syntect::dumps::{dump_to_file, from_
|
|
||||||
use syntect::highlighting::{Theme, ThemeSet};
|
|
||||||
use syntect::parsing::{SyntaxReference, SyntaxSet, SyntaxSetBuilder};
|
|
||||||
|
|
||||||
-use path_abs::PathAbs;
|
|
||||||
+use path_absolutize::Absolutize;
|
|
||||||
|
|
||||||
use crate::assets_metadata::AssetsMetadata;
|
|
||||||
use crate::bat_warning;
|
|
||||||
@@ -255,10 +256,7 @@ impl HighlightingAssets {
|
|
||||||
if let Some(path_str) = path_str {
|
|
||||||
// If a path was provided, we try and detect the syntax based on extension mappings.
|
|
||||||
let path = Path::new(path_str);
|
|
||||||
- let absolute_path = PathAbs::new(path)
|
|
||||||
- .ok()
|
|
||||||
- .map(|p| p.as_path().to_path_buf())
|
|
||||||
- .unwrap_or_else(|| path.to_owned());
|
|
||||||
+ let absolute_path = path.absolutize().unwrap_or(Cow::Borrowed(path));
|
|
||||||
|
|
||||||
match mapping.get_syntax_for(absolute_path) {
|
|
||||||
Some(MappingTarget::MapToUnknown) => line_syntax.ok_or_else(|| {
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
39
0001-port-from-path_abs-to-path-absolutize.patch
Normal file
39
0001-port-from-path_abs-to-path-absolutize.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From 6639f0061b39a21ae2e3bcfca21c7915319039db Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fabio Valentini <decathorpe@gmail.com>
|
||||||
|
Date: Thu, 21 Jul 2022 10:45:26 +0200
|
||||||
|
Subject: [PATCH] port from path_abs to path-absolutize
|
||||||
|
|
||||||
|
---
|
||||||
|
src/assets.rs | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/assets.rs b/src/assets.rs
|
||||||
|
index 8126843..f578d70 100644
|
||||||
|
--- a/src/assets.rs
|
||||||
|
+++ b/src/assets.rs
|
||||||
|
@@ -1,3 +1,4 @@
|
||||||
|
+use std::borrow::Cow;
|
||||||
|
use std::ffi::OsStr;
|
||||||
|
use std::fs;
|
||||||
|
use std::path::Path;
|
||||||
|
@@ -7,7 +8,7 @@ use once_cell::unsync::OnceCell;
|
||||||
|
use syntect::highlighting::Theme;
|
||||||
|
use syntect::parsing::{SyntaxReference, SyntaxSet};
|
||||||
|
|
||||||
|
-use path_abs::PathAbs;
|
||||||
|
+use path_absolutize::Absolutize;
|
||||||
|
|
||||||
|
use crate::error::*;
|
||||||
|
use crate::input::{InputReader, OpenedInput};
|
||||||
|
@@ -224,7 +225,7 @@ impl HighlightingAssets {
|
||||||
|
let path = input.path();
|
||||||
|
let path_syntax = if let Some(path) = path {
|
||||||
|
self.get_syntax_for_path(
|
||||||
|
- PathAbs::new(path).map_or_else(|_| path.to_owned(), |p| p.as_path().to_path_buf()),
|
||||||
|
+ path.absolutize().unwrap_or(Cow::Borrowed(path)),
|
||||||
|
mapping,
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
--- bat-0.18.3/Cargo.toml 1970-01-01T00:00:01+00:00
|
--- bat-0.21.0/Cargo.toml 1970-01-01T00:00:01+00:00
|
||||||
+++ bat-0.18.3/Cargo.toml 2021-11-14T17:24:54.516671+00:00
|
+++ bat-0.21.0/Cargo.toml 2022-07-21T08:43:28.724045+00:00
|
||||||
@@ -79,9 +79,8 @@
|
@@ -93,9 +93,8 @@
|
||||||
version = "1.4"
|
[dependencies.once_cell]
|
||||||
optional = true
|
version = "1.10"
|
||||||
|
|
||||||
-[dependencies.path_abs]
|
-[dependencies.path_abs]
|
||||||
-version = "0.5"
|
-version = "0.5"
|
||||||
@ -10,20 +10,5 @@
|
|||||||
+[dependencies.path-absolutize]
|
+[dependencies.path-absolutize]
|
||||||
+version = "3"
|
+version = "3"
|
||||||
|
|
||||||
[dependencies.semver]
|
[dependencies.regex]
|
||||||
version = "0.11"
|
version = "1.5.5"
|
||||||
@@ -109,7 +108,7 @@
|
|
||||||
version = "2.0"
|
|
||||||
optional = true
|
|
||||||
[dev-dependencies.assert_cmd]
|
|
||||||
-version = "1.0.5"
|
|
||||||
+version = "2.0.0"
|
|
||||||
|
|
||||||
[dev-dependencies.predicates]
|
|
||||||
version = "1.0.7"
|
|
||||||
@@ -134,4 +133,4 @@
|
|
||||||
regex-fancy = ["syntect/regex-fancy"]
|
|
||||||
regex-onig = ["syntect/regex-onig"]
|
|
||||||
[target."cfg(unix)".dev-dependencies.nix]
|
|
||||||
-version = "0.21.0"
|
|
||||||
+version = "0.22.0"
|
|
||||||
|
240
rust-bat.spec
240
rust-bat.spec
@ -1,62 +1,68 @@
|
|||||||
# Generated by rust2rpm 18
|
# Generated by rust2rpm 23
|
||||||
%bcond_without check
|
%bcond_without check
|
||||||
|
|
||||||
%global crate bat
|
%global crate bat
|
||||||
|
|
||||||
Name: rust-%{crate}
|
Name: rust-bat
|
||||||
Version: 0.18.3
|
Version: 0.21.0
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
Summary: Cat(1) clone with wings
|
Summary: Cat(1) clone with wings
|
||||||
|
|
||||||
# Upstream license specification: MIT/Apache-2.0
|
# Upstream license specification: MIT/Apache-2.0
|
||||||
License: MIT or ASL 2.0
|
License: MIT OR Apache-2.0
|
||||||
URL: https://crates.io/crates/bat
|
URL: https://crates.io/crates/bat
|
||||||
Source: %{crates_source}
|
Source: %{crates_source}
|
||||||
# Initial patched metadata
|
# Manually created patch for downstream crate metadata changes
|
||||||
# * Switch to path-absolutize, https://github.com/sharkdp/bat/pull/1025
|
# * Port from path_abs to path-absolutize:
|
||||||
# * Bump assert_cmd to 2.0.0
|
# https://github.com/sharkdp/bat/pull/1025
|
||||||
# * Bump nix to 0.22.0
|
Patch: bat-fix-metadata.diff
|
||||||
Patch0: bat-fix-metadata.diff
|
Patch: 0001-port-from-path_abs-to-path-absolutize.patch
|
||||||
Patch0001: 0001-Switch-to-path-absolutize.patch
|
|
||||||
|
|
||||||
ExclusiveArch: %{rust_arches}
|
BuildRequires: rust-packaging >= 23
|
||||||
%if %{__cargo_skip_build}
|
|
||||||
BuildArch: noarch
|
|
||||||
%endif
|
|
||||||
|
|
||||||
BuildRequires: rust-packaging
|
|
||||||
|
|
||||||
%global _description %{expand:
|
%global _description %{expand:
|
||||||
Cat(1) clone with wings.}
|
Cat(1) clone with wings.}
|
||||||
|
|
||||||
%description %{_description}
|
%description %{_description}
|
||||||
|
|
||||||
%if ! %{__cargo_skip_build}
|
|
||||||
%package -n %{crate}
|
%package -n %{crate}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
# 0BSD or MIT or ASL 2.0
|
# 0BSD or MIT or ASL 2.0
|
||||||
# ASL 2.0
|
# ASL 2.0
|
||||||
# ASL 2.0 or Boost
|
# ASL 2.0 or Boost
|
||||||
|
# ASL 2.0 or MIT
|
||||||
# BSD
|
# BSD
|
||||||
# CC0
|
# CC0
|
||||||
# LGPLv3+
|
# LGPLv3+
|
||||||
# MIT
|
# MIT
|
||||||
|
# MIT and GPLv2 with exceptions and BSD
|
||||||
# MIT or ASL 2.0
|
# MIT or ASL 2.0
|
||||||
# MIT or ASL 2.0 or zlib
|
# MIT or ASL 2.0 or zlib
|
||||||
|
# MIT or zlib or ASL 2.0
|
||||||
# Unlicense or MIT
|
# Unlicense or MIT
|
||||||
License: ASL 2.0 and BSD and CC0 and LGPLv3+ and MIT
|
# zlib or ASL 2.0 or MIT
|
||||||
|
License: ASL 2.0 and BSD and CC0 and GPLv2 with exceptions and LGPLv3+ and MIT
|
||||||
|
# LICENSE.dependencies contains a full license breakdown
|
||||||
|
|
||||||
%description -n %{crate} %{_description}
|
%description -n %{crate} %{_description}
|
||||||
|
|
||||||
%files -n %{crate}
|
%files -n %{crate}
|
||||||
%license LICENSE-MIT LICENSE-APACHE
|
%license LICENSE-APACHE
|
||||||
%doc doc README.md CONTRIBUTING.md CHANGELOG.md
|
%license LICENSE-MIT
|
||||||
|
%license NOTICE
|
||||||
|
%license LICENSE.dependencies
|
||||||
|
%doc CHANGELOG.md
|
||||||
|
%doc CONTRIBUTING.md
|
||||||
|
%doc README.md
|
||||||
%{_bindir}/bat
|
%{_bindir}/bat
|
||||||
%{_mandir}/man1/bat.1*
|
%{_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
|
||||||
%dir %{_datadir}/fish/vendor_completions.d
|
%dir %{_datadir}/fish/vendor_completions.d
|
||||||
%{_datadir}/fish/vendor_completions.d/bat.fish
|
%{_datadir}/fish/vendor_completions.d/bat.fish
|
||||||
%endif
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -64,13 +70,17 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description devel %{_description}
|
%description devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "%{crate}" crate.
|
use the "%{crate}" crate.
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%license LICENSE-MIT LICENSE-APACHE
|
%license %{crate_instdir}/LICENSE-APACHE
|
||||||
%doc doc README.md CONTRIBUTING.md CHANGELOG.md
|
%license %{crate_instdir}/LICENSE-MIT
|
||||||
%{cargo_registry}/%{crate}-%{version_no_tilde}/
|
%license %{crate_instdir}/NOTICE
|
||||||
|
%doc %{crate_instdir}/CHANGELOG.md
|
||||||
|
%doc %{crate_instdir}/CONTRIBUTING.md
|
||||||
|
%doc %{crate_instdir}/README.md
|
||||||
|
%{crate_instdir}/
|
||||||
|
|
||||||
%package -n %{name}+default-devel
|
%package -n %{name}+default-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -78,11 +88,11 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description -n %{name}+default-devel %{_description}
|
%description -n %{name}+default-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "default" feature of "%{crate}" crate.
|
use the "default" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+default-devel
|
%files -n %{name}+default-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%package -n %{name}+application-devel
|
%package -n %{name}+application-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -90,11 +100,11 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description -n %{name}+application-devel %{_description}
|
%description -n %{name}+application-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "application" feature of "%{crate}" crate.
|
use the "application" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+application-devel
|
%files -n %{name}+application-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%package -n %{name}+atty-devel
|
%package -n %{name}+atty-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -102,11 +112,35 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description -n %{name}+atty-devel %{_description}
|
%description -n %{name}+atty-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "atty" feature of "%{crate}" crate.
|
use the "atty" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+atty-devel
|
%files -n %{name}+atty-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
|
%package -n %{name}+bugreport-devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n %{name}+bugreport-devel %{_description}
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages which
|
||||||
|
use the "bugreport" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
|
%files -n %{name}+bugreport-devel
|
||||||
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
|
%package -n %{name}+build-assets-devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n %{name}+build-assets-devel %{_description}
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages which
|
||||||
|
use the "build-assets" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
|
%files -n %{name}+build-assets-devel
|
||||||
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%package -n %{name}+clap-devel
|
%package -n %{name}+clap-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -114,11 +148,11 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description -n %{name}+clap-devel %{_description}
|
%description -n %{name}+clap-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "clap" feature of "%{crate}" crate.
|
use the "clap" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+clap-devel
|
%files -n %{name}+clap-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%package -n %{name}+dirs-next-devel
|
%package -n %{name}+dirs-next-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -126,11 +160,11 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description -n %{name}+dirs-next-devel %{_description}
|
%description -n %{name}+dirs-next-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "dirs-next" feature of "%{crate}" crate.
|
use the "dirs-next" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+dirs-next-devel
|
%files -n %{name}+dirs-next-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%package -n %{name}+git-devel
|
%package -n %{name}+git-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -138,11 +172,11 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description -n %{name}+git-devel %{_description}
|
%description -n %{name}+git-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "git" feature of "%{crate}" crate.
|
use the "git" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+git-devel
|
%files -n %{name}+git-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%package -n %{name}+git2-devel
|
%package -n %{name}+git2-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -150,23 +184,35 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description -n %{name}+git2-devel %{_description}
|
%description -n %{name}+git2-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "git2" feature of "%{crate}" crate.
|
use the "git2" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+git2-devel
|
%files -n %{name}+git2-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%package -n %{name}+lazy_static-devel
|
%package -n %{name}+grep-cli-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description -n %{name}+lazy_static-devel %{_description}
|
%description -n %{name}+grep-cli-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "lazy_static" feature of "%{crate}" crate.
|
use the "grep-cli" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+lazy_static-devel
|
%files -n %{name}+grep-cli-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
|
%package -n %{name}+minimal-application-devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n %{name}+minimal-application-devel %{_description}
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages which
|
||||||
|
use the "minimal-application" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
|
%files -n %{name}+minimal-application-devel
|
||||||
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%package -n %{name}+paging-devel
|
%package -n %{name}+paging-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -174,11 +220,35 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description -n %{name}+paging-devel %{_description}
|
%description -n %{name}+paging-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "paging" feature of "%{crate}" crate.
|
use the "paging" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+paging-devel
|
%files -n %{name}+paging-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
|
%package -n %{name}+regex-devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n %{name}+regex-devel %{_description}
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages which
|
||||||
|
use the "regex" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
|
%files -n %{name}+regex-devel
|
||||||
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
|
%package -n %{name}+regex-fancy-devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n %{name}+regex-fancy-devel %{_description}
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages which
|
||||||
|
use the "regex-fancy" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
|
%files -n %{name}+regex-fancy-devel
|
||||||
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%package -n %{name}+regex-onig-devel
|
%package -n %{name}+regex-onig-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -186,11 +256,11 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description -n %{name}+regex-onig-devel %{_description}
|
%description -n %{name}+regex-onig-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "regex-onig" feature of "%{crate}" crate.
|
use the "regex-onig" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+regex-onig-devel
|
%files -n %{name}+regex-onig-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%package -n %{name}+shell-words-devel
|
%package -n %{name}+shell-words-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -198,11 +268,23 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description -n %{name}+shell-words-devel %{_description}
|
%description -n %{name}+shell-words-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "shell-words" feature of "%{crate}" crate.
|
use the "shell-words" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+shell-words-devel
|
%files -n %{name}+shell-words-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
|
%package -n %{name}+walkdir-devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n %{name}+walkdir-devel %{_description}
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages which
|
||||||
|
use the "walkdir" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
|
%files -n %{name}+walkdir-devel
|
||||||
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%package -n %{name}+wild-devel
|
%package -n %{name}+wild-devel
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
@ -210,33 +292,51 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%description -n %{name}+wild-devel %{_description}
|
%description -n %{name}+wild-devel %{_description}
|
||||||
|
|
||||||
This package contains library source intended for building other packages
|
This package contains library source intended for building other packages which
|
||||||
which use "wild" feature of "%{crate}" crate.
|
use the "wild" feature of the "%{crate}" crate.
|
||||||
|
|
||||||
%files -n %{name}+wild-devel
|
%files -n %{name}+wild-devel
|
||||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
%ghost %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||||
%cargo_prep
|
%cargo_prep
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
%cargo_generate_buildrequires
|
%cargo_generate_buildrequires -a
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cargo_build
|
%cargo_build
|
||||||
|
%cargo_license_summary
|
||||||
|
%{cargo_license} > LICENSE.dependencies
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%cargo_install
|
%cargo_install
|
||||||
install -Dpm0644 -t %{buildroot}%{_mandir}/man1 \
|
|
||||||
target/release/build/%{crate}-*/out/assets/manual/bat.1
|
install -Dpm0644 target/release/build/%{crate}-*/out/assets/manual/bat.1 \
|
||||||
install -Dpm0644 -t %{buildroot}%{_datadir}/fish/vendor_completions.d \
|
-t %{buildroot}%{_mandir}/man1/
|
||||||
target/release/build/%{crate}-*/out/assets/completions/bat.fish
|
|
||||||
|
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
|
||||||
|
|
||||||
|
install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.fish \
|
||||||
|
-t %{buildroot}%{_datadir}/fish/vendor_completions.d/
|
||||||
|
|
||||||
%if %{with check}
|
%if %{with check}
|
||||||
%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
|
%cargo_test
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
%autochangelog
|
%autochangelog
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (bat-0.18.3.crate) = 078a08248b63ab602b78f05efd1721a3e1173c1b6ec9eb1f0d0e6bad954ef6c2063c6221558c102e4dac79433c2ed3bc69003d0aec4b49722b6e574bd8f7f7b3
|
SHA512 (bat-0.21.0.crate) = 5d3b3e00b961da9875eb0c74a82acd50c12bb5a0c76bfcd41109e5524344de67b78dca6c5bd5a801e833bff69529950d6c9cfa7e1964af4d0167664037d62aa9
|
||||||
|
Loading…
Reference in New Issue
Block a user