Accepting request 639027 from home:dmarcoux
New devel package OBS-URL: https://build.opensuse.org/request/show/639027 OBS-URL: https://build.opensuse.org/package/show/utilities/bat?expand=0&rev=1
This commit is contained in:
66
bat.spec
Normal file
66
bat.spec
Normal file
@@ -0,0 +1,66 @@
|
||||
#
|
||||
# spec file for package bat
|
||||
#
|
||||
# Copyright (c) 2018 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 http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: bat
|
||||
Version: 0.7.1
|
||||
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
|
||||
BuildRequires: cargo
|
||||
BuildRequires: rust
|
||||
BuildRequires: rust-std
|
||||
BuildRequires: cmake
|
||||
BuildRequires: zlib-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
A cat(1) clone with wings.
|
||||
Supports syntax highlighting for a large number of programming and markup languages.
|
||||
Has git integration. Automatic paging and more...
|
||||
|
||||
%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
|
Reference in New Issue
Block a user