bat/bat.spec
Michael Vetter d63e9f5c4b Accepting request 674133 from home:dmarcoux
- Add README.packager for instructions on how to generate vendor.tar.xz
- Update to version 0.10.0
  * Features
    New option --highlight-line <N>
    New option -A/--show-all to show and highlight non-printable characters (in analogy to GNU cats option)
    New option --pager to configure the pager
    Support for a configuration file (https://github.com/sharkdp/bat#format)
    Support for custom config file path via --config-file option or BAT_CONFIG_PATH environment variable
    Support for custom syntax mappings via the -m/--max-syntax option
    Support pager command-line arguments in PAGER and BAT_PAGER
    The --terminal-width option can now also accept offsets
    Support for multiple --line-range arguments
    Encoding support for UTF-16LE and UTF-16BE
  * Changes
    Completely disabled the generation of shell completion files
    Report the name of missing files
    Don't start pager if file doesn't exist
    Rename bat cache --init to bat cache --build
    Move the --config-dir and --cache-dir options from bat cache to bat and hide them from the help text
    The default tab-width has been set to 4
  * New syntaxes supported
    Robot framework, Twig, .desktop files, AsciiDoc, Assembly, Jsonnet,
    Log files, Protobuf and ProtobufText, Terraform and Varlink

OBS-URL: https://build.opensuse.org/request/show/674133
OBS-URL: https://build.opensuse.org/package/show/utilities/bat?expand=0&rev=5
2019-02-12 15:07:55 +00:00

70 lines
2.0 KiB
RPMSpec

#
# spec file for package bat
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.10.0
Release: 0
Summary: A cat(1) clone with syntax highlighting and Git integration
License: MIT
Group: Productivity/Text/Utilities
Url: https://github.com/sharkdp/bat
Source0: https://github.com/sharkdp/bat/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: vendor.tar.xz
# Instructions on how to generate vendor.tar.xz
Source2: README.packager
BuildRequires: cargo
BuildRequires: cmake
BuildRequires: rust
BuildRequires: rust-std
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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.
%prep
%setup -q
%setup -q -D -T -a 1
mkdir cargo-home
cat >cargo-home/config <<EOF
[source.crates-io]
registry = 'https://github.com/rust-lang/crates.io-index'
replace-with = 'vendored-sources'
[source.vendored-sources]
directory = './vendor'
EOF
%build
export CARGO_HOME=$PWD/cargo-home
cargo build --release %{?_smp_mflags}
%install
export CARGO_HOME=$PWD/cargo-home
cargo install --root=%{buildroot}%{_prefix}
# remove residue crate file
rm %{buildroot}%{_prefix}/.crates.toml
%files
%defattr(-,root,root)
%doc LICENSE-MIT LICENSE-APACHE README.md
%{_bindir}/bat
%changelog