Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37041068
en ru br
Репозитории ALT

Группа :: Работа с файлами
Пакет: bat

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Name: bat
Version: 0.23.0
Release: alt2
Summary: A cat(1) clone with syntax highlighting and Git integration
License: MIT or Apache-2.0
Group: File tools
Url: https://github.com/sharkdp/bat
Source: %name-%version.tar

BuildRequires: rust-cargo
Conflicts: bacula9-bat
Conflicts: bacula11-bat
Conflicts: bacula13-bat

%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
mkdir -p .cargo
cat >> .cargo/config <<EOF
[source.crates-io]
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "vendor"
EOF

%build
cargo build --offline --release

%install
mkdir -p %buildroot%_bindir
mkdir -p %buildroot%_man1dir
install -m 0755 target/release/%name %buildroot%_bindir
install -m 0644 target/release/build/%name-*/out/assets/manual/%name.1 %buildroot%_man1dir
install -Dm 0644 target/release/build/%name-*/out/assets/completions/bat.bash %buildroot%_datadir/bash-completion/completions/bat
install -Dm 0644 target/release/build/%name-*/out/assets/completions/bat.zsh %buildroot%_datadir/zsh/site-functions/_bat
install -Dm 0644 target/release/build/%name-*/out/assets/completions/bat.fish %buildroot%_datadir/fish/vendor_completions.d/bat.fish

%check
# Test no_args_doesnt_break failed in hasher with error "Couldn't open pty"
cargo test -- --skip no_args_doesnt_break

%files
%_bindir/%name
%_man1dir/%name.1.xz
%_datadir/bash-completion/completions/bat
%_datadir/zsh/site-functions/_bat
%_datadir/fish/vendor_completions.d/bat.fish
%doc README.md LICENSE-MIT LICENSE-APACHE

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin