# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} %global crate libz-ng-sys Name: rust-libz-ng-sys Version: 1.1.15 Release: %autorelease Summary: Low-level bindings to zlib-ng License: MIT OR Apache-2.0 URL: https://crates.io/crates/libz-ng-sys Source: %{crates_source} # # * Replace the upstream script for building zlib-ng with one that # # unconditionally links the system one. The result is so trivial and has so # # little in common with the original that it makes sense to ship an # # alternative source rather than a patch. Source10: build_zng.rs BuildRequires: cargo-rpm-macros >= 24 BuildRequires: tomcli BuildRequires: pkgconfig(zlib-ng) %global _description %{expand: Low-level bindings to zlib-ng (libz-ng), a high-performance zlib library.} %description %{_description} %package devel Summary: %{summary} BuildArch: noarch Requires: pkgconfig(zlib-ng) %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE-APACHE %license %{crate_instdir}/LICENSE-MIT %doc %{crate_instdir}/README-zng.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 %prep %autosetup -n %{crate}-%{version} -p1 # Remove the bundled copy of zlib-ng and replace its build script rm -rv src/zlib-ng cp -p '%{SOURCE10}' . # We don’t need CMake since we are not building zlib-ng: tomcli set Cargo.toml del build-dependencies.cmake %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog