2018-09-28 17:16:54 +02:00
|
|
|
#
|
|
|
|
# spec file for package bat
|
|
|
|
#
|
2020-04-09 12:43:52 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2018-09-28 17:16:54 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-02-12 16:07:55 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-09-28 17:16:54 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: bat
|
2020-05-05 09:15:01 +02:00
|
|
|
Version: 0.15.0
|
2018-09-28 17:16:54 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: A cat(1) clone with syntax highlighting and Git integration
|
2019-05-14 10:07:29 +02:00
|
|
|
License: MIT OR Apache-2.0
|
2018-09-28 17:16:54 +02:00
|
|
|
Group: Productivity/Text/Utilities
|
2019-04-30 15:19:12 +02:00
|
|
|
URL: https://github.com/sharkdp/bat
|
2018-09-28 17:16:54 +02:00
|
|
|
Source0: https://github.com/sharkdp/bat/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
|
Source1: vendor.tar.xz
|
2019-02-12 16:07:55 +01:00
|
|
|
# Instructions on how to generate vendor.tar.xz
|
|
|
|
Source2: README.packager
|
2018-09-28 17:16:54 +02:00
|
|
|
BuildRequires: cargo
|
2019-09-24 17:36:12 +02:00
|
|
|
BuildRequires: clang
|
2019-02-12 16:07:55 +01:00
|
|
|
BuildRequires: cmake
|
2018-09-28 17:16:54 +02:00
|
|
|
BuildRequires: rust
|
|
|
|
BuildRequires: rust-std
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
|
|
|
|
%description
|
2018-10-02 12:09:13 +02:00
|
|
|
A cat(1) clone which supports syntax highlighting for a large number of
|
|
|
|
programming and markup languages. It has git integration and automatic paging.
|
2018-09-28 17:16:54 +02:00
|
|
|
|
|
|
|
%prep
|
2019-04-30 15:19:12 +02:00
|
|
|
%setup -qa1
|
2019-10-01 23:24:40 +02:00
|
|
|
mkdir .cargo
|
|
|
|
cat >.cargo/config <<EOF
|
2018-09-28 17:16:54 +02:00
|
|
|
[source.crates-io]
|
|
|
|
registry = 'https://github.com/rust-lang/crates.io-index'
|
|
|
|
replace-with = 'vendored-sources'
|
|
|
|
[source.vendored-sources]
|
|
|
|
directory = './vendor'
|
|
|
|
EOF
|
|
|
|
|
|
|
|
%build
|
2019-03-11 21:01:05 +01:00
|
|
|
cargo build --release --locked %{?_smp_mflags}
|
2018-09-28 17:16:54 +02:00
|
|
|
|
|
|
|
%install
|
2020-04-09 12:43:52 +02:00
|
|
|
cargo install --no-track --root=%{buildroot}%{_prefix} --path .
|
2018-09-28 17:16:54 +02:00
|
|
|
|
|
|
|
%files
|
2019-03-11 21:01:05 +01:00
|
|
|
%doc README.md
|
|
|
|
%license LICENSE-MIT LICENSE-APACHE
|
2018-09-28 17:16:54 +02:00
|
|
|
%{_bindir}/bat
|
2019-02-12 16:07:55 +01:00
|
|
|
|
|
|
|
%changelog
|