You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-imagequant-sys/rust-imagequant-sys.spec

142 lines
3.5 KiB

# Generated by rust2rpm 25
2 years ago
%bcond_without check
# C library name
%global lib libimagequant
%global crate imagequant-sys
Name: rust-imagequant-sys
Version: 4.0.3
2 years ago
Release: %autorelease
Summary: Convert 24/32-bit images to 8-bit palette with alpha channel
License: GPL-3.0-or-later
URL: https://crates.io/crates/imagequant-sys
Source: %{crates_source}
BuildRequires: cargo-rpm-macros >= 24
2 years ago
%global _description %{expand:
Convert 24/32-bit images to 8-bit palette with alpha channel. C API/FFI
libimagequant that powers pngquant lossy PNG compressor. Dual-licensed
like pngquant. See https://pngquant.org for details.}
%description %{_description}
%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
%license %{crate_instdir}/COPYRIGHT
%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}+capi-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+capi-devel %{_description}
This package contains library source intended for building other packages which
use the "capi" feature of the "%{crate}" crate.
%files -n %{name}+capi-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+threads-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+threads-devel %{_description}
This package contains library source intended for building other packages which
use the "threads" feature of the "%{crate}" crate.
%files -n %{name}+threads-devel
%ghost %{crate_instdir}/Cargo.toml
# C library packages
%package -n %{lib}
Summary: %{summary}
# Apache-2.0
# GPL-3.0-or-later
# MIT
# MIT OR Apache-2.0
# Zlib OR Apache-2.0 OR MIT
License: Apache-2.0 AND GPL-3.0-or-later AND MIT
# LICENSE.dependencies contains a full license breakdown
Obsoletes: libimagequant < 4.0.0
Provides: libimagequant%{_isa} = %{version}-%{release}
2 years ago
%description -n %{lib} %{_description}
%files -n %{lib}
%license COPYRIGHT
%license LICENSE.dependencies
%doc README.md
%{_libdir}/%{lib}.so.0{,.*}
%package -n %{lib}-devel
Summary: Development files for %{lib}
Requires: %{lib}%{?_isa} = %{version}-%{release}
Obsoletes: libimagequant-devel < 4.0.0
Provides: libimagequant-devel%{_isa} = %{version}-%{release}
2 years ago
%description -n %{lib}-devel %{_description}
The %{lib}-devel package contains libraries and header files for
developing applications that use %{lib}.
%files -n %{lib}-devel
%{_includedir}/%{lib}.h
%{_libdir}/%{lib}.so
%{_libdir}/pkgconfig/imagequant.pc
%prep
%autosetup -n %{crate}-%{version} -p1
2 years ago
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
# Dependency for building C shared library
echo "cargo-c"
%build
%cargo_build
%cargo_cbuild
%{cargo_license_summary}
2 years ago
%{cargo_license} > LICENSE.dependencies
%install
%cargo_install
%cargo_cinstall
2 years ago
# Don't ship static library
rm -f %{buildroot}%{_libdir}/%{lib}.a
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog