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