summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--bat.spec39
-rw-r--r--config13
-rw-r--r--sources1
4 files changed, 54 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..6f64b34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/bat-0.23.0.tar.gz
diff --git a/bat.spec b/bat.spec
new file mode 100644
index 0000000..f0d5211
--- /dev/null
+++ b/bat.spec
@@ -0,0 +1,39 @@
+%global debug_package %{nil}
+
+Name: bat
+Version: 0.23.0
+Release: 1
+Summary: A cat(1) clone with syntax highlighting and Git integration.
+License: Apache-2.0 and MIT
+URL: https://github.com/sharkdp/bat
+
+Source0: https://gitee.com/src-openeuler/bat/blob/master/bat-%{version}.tar.gz
+Source1: config
+
+BuildRequires: cargo git
+
+%description
+A cat(1) clone with syntax highlighting and Git integration.
+
+%prep
+%autosetup -n %{name}-%{version}
+cargo -V
+mkdir -p ~/.cargo/
+cp %{SOURCE1} ~/.cargo/
+
+%build
+cargo build --release
+
+%install
+mkdir -p %{buildroot}%{_bindir}
+cp ./target/release/bat %{buildroot}%{_bindir}
+
+%files
+%defattr(-,root,root)
+%{_bindir}/%{name}
+%doc README.md
+%license LICENSE-MIT LICENSE-APACHE
+
+%changelog
+* Thu Jul 06 2023 zerocraft <zero.craft@hotmail.com> - 0.23.0-1
+- openEuler init
diff --git a/config b/config
new file mode 100644
index 0000000..34b5e8d
--- /dev/null
+++ b/config
@@ -0,0 +1,13 @@
+[source.crates-io]
+replace-with = 'rsproxy'
+
+[source.rsproxy]
+registry = "https://rsproxy.cn/crates.io-index"
+[source.rsproxy-sparse]
+registry = "sparse+https://rsproxy.cn/index/"
+
+[registries.rsproxy]
+index = "https://rsproxy.cn/crates.io-index"
+
+[net]
+git-fetch-with-cli = true \ No newline at end of file
diff --git a/sources b/sources
new file mode 100644
index 0000000..240ca80
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+678e13187ba4202fd3588a72f3e2bc9e bat-0.23.0.tar.gz