]> git.pld-linux.org Git - packages/delta.git/blob - delta.spec
up to 0.4.1
[packages/delta.git] / delta.spec
1 Summary:        A viewer for git and diff output
2 Name:           delta
3 Version:        0.4.1
4 Release:        1
5 License:        MIT
6 Group:          Applications
7 Source0:        https://github.com/dandavison/delta/archive/%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5:  a5a4a0e8b8ba90690a4b090d1e80d0aa
9 # cd delta-%{version}
10 # cargo vendor
11 # cd ..
12 # tar cJf delta-crates-%{version}.tar.xz delta-%{version}/{vendor,Cargo.lock}
13 Source1:        %{name}-crates-%{version}.tar.xz
14 # Source1-md5:  1ee73ff0fc14b1139f3626b7cb4c4bcc
15 URL:            https://github.com/dandavison/delta
16 BuildRequires:  cargo
17 BuildRequires:  rust
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
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
25 change.
26
27 Delta's main features are:
28
29 - Language syntax highlighting with color themes
30 - Within-line highlights based on a Levenshtein edit inference
31   algorithm
32 - Style (foreground color, background color, font attributes) can be
33   configured independently for more than 20 different sections of the
34   diff
35 - Stylable box/line decorations to draw attention to commit, file and
36   hunk header sections.
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
40   by default).
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
43   diff output.
44
45 %prep
46 %setup -q -b1
47
48 # use our offline registry
49 export CARGO_HOME="$(pwd)/.cargo"
50
51 mkdir -p "$CARGO_HOME"
52 cat >.cargo/config <<EOF
53 [source.crates-io]
54 registry = 'https://github.com/rust-lang/crates.io-index'
55 replace-with = 'vendored-sources'
56
57 [source.vendored-sources]
58 directory = '$PWD/vendor'
59 EOF
60
61 %build
62 export CARGO_HOME="$(pwd)/.cargo"
63
64 cargo -v build --release --frozen
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 export CARGO_HOME="$(pwd)/.cargo"
69
70 cargo -v install --frozen --root $RPM_BUILD_ROOT%{_prefix} --path $PWD
71 %{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates*
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %files
77 %defattr(644,root,root,755)
78 %doc README.md
79 %attr(755,root,root) %{_bindir}/delta
This page took 0.041518 seconds and 3 git commands to generate.