1 Summary: A viewer for git and diff output
7 Source0: https://github.com/dandavison/delta/archive/%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5: d75f73bc71407b86489eff88f837274d
10 Source1: %{name}-crates-%{version}.tar.xz
11 # Source1-md5: 55f896f9511f16f17d8d209d903904f1
12 URL: https://github.com/dandavison/delta
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 Delta aims to make studying diffs both efficient and enjoyable: it
19 allows you to make extensive changes to the layout and styling of
20 diffs, as well as allowing you to stay arbitrarily close to the
21 default git/diff output, changing just the aspects that you want to
24 Delta's main features are:
26 - Language syntax highlighting with color themes
27 - Within-line highlights based on a Levenshtein edit inference
29 - Style (foreground color, background color, font attributes) can be
30 configured independently for more than 20 different sections of the
32 - Stylable box/line decorations to draw attention to commit, file and
34 - Line numbering (`-n`)
35 - `--diff-highlight` and `--diff-so-fancy` emulation modes
36 - Code can be copied directly from the diff (`-/+` markers are removed
38 - `n` and `N` keybindings to move between files in large diffs, and
39 between diffs in `log -p` views (`--navigate`) A viewer for git and
45 # use our offline registry
46 export CARGO_HOME="$(pwd)/.cargo"
48 mkdir -p "$CARGO_HOME"
49 cat >.cargo/config <<EOF
51 registry = 'https://github.com/rust-lang/crates.io-index'
52 replace-with = 'vendored-sources'
54 [source.vendored-sources]
55 directory = '$PWD/vendor'
59 export CARGO_HOME="$(pwd)/.cargo"
61 cargo -v build --release --frozen
64 rm -rf $RPM_BUILD_ROOT
65 export CARGO_HOME="$(pwd)/.cargo"
67 cargo -v install --frozen --root $RPM_BUILD_ROOT%{_prefix} --path $PWD
68 %{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates*
71 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
76 %attr(755,root,root) %{_bindir}/delta