bat/bat.spec
Michael Vetter 8e9bda43ca Accepting request 1123182 from home:smolsheep:upgrades
- Update to 0.24.0:
  Features:
  * Add environment variable BAT_PAGING, see #2629
  * Add opt-in (--features lessopen) support for LESSOPEN and
    LESSCLOSE. See #1597, #1739, #2444, #2602, and #2662
  Bugfixes:
  * Fix more not being found on Windows when provided via
    BAT_PAGER, see #2570, #2580, and #2651
  * Switched default behavior of --map-syntax to be case
    insensitive #2520
  * Updated version of serde_yaml to 0.9. See #2627
  * Fix arithmetic overflow in LineRange::from and
    LineRange::parse_range, see #2674, #2698
  * Fix paging not happening when stdout is interactive but stdin
    is not, see #2574
  * Make -pp override --paging and vice versa when passed as a
    later argument, see #2660
  Other:
  * Output directory for generated assets (completion, manual) can
    be customized, see #2515
  * Use the is-terminal crate instead of atty, see #2530
  * Add Winget Releaser workflow, see #2519
  * Bump MSRV to 1.70, see #2651
  Syntaxes:
  * Associate os-release with bash syntax, see #2587
  * Associate Containerfile with Dockerfile syntax, see #2606
  * Replaced quotes with double quotes so fzf integration example
    script works on windows and linux. see #2095
  * Associate ksh files with bash syntax, see #2633
  * Associate sarif files with JSON syntax, see #2695
  * Associate ron files with rust syntax, see #2427
  * Add support for WebGPU Shader Language, see #2692
  * Add .dpkg-new and .dpkg-tmp to ignored suffixe, see #2595
  * fix: Add syntax mapping *.jsonl => json, see #2539
  * Update Julia syntax, see #2553
  * add NSIS support, see #2577
  * Update ssh-config, see #2697

OBS-URL: https://build.opensuse.org/request/show/1123182
OBS-URL: https://build.opensuse.org/package/show/utilities/bat?expand=0&rev=43
2023-11-03 11:04:22 +00:00

108 lines
3.3 KiB
RPMSpec

#
# spec file for package bat
#
# Copyright (c) 2023 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.24.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
Source2: cargo_config
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
mkdir .cargo
cp %{SOURCE2} .cargo/config
%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