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