]> git.pld-linux.org Git - packages/delta.git/blame - delta.spec
added script for creating crates tarball
[packages/delta.git] / delta.spec
CommitLineData
92a8f118
JP
1Summary: A viewer for git and diff output
2Name: delta
0e378336 3Version: 0.5.0
92a8f118
JP
4Release: 1
5License: MIT
6Group: Applications
7Source0: https://github.com/dandavison/delta/archive/%{version}/%{name}-%{version}.tar.gz
0e378336 8# Source0-md5: d75f73bc71407b86489eff88f837274d
f2b5808f 9# ./create-crates.sh
92a8f118 10Source1: %{name}-crates-%{version}.tar.xz
0e378336 11# Source1-md5: 55f896f9511f16f17d8d209d903904f1
92a8f118
JP
12URL: https://github.com/dandavison/delta
13BuildRequires: cargo
14BuildRequires: rust
15BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17%description
18Delta aims to make studying diffs both efficient and enjoyable: it
19allows you to make extensive changes to the layout and styling of
20diffs, as well as allowing you to stay arbitrarily close to the
21default git/diff output, changing just the aspects that you want to
22change.
23
24Delta's main features are:
25
26- Language syntax highlighting with color themes
27- Within-line highlights based on a Levenshtein edit inference
28 algorithm
29- Style (foreground color, background color, font attributes) can be
30 configured independently for more than 20 different sections of the
31 diff
32- Stylable box/line decorations to draw attention to commit, file and
33 hunk header sections.
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
37 by default).
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
40 diff output.
41
42%prep
43%setup -q -b1
44
45# use our offline registry
46export CARGO_HOME="$(pwd)/.cargo"
47
48mkdir -p "$CARGO_HOME"
49cat >.cargo/config <<EOF
50[source.crates-io]
51registry = 'https://github.com/rust-lang/crates.io-index'
52replace-with = 'vendored-sources'
53
54[source.vendored-sources]
55directory = '$PWD/vendor'
56EOF
57
58%build
59export CARGO_HOME="$(pwd)/.cargo"
60
61cargo -v build --release --frozen
62
63%install
64rm -rf $RPM_BUILD_ROOT
65export CARGO_HOME="$(pwd)/.cargo"
66
67cargo -v install --frozen --root $RPM_BUILD_ROOT%{_prefix} --path $PWD
68%{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates*
69
70%clean
71rm -rf $RPM_BUILD_ROOT
72
73%files
74%defattr(644,root,root,755)
75%doc README.md
76%attr(755,root,root) %{_bindir}/delta
This page took 0.136067 seconds and 4 git commands to generate.