|
|
|
@ -3,11 +3,11 @@
|
|
|
|
|
%global debug_package %{nil}
|
|
|
|
|
|
|
|
|
|
%global crate zstd-sys
|
|
|
|
|
%global upstream_version 1.4.20+zstd.1.4.9
|
|
|
|
|
%global upstream_version 1.5.0+zstd.1.4.9
|
|
|
|
|
|
|
|
|
|
Name: rust-%{crate}
|
|
|
|
|
Version: 1.4.20
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Version: 1.5.0
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: Low-level bindings for the zstd compression library
|
|
|
|
|
|
|
|
|
|
# Upstream license specification: MIT/Apache-2.0
|
|
|
|
@ -16,7 +16,7 @@ URL: https://crates.io/crates/zstd-sys
|
|
|
|
|
Source: %{crates_source %{crate} %{upstream_version}}
|
|
|
|
|
# Initial patched metadata
|
|
|
|
|
# * Remove zstd version from version field
|
|
|
|
|
# * Make pkg-config default
|
|
|
|
|
# * Make pkg-config and bindgen default features
|
|
|
|
|
Patch0: zstd-sys-fix-metadata.diff
|
|
|
|
|
|
|
|
|
|
ExclusiveArch: %{rust_arches}
|
|
|
|
@ -142,6 +142,18 @@ which use "std" feature of "%{crate}" crate.
|
|
|
|
|
%files -n %{name}+std-devel
|
|
|
|
|
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
|
|
|
|
|
|
|
|
|
%package -n %{name}+thin-devel
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description -n %{name}+thin-devel %{_description}
|
|
|
|
|
|
|
|
|
|
This package contains library source intended for building other packages
|
|
|
|
|
which use "thin" feature of "%{crate}" crate.
|
|
|
|
|
|
|
|
|
|
%files -n %{name}+thin-devel
|
|
|
|
|
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
|
|
|
|
|
|
|
|
|
%package -n %{name}+zstdmt-devel
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
@ -162,14 +174,9 @@ rm -rf zstd/
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
%cargo_generate_buildrequires -a
|
|
|
|
|
echo "pkgconfig(libzstd)"
|
|
|
|
|
echo "bindgen"
|
|
|
|
|
echo "llvm-devel"
|
|
|
|
|
echo 'pkgconfig(libzstd)'
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
export LLVM_CONFIG_PATH=/usr/bin/llvm-config-%{__isa_bits}
|
|
|
|
|
bindgen %{_includedir}/zstd.h --ctypes-prefix ::libc --blacklist-type max_align_t --size_t-is-usize --rustified-enum '.*' --use-core -o src/bindings.rs --
|
|
|
|
|
bindgen %{_includedir}/zstd.h --blacklist-type max_align_t --size_t-is-usize --rustified-enum '.*' --use-core -o src/bindings_std.rs --
|
|
|
|
|
%cargo_build -a
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
@ -177,11 +184,13 @@ bindgen %{_includedir}/zstd.h --blacklist-type max_align_t --size_t-is-usize --r
|
|
|
|
|
|
|
|
|
|
%if %{with check}
|
|
|
|
|
%check
|
|
|
|
|
export LLVM_CONFIG_PATH=/usr/bin/llvm-config-%{__isa_bits}
|
|
|
|
|
%cargo_test -a
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon May 10 2021 Fabio Valentini <decathorpe@gmail.com> - 1.5.0-1
|
|
|
|
|
- Update to version 1.5.0+zstd.1.4.9.
|
|
|
|
|
|
|
|
|
|
* Wed Mar 31 21:35:34 CEST 2021 Robert-André Mauchin <zebob.m@gmail.com> - 1.4.20-2
|
|
|
|
|
- Remove downgrade of bindgen to 0.56
|
|
|
|
|
|
|
|
|
|