|
|
|
@@ -0,0 +1,93 @@
|
|
|
|
|
# Generated by rust2rpm 23
|
|
|
|
|
%bcond_without check
|
|
|
|
|
|
|
|
|
|
%global crate imager
|
|
|
|
|
|
|
|
|
|
Name: rust-imager
|
|
|
|
|
Version: 0.3.2
|
|
|
|
|
Release: %autorelease
|
|
|
|
|
Summary: Automated image compression; optimizes the compression using various heuristics
|
|
|
|
|
|
|
|
|
|
License: MPL-2.0
|
|
|
|
|
URL: https://crates.io/crates/imager
|
|
|
|
|
Source: %{crates_source}
|
|
|
|
|
|
|
|
|
|
BuildRequires: gmold libjpeg-devel libpng-devel libtiff-devel libwebp-devel clang-devel llvm-devel openssl-devel anda-srpm-macros rust-packaging >= 21
|
|
|
|
|
|
|
|
|
|
%global _description %{expand:
|
|
|
|
|
Automated image compression; optimizes the compression using various
|
|
|
|
|
heuristics.}
|
|
|
|
|
|
|
|
|
|
%description %{_description}
|
|
|
|
|
|
|
|
|
|
%package -n %{crate}
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
|
|
%description -n %{crate} %{_description}
|
|
|
|
|
|
|
|
|
|
%files -n %{crate}
|
|
|
|
|
# FIXME: no license files detected
|
|
|
|
|
%doc README.md
|
|
|
|
|
%{_bindir}/imager
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description devel %{_description}
|
|
|
|
|
|
|
|
|
|
This package contains library source intended for building other packages which
|
|
|
|
|
use the "%{crate}" crate.
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
# FIXME: no license files detected
|
|
|
|
|
%doc %{crate_instdir}/README.md
|
|
|
|
|
%{crate_instdir}/
|
|
|
|
|
|
|
|
|
|
%package -n %{name}+default-devel
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description -n %{name}+default-devel %{_description}
|
|
|
|
|
|
|
|
|
|
This package contains library source intended for building other packages which
|
|
|
|
|
use the "default" feature of the "%{crate}" crate.
|
|
|
|
|
|
|
|
|
|
%files -n %{name}+default-devel
|
|
|
|
|
%ghost %{crate_instdir}/Cargo.toml
|
|
|
|
|
|
|
|
|
|
%package -n %{name}+buildtype-docs-only-devel
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description -n %{name}+buildtype-docs-only-devel %{_description}
|
|
|
|
|
|
|
|
|
|
This package contains library source intended for building other packages which
|
|
|
|
|
use the "buildtype-docs-only" feature of the "%{crate}" crate.
|
|
|
|
|
|
|
|
|
|
%files -n %{name}+buildtype-docs-only-devel
|
|
|
|
|
%ghost %{crate_instdir}/Cargo.toml
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
|
|
|
|
%cargo_prep_online
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
cat <<EOF >> .cargo/config
|
|
|
|
|
[target.x86_64-unknown-linux-gnu]
|
|
|
|
|
linker = "/usr/bin/clang"
|
|
|
|
|
rustflags = ["-C", "link-arg=--ld-path=/usr/bin/mold"]
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
%cargo_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%cargo_install
|
|
|
|
|
|
|
|
|
|
%if %{with check}
|
|
|
|
|
%check
|
|
|
|
|
%cargo_test
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
%autochangelog
|