2022-09-18 10:34:52 +03:00
|
|
|
%define debug %nil
|
|
|
|
%define debug_package %nil
|
2024-12-21 21:24:31 +00:00
|
|
|
%define rustver 1.83.0
|
2022-09-18 10:34:52 +03:00
|
|
|
|
|
|
|
Name: difftastic
|
2025-02-11 19:25:32 +00:00
|
|
|
Version: 0.63.0
|
2022-09-18 10:34:52 +03:00
|
|
|
Release: 1
|
|
|
|
Summary: A diff that understands syntax
|
|
|
|
URL: https://difftastic.wilfred.me.uk
|
|
|
|
Source0: https://github.com/Wilfred/difftastic/archive/%{version}/%{name}-%{version}.tar.gz
|
|
|
|
Source1000: %{name}.rpmlintrc
|
|
|
|
License: MIT
|
|
|
|
Group: Development/Other
|
|
|
|
Provides: difft
|
2024-05-12 11:34:33 +00:00
|
|
|
%if %{mdvver} > 201610
|
|
|
|
BuildRequires: rust
|
|
|
|
BuildRequires: cargo
|
|
|
|
%endif
|
2022-09-18 10:34:52 +03:00
|
|
|
BuildRequires: git-core
|
|
|
|
BuildRequires: upx
|
2024-05-12 11:34:33 +00:00
|
|
|
BuildRequires: curl
|
2024-12-21 22:01:49 +00:00
|
|
|
BuildRequires: pkgconfig(openssl3.3)
|
2022-09-18 10:34:52 +03:00
|
|
|
|
|
|
|
%description
|
|
|
|
Difftastic is an experimental diff tool that compares
|
|
|
|
files based on their syntax.
|
|
|
|
|
|
|
|
Difftastic supports the following languages:
|
|
|
|
|
|
|
|
Bash
|
|
|
|
C
|
|
|
|
C++
|
|
|
|
C#
|
|
|
|
Clojure
|
|
|
|
Common Lisp
|
|
|
|
CSS
|
|
|
|
Dart
|
|
|
|
Elixir
|
|
|
|
Emacs Lisp
|
|
|
|
Go
|
|
|
|
Haskell
|
|
|
|
Janet
|
|
|
|
Java
|
|
|
|
JavaScript (and JSX)
|
|
|
|
JSON
|
|
|
|
Lua
|
|
|
|
Nix
|
|
|
|
OCaml
|
|
|
|
PHP
|
|
|
|
Python
|
|
|
|
Ruby
|
|
|
|
Rust
|
|
|
|
Scala
|
|
|
|
TypeScript (and TSX)
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
2024-05-12 11:34:33 +00:00
|
|
|
%if %{mdvver} <= 201610
|
2024-10-25 14:29:38 +00:00
|
|
|
curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs |\
|
2024-05-12 11:34:33 +00:00
|
|
|
sh -s -- -y --profile default --default-toolchain %{rustver}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
2022-09-18 10:34:52 +03:00
|
|
|
%build
|
2024-05-12 11:34:33 +00:00
|
|
|
%if %{mdvver} <= 201610
|
|
|
|
source "$HOME/.cargo/env"
|
|
|
|
%endif
|
|
|
|
|
2022-09-18 10:34:52 +03:00
|
|
|
cargo build --release
|
|
|
|
upx ./target/release/difft
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -Dm0755 ./target/release/difft %{buildroot}%{_bindir}/difft
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md LICENSE
|
|
|
|
%{_bindir}/difft
|
|
|
|
|