BuildRequires: cargo
BuildRequires: rust
Obsoletes: dssim < 2
-ExclusiveArch: %{x8664} %{ix86}
+ExclusiveArch: %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _debugsource_packages 0
+%ifarch x32
+%define target_opt --target x86_64-unknown-linux-gnux32
+%else
+%define target_opt %{nil}
+%endif
+
%description
This tool computes (dis)similarity between two or more PNG images
using an algorithm approximating human vision.
%build
export CARGO_HOME="$(pwd)/.cargo"
-cargo -v build --release --frozen
+cargo -v build --release --frozen %{target_opt}
%install
rm -rf $RPM_BUILD_ROOT
export CARGO_HOME="$(pwd)/.cargo"
-cargo -v install --frozen --path . --root $RPM_BUILD_ROOT%{_prefix}
+cargo -v install --frozen %{target_opt} \
+ --path . \
+ --root $RPM_BUILD_ROOT%{_prefix}
%{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates.toml
%{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates2.json