]> git.pld-linux.org Git - packages/delta.git/commitdiff
new (version 0.3.0) auto/th/delta-0.3.0-1
authorJan Palus <atler@pld-linux.org>
Sun, 2 Aug 2020 23:17:58 +0000 (01:17 +0200)
committerJan Palus <atler@pld-linux.org>
Sun, 2 Aug 2020 23:17:58 +0000 (01:17 +0200)
delta.spec [new file with mode: 0644]

diff --git a/delta.spec b/delta.spec
new file mode 100644 (file)
index 0000000..8054d2d
--- /dev/null
@@ -0,0 +1,79 @@
+Summary:       A viewer for git and diff output
+Name:          delta
+Version:       0.3.0
+Release:       1
+License:       MIT
+Group:         Applications
+Source0:       https://github.com/dandavison/delta/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 2478af54c90dd207f7fe0db3c802c346
+# cd delta-%{version}
+# cargo vendor
+# cd ..
+# tar cJf delta-crates-%{version}.tar.xz delta-%{version}/{vendor,Cargo.lock}
+Source1:       %{name}-crates-%{version}.tar.xz
+# Source1-md5: b154f9661df86b69323b3f08e14e0e69
+URL:           https://github.com/dandavison/delta
+BuildRequires: cargo
+BuildRequires: rust
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Delta aims to make studying diffs both efficient and enjoyable: it
+allows you to make extensive changes to the layout and styling of
+diffs, as well as allowing you to stay arbitrarily close to the
+default git/diff output, changing just the aspects that you want to
+change.
+
+Delta's main features are:
+
+- Language syntax highlighting with color themes
+- Within-line highlights based on a Levenshtein edit inference
+  algorithm
+- Style (foreground color, background color, font attributes) can be
+  configured independently for more than 20 different sections of the
+  diff
+- Stylable box/line decorations to draw attention to commit, file and
+  hunk header sections.
+- Line numbering (`-n`)
+- `--diff-highlight` and `--diff-so-fancy` emulation modes
+- Code can be copied directly from the diff (`-/+` markers are removed
+  by default).
+- `n` and `N` keybindings to move between files in large diffs, and
+  between diffs in `log -p` views (`--navigate`) A viewer for git and
+  diff output.
+
+%prep
+%setup -q -b1
+
+# use our offline registry
+export CARGO_HOME="$(pwd)/.cargo"
+
+mkdir -p "$CARGO_HOME"
+cat >.cargo/config <<EOF
+[source.crates-io]
+registry = 'https://github.com/rust-lang/crates.io-index'
+replace-with = 'vendored-sources'
+
+[source.vendored-sources]
+directory = '$PWD/vendor'
+EOF
+
+%build
+export CARGO_HOME="$(pwd)/.cargo"
+
+cargo -v build --release --frozen
+
+%install
+rm -rf $RPM_BUILD_ROOT
+export CARGO_HOME="$(pwd)/.cargo"
+
+cargo -v install --frozen --root $RPM_BUILD_ROOT%{_prefix} --path $PWD
+%{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates*
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.md
+%attr(755,root,root) %{_bindir}/delta
This page took 0.106747 seconds and 4 git commands to generate.