Update to 0.13.0
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
d4e81f5e84
commit
9020f8aa1c
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@
|
||||
/bat-0.10.0.crate
|
||||
/bat-0.11.0.crate
|
||||
/bat-0.12.1.crate
|
||||
/bat-0.13.0.crate
|
||||
|
67
0001-chore-Update-liquid-to-0.20.patch
Normal file
67
0001-chore-Update-liquid-to-0.20.patch
Normal file
@ -0,0 +1,67 @@
|
||||
From 136a745c5de804ee9cf0ec601302e17cef6334a3 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Raits <i.gnatenko.brain@gmail.com>
|
||||
Date: Sun, 22 Mar 2020 16:27:35 +0100
|
||||
Subject: [PATCH] chore: Update liquid to 0.20
|
||||
|
||||
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
|
||||
---
|
||||
build.rs | 31 +++++++------------------------
|
||||
1 file changed, 7 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/build.rs b/build.rs
|
||||
index 1c5872e..bff88e9 100644
|
||||
--- a/build.rs
|
||||
+++ b/build.rs
|
||||
@@ -18,34 +18,13 @@ lazy_static! {
|
||||
.unwrap_or("bat");
|
||||
}
|
||||
|
||||
-fn init_template() -> liquid::value::Object {
|
||||
- let mut globals = liquid::value::Object::new();
|
||||
-
|
||||
- globals.insert(
|
||||
- "PROJECT_NAME".into(),
|
||||
- liquid::value::Value::scalar(PROJECT_NAME.to_owned()),
|
||||
- );
|
||||
-
|
||||
- globals.insert(
|
||||
- "PROJECT_EXECUTABLE".into(),
|
||||
- liquid::value::Value::scalar(EXECUTABLE_NAME.to_owned()),
|
||||
- );
|
||||
-
|
||||
- globals.insert(
|
||||
- "PROJECT_VERSION".into(),
|
||||
- liquid::value::Value::scalar(PROJECT_VERSION.to_owned()),
|
||||
- );
|
||||
-
|
||||
- globals
|
||||
-}
|
||||
-
|
||||
/// Generates a file from a liquid template.
|
||||
fn template(
|
||||
- variables: &liquid::value::Object,
|
||||
+ variables: &liquid::Object,
|
||||
in_file: &str,
|
||||
out_file: impl AsRef<Path>,
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
- let template = liquid::ParserBuilder::with_liquid()
|
||||
+ let template = liquid::ParserBuilder::with_stdlib()
|
||||
.build()?
|
||||
.parse(&fs::read_to_string(in_file)?)?;
|
||||
|
||||
@@ -54,7 +33,11 @@ fn template(
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
- let variables = init_template();
|
||||
+ let variables = liquid::object!({
|
||||
+ "PROJECT_NAME": PROJECT_NAME.to_owned(),
|
||||
+ "PROJECT_EXECUTABLE": EXECUTABLE_NAME.to_owned(),
|
||||
+ "PROJECT_VERSION": PROJECT_VERSION.to_owned(),
|
||||
+ });
|
||||
|
||||
let out_dir_env = std::env::var_os("OUT_DIR").expect("OUT_DIR to be set in build.rs");
|
||||
let out_dir = Path::new(&out_dir_env);
|
||||
--
|
||||
2.26.0.rc2
|
||||
|
@ -1,20 +1,8 @@
|
||||
--- bat-0.12.1/Cargo.toml 1970-01-01T00:00:00+00:00
|
||||
+++ bat-0.12.1/Cargo.toml 2020-03-19T10:31:13.749370+00:00
|
||||
@@ -38,7 +38,7 @@
|
||||
default-features = false
|
||||
|
||||
[dependencies.console]
|
||||
-version = "0.8"
|
||||
+version = "0.9"
|
||||
|
||||
[dependencies.content_inspector]
|
||||
version = "0.2.4"
|
||||
@@ -55,7 +55,7 @@
|
||||
default-features = false
|
||||
|
||||
[dependencies.git2]
|
||||
-version = "0.10"
|
||||
+version = "0.13"
|
||||
features = []
|
||||
default-features = false
|
||||
--- bat-0.13.0/Cargo.toml 2020-03-22T12:44:46+00:00
|
||||
+++ bat-0.13.0/Cargo.toml 2020-03-23T06:22:32.294574+00:00
|
||||
@@ -92,4 +92,4 @@
|
||||
version = "1.4"
|
||||
|
||||
[build-dependencies.liquid]
|
||||
-version = "0.19"
|
||||
+version = "0.20"
|
||||
|
@ -1,13 +1,12 @@
|
||||
# Generated by rust2rpm 13
|
||||
# * assert_cmd is not packaged
|
||||
%bcond_with check
|
||||
%global __cargo_skip_build 0
|
||||
|
||||
%global crate bat
|
||||
|
||||
Name: rust-%{crate}
|
||||
Version: 0.12.1
|
||||
Release: 5%{?dist}
|
||||
Version: 0.13.0
|
||||
Release: 1%{?dist}
|
||||
Summary: cat(1) clone with wings
|
||||
|
||||
# Upstream license specification: MIT/Apache-2.0
|
||||
@ -15,11 +14,14 @@ License: MIT or ASL 2.0
|
||||
URL: https://crates.io/crates/bat
|
||||
Source: %{crates_source}
|
||||
# Initial patched metadata
|
||||
# * Bump console to 0.9, https://github.com/sharkdp/bat/pull/657
|
||||
# * Update git2 to 0.13, https://github.com/sharkdp/bat/commit/a2075b0f24b458e029495bb7f3b45bb40badef79
|
||||
# * Update liquid to 0.20, https://github.com/sharkdp/bat/commit/136a745c5de804ee9cf0ec601302e17cef6334a3
|
||||
Patch0: bat-fix-metadata.diff
|
||||
Patch0001: 0001-chore-Update-liquid-to-0.20.patch
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
%if %{__cargo_skip_build}
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
BuildRequires: rust-packaging
|
||||
|
||||
@ -28,6 +30,7 @@ Cat(1) clone with wings.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%if ! %{__cargo_skip_build}
|
||||
%package -n %{crate}
|
||||
Summary: %{summary}
|
||||
# Install all deps (without check), grab their licenses and make it simple
|
||||
@ -51,6 +54,36 @@ License: ASL 2.0 and BSD and CC0 and ISC and LGPLv3+ and MIT and zlib
|
||||
%doc README.md
|
||||
%{_bindir}/bat
|
||||
%{_mandir}/man1/bat.1*
|
||||
%dir %{_datadir}/fish
|
||||
%dir %{_datadir}/fish/vendor_completions.d
|
||||
%{_datadir}/fish/vendor_completions.d/bat.fish
|
||||
%endif
|
||||
|
||||
%package devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "%{crate}" crate.
|
||||
|
||||
%files devel
|
||||
%license LICENSE-MIT LICENSE-APACHE
|
||||
%doc README.md
|
||||
%{cargo_registry}/%{crate}-%{version_no_tilde}/
|
||||
|
||||
%package -n %{name}+default-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+default-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages
|
||||
which use "default" feature of "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+default-devel
|
||||
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||
@ -65,7 +98,9 @@ License: ASL 2.0 and BSD and CC0 and ISC and LGPLv3+ and MIT and zlib
|
||||
%install
|
||||
%cargo_install
|
||||
install -Dpm0644 -t %{buildroot}%{_mandir}/man1 \
|
||||
doc/bat.1
|
||||
target/release/build/%{crate}-*/out/assets/manual/bat.1
|
||||
install -Dpm0644 -t %{buildroot}%{_datadir}/fish/vendor_completions.d \
|
||||
target/release/build/%{crate}-*/out/assets/completions/bat.fish
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
@ -73,6 +108,9 @@ install -Dpm0644 -t %{buildroot}%{_mandir}/man1 \
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sun Mar 22 14:24:13 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.13.0-1
|
||||
- Update to 0.13.0
|
||||
|
||||
* Thu Mar 19 11:31:13 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.12.1-5
|
||||
- Update git2 to 0.13
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (bat-0.12.1.crate) = 4577fe8fdbee2378c7efd178a53a0d247d8506adc7683999f6ce08034003b42d8ee3fcf5ae3dc88b1dd38dd4e717b1c3b265fefd639af0f0b6db7af33b6540df
|
||||
SHA512 (bat-0.13.0.crate) = 950a54f8fcc8f8ef5f63e4ec4897e9dc32f39aa8965a3afba4501f1f58ad7d84d8aa34a8af3615c30112658e2fe59a3ccffbc6d1142ad2de24b650894e908c10
|
||||
|
Loading…
Reference in New Issue
Block a user