commit 2e52de9a07d3a3007d548e7f2a8306669b5c2651 Author: tigro Date: Mon Jan 15 23:10:44 2024 +0300 import rust-xxhash-c-sys-0.8.4-1.el9 diff --git a/.rust-xxhash-c-sys.metadata b/.rust-xxhash-c-sys.metadata new file mode 100644 index 0000000..e69de29 diff --git a/SOURCES/0001-build-and-link-against-shared-xxhash-library.patch b/SOURCES/0001-build-and-link-against-shared-xxhash-library.patch new file mode 100644 index 0000000..badc96c --- /dev/null +++ b/SOURCES/0001-build-and-link-against-shared-xxhash-library.patch @@ -0,0 +1,27 @@ +From cfd35c97f0cfe947d8d31ea89613b2f66489d34c Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Fri, 29 Apr 2022 12:16:10 +0200 +Subject: [PATCH] build and link against shared xxhash library + +--- + build.rs | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/build.rs b/build.rs +index 15ceda2..fa9739e 100644 +--- a/build.rs ++++ b/build.rs +@@ -1,9 +1,3 @@ + fn main() { +- let mut cc = cc::Build::new(); +- +- cc.include("src/c/"); +- cc.file("src/c/xxhash.c"); +- cc.warnings(false); +- +- cc.compile("xxhash"); ++ pkg_config::Config::new().atleast_version("0.8.1").probe("libxxhash").unwrap(); + } +-- +2.36.0 + diff --git a/SOURCES/xxhash-c-sys-0.8.4.crate b/SOURCES/xxhash-c-sys-0.8.4.crate new file mode 100644 index 0000000..775097b Binary files /dev/null and b/SOURCES/xxhash-c-sys-0.8.4.crate differ diff --git a/SOURCES/xxhash-c-sys-fix-metadata.diff b/SOURCES/xxhash-c-sys-fix-metadata.diff new file mode 100644 index 0000000..8a4e025 --- /dev/null +++ b/SOURCES/xxhash-c-sys-fix-metadata.diff @@ -0,0 +1,19 @@ +--- xxhash-c-sys-0.8.4/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ xxhash-c-sys-0.8.4/Cargo.toml 2023-08-07T22:17:30.216566+00:00 +@@ -16,8 +16,6 @@ + authors = ["Douman "] + include = [ + "**/*.rs", +- "**/*.c", +- "**/*.h", + "Cargo.toml", + "README.md", + "LICENSE", +@@ -37,5 +35,5 @@ + version = "0.2" + default-features = false + +-[build-dependencies.cc] +-version = "1" ++[build-dependencies.pkg-config] ++version = "0.3" diff --git a/SPECS/rust-xxhash-c-sys.spec b/SPECS/rust-xxhash-c-sys.spec new file mode 100644 index 0000000..8299ba9 --- /dev/null +++ b/SPECS/rust-xxhash-c-sys.spec @@ -0,0 +1,106 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.3.5) +## 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 24 +%bcond_without check +%global debug_package %{nil} + +%global crate xxhash-c-sys + +Name: rust-xxhash-c-sys +Version: 0.8.4 +Release: %autorelease +Summary: Bindings to xxhash + +License: BSL-1.0 +URL: https://crates.io/crates/xxhash-c-sys +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * build and link against shared xxhash library +Patch: xxhash-c-sys-fix-metadata.diff +Patch: 0001-build-and-link-against-shared-xxhash-library.patch + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Bindings to xxhash.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch +Requires: pkgconfig(libxxhash) >= 0.8.1 + +%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 + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +# remove bundled copy of xxhash +rm -r src/c +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires +echo 'pkgconfig(libxxhash) >= 0.8.1' + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +# * skip a test that hardcodes a check against the system xxhash version +%cargo_test -- -- --skip assert_version +%endif + +%changelog +* Mon Jan 15 2024 Arkady L. Shane - 0.8.4-1 +- Rebuilt for MSVSphere 9.3 + +* Mon Aug 07 2023 Fabio Valentini - 0.8.4-1 +- Update to version 0.8.4; Fixes RHBZ#2228013 + +* Thu Jul 27 2023 Fabio Valentini - 0.8.3-5 +- Skip a test that hardcodes a check against the system xxhash version + +* Sat Jul 22 2023 Fedora Release Engineering - 0.8.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jan 21 2023 Fedora Release Engineering - 0.8.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 0.8.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu May 05 2022 Fabio Valentini - 0.8.3-1 +- Initial import (#2080245)