bat/bat.spec

105 lines
3.3 KiB
RPMSpec
Raw Permalink Normal View History

- Update to 0.25.0: Features: * Set terminal title to file names when Paging is not Paging::Never #2807 * bat --squeeze-blank/bat -s will now squeeze consecutive empty lines, see #1441 and #2665 * bat --squeeze-limit to set the maximum number of empty consecutive when using --squeeze-blank, see #1441 #2665 * PrettyPrinter::squeeze_empty_lines to support line squeezing for bat as a library, see #1441 #2665 * Syntax highlighting for JavaScript files that start with #!/usr/bin/env bun #2913 * bat --strip-ansi={never,always,auto} to remove ANSI escape sequences from bat's input, see #2999 * Add or remove individual style components without replacing all styles #2929 * Automatically choose theme based on the terminal's color scheme, see #2896 * Add option --binary=as-text for printing binary content, see issue #2974 and PR #2976 * Make shell completions available via --completion <shell>, see issue #2057 and PR #3126 * Syntax highlighting for puppet code blocks within Markdown files, see #3152 Bugfixes: * Fix long file name wrapping in header, see #2835 * Fix NO_COLOR support, see #2767 * Fix handling of inputs with OSC ANSI escape sequences, see #2541 and #2544 * Fix handling of inputs with combined ANSI color and attribute sequences, see #2185 and #2856 * Fix panel width when line 10000 wraps, see #2854 * Fix compile issue of time dependency caused by standard library regression #3045 * Fix override behavior of --plain and --paging, see issue #2731 and PR #3108 * Fix bugs in $LESSOPEN support, see #2805 Other: * Upgrade to Rust 2021 edition #2748 * Refactor and cleanup build script #2756 * Checks changelog has been written to for PRs in CI #2766 + Use GitHub API to get correct PR submitter #2791 * Minor benchmark script improvements #2768 * Update Arch Linux package URL in README files #2779 * Update and improve zsh completion, see #2772 OBS-URL: https://build.opensuse.org/package/show/utilities/bat?expand=0&rev=47
2025-01-08 08:22:39 +01:00
#
# spec file for package bat
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: bat
Version: 0.25.0
Release: 0
Summary: A cat(1) clone with syntax highlighting and Git integration
License: Apache-2.0 OR MIT
Group: Productivity/Text/Utilities
URL: https://github.com/sharkdp/bat
Source0: %{name}-%{version}.tar.xz
Source1: vendor.tar.xz
BuildRequires: cargo-packaging
# weak-dep-features introduced in 1.60 and already used by libgit2-sys
# https://github.com/rust-lang/git2-rs/commit/d8ee105a8f3ce4d5c57cd091b67943aab86b176a
BuildRequires: rust >= 1.60
ExclusiveArch: %{rust_arches}
%description
A cat(1) clone which supports syntax highlighting for a large number of
programming and markup languages. It has git integration and automatic paging.
%package bash-completion
Summary: Bash completion for %{name}
Requires: %{name} = %{version}
Supplements: (%{name} and bash-completion)
BuildArch: noarch
%description bash-completion
Bash command line completion support for %{name}.
%package fish-completion
Summary: Fish completion for %{name}
Requires: %{name} = %{version}
Supplements: (%{name} and fish)
BuildArch: noarch
%description fish-completion
Fish command line completion support for %{name}.
%package zsh-completion
Summary: Zsh completion for %{name}
Requires: %{name} = %{version}
Supplements: (%{name} and zsh)
BuildArch: noarch
%description zsh-completion
Zsh command line completion support for %{name}.
%prep
%setup -qa1
%build
%{cargo_build}
%install
install -D -m 0755 target/release/%{name} %{buildroot}%{_bindir}/%{name}
install -D -m 0644 $(find target/release/build -name "%{name}.1") "%{buildroot}/%{_mandir}/man1/%{name}.1"
install -D -m 0644 $(find target/release/build -name "%{name}.bash") "%{buildroot}/%{_datadir}/bash-completion/completions/%{name}"
install -D -m 0644 $(find target/release/build -name "%{name}.fish") "%{buildroot}/%{_datadir}/fish/vendor_completions.d/%{name}.fish"
install -D -m 0644 $(find target/release/build -name "%{name}.zsh") "%{buildroot}/%{_datadir}/zsh/site-functions/_%{name}"
%if %{with check}
%check
%{cargo_test}
%endif
%files
%doc README.md CONTRIBUTING.md CHANGELOG.md
%license LICENSE-MIT LICENSE-APACHE
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1%{ext_man}
%files bash-completion
%{_datadir}/bash-completion/completions/%{name}
%files fish-completion
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/%{name}.fish
%files zsh-completion
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_%{name}
%changelog