%global commit c42850ecab8784d874d10bfb309a0acd25280c87 %global shortcommit c42850e # Untagged upstream: pin the exact commit. Its hash output must stay stable # (cnt.cid survives dump/restore), so never bump without re-verifying the digests. %global snapdate 20250716 # CREATE EXTENSION xxhash; artifacts ship as xxhash.* regardless of the RPM name. %global extname xxhash %global extver 0.0.2 # Bundled xxHash sources are 0.8.3 (CHANGELOG). %global xxhashver 0.8.3 Name: pg_xxhash Version: %{extver}^%{snapdate}g%{shortcommit} Release: 1%{?dist} Summary: Fast xxHash hashing functions for PostgreSQL License: MIT AND BSD-2-Clause URL: https://github.com/hatarist/pg_xxhash Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildRequires: gcc BuildRequires: make BuildRequires: postgresql-server-devel Requires: postgresql-server # xxHash (BSD-2-Clause) is vendored into the extension's .so, not linked. Provides: bundled(xxhash) = %{xxhashver} %description pg_xxhash exposes the xxHash family (xxh32, xxh64, xxh3_64, xxh128) as PostgreSQL functions for fast, non-cryptographic hashing of text and binary values. %prep %autosetup -n %{name}-%{commit} %build # jit=off: ship no LLVM bitcode (with_llvm=no), per the deployment contract. %make_build USE_PGXS=1 PG_CONFIG=%{_bindir}/pg_config with_llvm=no %install %make_install USE_PGXS=1 PG_CONFIG=%{_bindir}/pg_config with_llvm=no %check # No running server in the offline chroot: smoke-check the built artifacts only. test -f %{buildroot}%{_libdir}/pgsql/%{extname}.so test -f %{buildroot}%{_datadir}/pgsql/extension/%{extname}.control grep -q "default_version = '%{extver}'" \ %{buildroot}%{_datadir}/pgsql/extension/%{extname}.control %files %license LICENSE %doc README.md CHANGELOG.md %{_libdir}/pgsql/%{extname}.so %{_datadir}/pgsql/extension/%{extname}.control # 0.0.2 has no standalone base script; CREATE EXTENSION resolves it via # 0.0.1 + the 0.0.1--0.0.2 upgrade, so ship every script (glob). %{_datadir}/pgsql/extension/%{extname}--*.sql %changelog * Tue Jun 30 2026 Bahtiar `kalkin-` Gadimov - 0.0.2^20250716gc42850e-1 - Initial package of pg_xxhash at c42850e (xxHash 0.8.3)