up to 0.4.3
[packages/delta.git] / delta.spec
CommitLineData
92a8f118
JP
1Summary: A viewer for git and diff output
2Name: delta
d49c59fe 3Version: 0.4.3
92a8f118
JP
4Release: 1
5License: MIT
6Group: Applications
7Source0: https://github.com/dandavison/delta/archive/%{version}/%{name}-%{version}.tar.gz
d49c59fe 8# Source0-md5: 440273fe901f11df0659853481926d12
92a8f118
JP
9# cd delta-%{version}
10# cargo vendor
11# cd ..
12# tar cJf delta-crates-%{version}.tar.xz delta-%{version}/{vendor,Cargo.lock}
13Source1: %{name}-crates-%{version}.tar.xz
d49c59fe 14# Source1-md5: 8478eef12ebbc54ab6bf1ed61b5385f6
92a8f118
JP
15URL: https://github.com/dandavison/delta
16BuildRequires: cargo
17BuildRequires: rust
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%description
21Delta aims to make studying diffs both efficient and enjoyable: it
22allows you to make extensive changes to the layout and styling of
23diffs, as well as allowing you to stay arbitrarily close to the
24default git/diff output, changing just the aspects that you want to
25change.
26
27Delta'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
49export CARGO_HOME="$(pwd)/.cargo"
50
51mkdir -p "$CARGO_HOME"
52cat >.cargo/config <<EOF
53[source.crates-io]
54registry = 'https://github.com/rust-lang/crates.io-index'
55replace-with = 'vendored-sources'
56
57[source.vendored-sources]
58directory = '$PWD/vendor'
59EOF
60
61%build
62export CARGO_HOME="$(pwd)/.cargo"
63
64cargo -v build --release --frozen
65
66%install
67rm -rf $RPM_BUILD_ROOT
68export CARGO_HOME="$(pwd)/.cargo"
69
70cargo -v install --frozen --root $RPM_BUILD_ROOT%{_prefix} --path $PWD
71%{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates*
72
73%clean
74rm -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.056387 seconds and 4 git commands to generate.