]> git.pld-linux.org Git - packages/delta.git/blame - delta.spec
up to 0.8.0
[packages/delta.git] / delta.spec
CommitLineData
2cf61d60 1%define crates_ver 0.8.0
4a2626ba 2
92a8f118
JP
3Summary: A viewer for git and diff output
4Name: delta
2cf61d60
JP
5Version: 0.8.0
6Release: 1
92a8f118
JP
7License: MIT
8Group: Applications
9Source0: https://github.com/dandavison/delta/archive/%{version}/%{name}-%{version}.tar.gz
2cf61d60 10# Source0-md5: 91dfb57b81caeb1d2a5b79879ba991ee
f2b5808f 11# ./create-crates.sh
4a2626ba 12Source1: %{name}-crates-%{crates_ver}.tar.xz
2cf61d60 13# Source1-md5: 5383876724e630e92d3ef9dfa75901be
92a8f118
JP
14URL: https://github.com/dandavison/delta
15BuildRequires: cargo
a311b6b6 16BuildRequires: rpmbuild(macros) >= 2.004
92a8f118 17BuildRequires: rust
c42db62c
JP
18BuildRequires: tar >= 1:1.22
19BuildRequires: xz
a311b6b6 20ExclusiveArch: %{rust_arches}
92a8f118
JP
21BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23%description
24Delta aims to make studying diffs both efficient and enjoyable: it
25allows you to make extensive changes to the layout and styling of
26diffs, as well as allowing you to stay arbitrarily close to the
27default git/diff output, changing just the aspects that you want to
28change.
29
30Delta's main features are:
31
32- Language syntax highlighting with color themes
33- Within-line highlights based on a Levenshtein edit inference
34 algorithm
35- Style (foreground color, background color, font attributes) can be
36 configured independently for more than 20 different sections of the
37 diff
38- Stylable box/line decorations to draw attention to commit, file and
39 hunk header sections.
40- Line numbering (`-n`)
41- `--diff-highlight` and `--diff-so-fancy` emulation modes
42- Code can be copied directly from the diff (`-/+` markers are removed
43 by default).
44- `n` and `N` keybindings to move between files in large diffs, and
45 between diffs in `log -p` views (`--navigate`) A viewer for git and
46 diff output.
47
48%prep
4a2626ba
JP
49%setup -q -a1
50
51%{__mv} delta-%{crates_ver}/* .
52sed -i -e 's/@@VERSION@@/%{version}/' Cargo.lock
92a8f118
JP
53
54# use our offline registry
55export CARGO_HOME="$(pwd)/.cargo"
56
57mkdir -p "$CARGO_HOME"
58cat >.cargo/config <<EOF
59[source.crates-io]
60registry = 'https://github.com/rust-lang/crates.io-index'
61replace-with = 'vendored-sources'
62
63[source.vendored-sources]
64directory = '$PWD/vendor'
65EOF
66
67%build
68export CARGO_HOME="$(pwd)/.cargo"
69
e5a4ca85 70%cargo_build --frozen
92a8f118
JP
71
72%install
73rm -rf $RPM_BUILD_ROOT
74export CARGO_HOME="$(pwd)/.cargo"
75
e5a4ca85 76%cargo_install --frozen --root $RPM_BUILD_ROOT%{_prefix} --path $PWD
92a8f118
JP
77%{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates*
78
79%clean
80rm -rf $RPM_BUILD_ROOT
81
82%files
83%defattr(644,root,root,755)
84%doc README.md
85%attr(755,root,root) %{_bindir}/delta
This page took 0.120242 seconds and 4 git commands to generate.