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-blosc2-rs/SPECS/rust-blosc2-rs.spec

190 lines
6.0 KiB

## START: Set by rpmautospec
## (rpmautospec version 0.7.2)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 1;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
# Generated by rust2rpm 26
%bcond_without check
%global debug_package %{nil}
%global crate blosc2-rs
%global upstream_version 0.3.1+2.15.1
Name: rust-blosc2-rs
Version: 0.3.1
Release: %autorelease
Summary: Bindings to C Blosc2
License: MIT
URL: https://crates.io/crates/blosc2-rs
Source: %{crate}-%{upstream_version}-clean.crate
# * script to create tarball with only permissible content: run "rust2rpm" and
# then "./gen_clean_tarball.sh" for new versions
# * Exclude benchmarks and their data files from released crates (plus a few
# other files): https://github.com/milesgranger/blosc2-rs/pull/31
Source10: gen_clean_tarball.sh
# Automatically generated patch to strip dependencies and normalize metadata
Patch: blosc2-rs-fix-metadata-auto.diff
BuildRequires: cargo-rpm-macros >= 24
BuildRequires: tomcli
%global _description %{expand:
Bindings to C Blosc2.}
%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}/LICENSE
%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}+prefer-external-lz4-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+prefer-external-lz4-devel %{_description}
This package contains library source intended for building other packages which
use the "prefer-external-lz4" feature of the "%{crate}" crate.
%files -n %{name}+prefer-external-lz4-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+prefer-external-zlib-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+prefer-external-zlib-devel %{_description}
This package contains library source intended for building other packages which
use the "prefer-external-zlib" feature of the "%{crate}" crate.
%files -n %{name}+prefer-external-zlib-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+prefer-external-zstd-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+prefer-external-zstd-devel %{_description}
This package contains library source intended for building other packages which
use the "prefer-external-zstd" feature of the "%{crate}" crate.
%files -n %{name}+prefer-external-zstd-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+regenerate-bindings-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+regenerate-bindings-devel %{_description}
This package contains library source intended for building other packages which
use the "regenerate-bindings" feature of the "%{crate}" crate.
%files -n %{name}+regenerate-bindings-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+shared-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+shared-devel %{_description}
This package contains library source intended for building other packages which
use the "shared" feature of the "%{crate}" crate.
%files -n %{name}+shared-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+use-system-blosc2-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+use-system-blosc2-devel %{_description}
This package contains library source intended for building other packages which
use the "use-system-blosc2" feature of the "%{crate}" crate.
%files -n %{name}+use-system-blosc2-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{upstream_version} -p1
%cargo_prep
# Do not depend on criterion; it is needed only for benchmarks.
tomcli set Cargo.toml del dev-dependencies.criterion
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%ifnarch s390x
# * Do not test that the blosc2-sys bidings were generated against the exact
# version of c-blosc2 that upstream expects; we always use the system blosc2,
# whatever that may be.
%cargo_test -- -- --exact --skip tests::test_get_version_string
%else
skip="${skip-} --skip tests::test_get_version_string"
# Even after serious effort by upstream (see
# https://github.com/milesgranger/blosc2-rs/issues/23), several tests still
# fail on s390x. This would seem to justify making this package ExcludeArch,
# but that would have a ripple effect on python-cramjam and a whole tree of
# packages that depend on it, and which probably do not even use its blosc2
# support. We consider that outcome even worse than shipping broken blosc2
# support on s390x. Note that the endianness issues are probably in the C
# blosc2 library (and that the blosc2 packages ignores any and all test
# failures on s390x), and see also:
# https://github.com/Blosc/c-blosc2/issues/467.
skip="${skip-} --skip schunk::Chunk::decompress"
skip="${skip-} --skip schunk::Chunk::repeatval"
skip="${skip-} --skip schunk::Chunk::uninit"
skip="${skip-} --skip schunk::Chunk::zeros"
%cargo_test -- -- ${skip-}
%endif
%endif
%changelog
* Sun Jan 05 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.3.1-1
- Rebuilt for MSVSphere 10
## START: Generated by rpmautospec
* Fri Oct 04 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.3.1-1
- Initial package (close RHBZ#2312901)
## END: Generated by rpmautospec