The package rpms/rust-xxhash-c-sys.git has added or updated architecture specific content
in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-xxhash-c-sys.git/commit/?id=....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 844609e9d1f361321d717b91c3b11d58d8782101
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Thu May 5 20:50:12 2022 +0200
Initial import (#2080245)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6f6abc8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/xxhash-c-sys-0.8.3.crate
+/LICENSE
diff --git a/.rust2rpm.conf b/.rust2rpm.conf
new file mode 100644
index 0000000..8ca8087
--- /dev/null
+++ b/.rust2rpm.conf
@@ -0,0 +1,5 @@
+[DEFAULT]
+buildrequires =
+ pkgconfig(libxxhash) >= 0.8.1
+lib.requires =
+ pkgconfig(libxxhash) >= 0.8.1
diff --git a/0001-build-and-link-against-shared-xxhash-library.patch
b/0001-build-and-link-against-shared-xxhash-library.patch
new file mode 100644
index 0000000..badc96c
--- /dev/null
+++ b/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 <decathorpe(a)gmail.com>
+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/README.md b/README.md
deleted file mode 100644
index 9be7569..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# rust-xxhash-c-sys
-
-The rust-xxhash-c-sys package
diff --git a/rust-xxhash-c-sys.spec b/rust-xxhash-c-sys.spec
new file mode 100644
index 0000000..7899fa0
--- /dev/null
+++ b/rust-xxhash-c-sys.spec
@@ -0,0 +1,82 @@
+# Generated by rust2rpm 21
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate xxhash-c-sys
+
+Name: rust-%{crate}
+Version: 0.8.3
+Release: %autorelease
+Summary: Bindings to xxhash
+
+# Upstream license specification: BSL-1.0
+#
https://github.com/DoumanAsh/xxhash-c-sys/pull/3
+License: Boost
+URL:
https://crates.io/crates/xxhash-c-sys
+Source0: %{crates_source}
+Source1:
https://github.com/DoumanAsh/xxhash-c-sys/raw/d241dc8/LICENSE
+# Initial patched metadata
+# * build and link against shared xxhash library
+Patch0: xxhash-c-sys-fix-metadata.diff
+Patch1: 0001-build-and-link-against-shared-xxhash-library.patch
+
+ExclusiveArch: %{rust_arches}
+
+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
+cp %{SOURCE1} .
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+echo 'pkgconfig(libxxhash) >= 0.8.1'
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..6262c76
--- /dev/null
+++ b/sources
@@ -0,0 +1,2 @@
+SHA512 (xxhash-c-sys-0.8.3.crate) =
a7daed0bcd2bbdff65ce5e0842e38e1811a4e5e1dd42d279c76ebaf837d5d036ce533a4dd43a05388434564ed767b98cd8a085f39151194abad117c5648b3a0e
+SHA512 (LICENSE) =
d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
diff --git a/xxhash-c-sys-fix-metadata.diff b/xxhash-c-sys-fix-metadata.diff
new file mode 100644
index 0000000..ae8e618
--- /dev/null
+++ b/xxhash-c-sys-fix-metadata.diff
@@ -0,0 +1,22 @@
+--- xxhash-c-sys-0.8.3/Cargo.toml 1970-01-01T00:00:01+00:00
++++ xxhash-c-sys-0.8.3/Cargo.toml 2022-04-29T10:20:53.096396+00:00
+@@ -16,10 +16,9 @@
+ authors = ["Douman <douman(a)gmx.se>"]
+ include = [
+ "**/*.rs",
+- "**/*.c",
+- "**/*.h",
+ "Cargo.toml",
+ "README.md",
++ "LICENSE",
+ ]
+ description = "Bindings to xxhash"
+ readme = "README.md"
+@@ -36,5 +35,5 @@
+ version = "0.2"
+ default-features = false
+
+-[build-dependencies.cc]
+-version = "1"
++[build-dependencies.pkg-config]
++version = "0.3"