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