%global commit aef5a424b4b788eb6b8b2427dadb1376767b6535 %global gittag v2024.08.24 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: bat-extras Version: 2024.08.24 Release: 1%{?dist} Summary: Bash scripts that integrate bat with various command line tools License: MIT URL: https://github.com/eth-p/bat-extras Source: https://github.com/eth-p/bat-extras/archive/%{gittag}/%{name}-%{version}.tar.gz BuildRequires: bash Requires: bash Requires: bat Requires: git-delta Requires: ripgrep Requires: man-db Requires: fzf Requires: less Requires: entr BuildArch: noarch %description Bat-extras adds scripts to integrate bat, a replacement for cat, with command-line tools like man, grep, watch, diff, and lesspipe. It also provides a bat-modules script to add additional themes and syntaxes to bat. %prep %autosetup bat-extras-%{gittag} %build %install mkdir -p %{buildroot}%{_mandir}/man1 ./build.sh --install --minify=none --prefix=%{buildroot}/%{_usr} --no-verify install -m 644 %{_builddir}/%{name}-%{version}/man/bat*.1 %{buildroot}/%{_mandir}/man1 # prettybat requires several different language specific formatters to work: # black, shfmt, clang-tools-extra, rustfmt are all available in Fedora, but # the formatter used for JSON, YAML, CSS, HTML, JavaScript, etc. is # prettier.io which isn't. Plus pulling in formatters generally drags in # the languages binaries which would create a big dependency web for what # is meant to be a simple utility package. There might be a place for # adding these formatters as Recommends but until prettier.io is available # I'm electing to just elide prettybat altogether. rm %{buildroot}/%{_usr}/bin/prettybat rm %{buildroot}/%{_mandir}/man1/prettybat.1.gz %files %license LICENSE* %doc README* %{_bindir}/bat* %{_mandir}/man1/bat*.* %changelog * Wed Oct 02 2024 Alex Wood 2024.08.24-1 - Version 2024-08-24 * Wed Mar 15 2023 Alex Wood - 2022.07.27-1 - Initial packaging