# o3de2605-cityhash -- license-clean cityhash library for Open 3D Engine # # Builds Google's CityHash library from upstream source for license-clean # Linux distribution. cityhash is the only multiplatform-section bundle in # o3de/cmake/3rdParty/Platform/Linux/BuiltInPackages_linux_x86_64.cmake # that has no equivalent in Fedora's main repository, so the practical # Stage 1 swap path is a COPR rebuild of upstream sources. # # Engine consumes cityhash via: # - Code/Framework/AzCore/AzCore/Utils/TypeHash.cpp # `#include ` (one consumer; uses CityHash64) # - AzCore CMakeLists.txt links 3rdParty::cityhash # The bundled cityhash package on packages.o3de.org ships pre-compiled # static libs (libcityhash.a per-platform); the engine links it. # Our system swap produces libcityhash.so + libcityhash.a + headers # at /usr/include and /usr/lib64; the engine's FindCityhash-system # shim creates the 3rdParty::cityhash INTERFACE target wrapping it. # # Upstream: # https://github.com/google/cityhash # Last release: v1.1.1 (2014). Last commit f5dc541 (2022-07-19) is # a minor merge of issue #36 (Bazel build files); the C++ library # itself has been quiet since 2014. License: MIT. # # Versioned-major naming: package name carries the engine-major suffix # so `o3de2605-cityhash` and a future `o3de2610-cityhash` can co-exist # in the same `hellaenergy/o3de-dependencies` COPR project. See # `project_o3de_3p_versioning_research.md` memory note. %global cityhash_pkgrev rev1 %global cityhash_snapshot 20220719 %global cityhash_shortcommit f5dc541 # CS10 / RPM 4.19 compat: suppress auto-debuginfo subpackage emission. # Same pattern as o3de2605-mcpp-az. cityhash is a small + stable C++ # library; step-through debuggability isn't load-bearing here. Memory # note: `project_cs10_debuginfo_quirk.md`. %global debug_package %{nil} Name: o3de2605-cityhash Version: 1.1.1 Release: 1.%{cityhash_pkgrev}%{?dist} Summary: Google's CityHash family of hash functions for Open 3D Engine 26.05 License: MIT URL: https://github.com/google/cityhash Source0: cityhash-%{version}.%{cityhash_snapshot}git%{cityhash_shortcommit}.tar.gz BuildRequires: gcc-c++ BuildRequires: make BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool %description CityHash is a family of hash functions for strings developed at Google. This package provides the static and shared libraries plus the headers needed by the Open 3D Engine's AzCore TypeHash utilities. This is the o3de2605 build (matching the 26.05.x engine line). For direct cityhash use outside of O3DE, prefer the upstream sources at https://github.com/google/cityhash; this package is scoped to the O3DE packaging effort and ships under the o3deNNNN- naming convention to enable side-by-side coexistence with future major-line packages. %package devel Summary: Headers and static library for o3de2605-cityhash Requires: %{name}%{?_isa} = %{version}-%{release} %description devel city.h header plus the static archive libcityhash.a for linkers that prefer static linkage. The Open 3D Engine's AzCore links the shared libcityhash.so at engine build time; downstream gems that want static linkage can use the .a from this subpackage instead. Note: cityhash's citycrc.h (CRC-accelerated variant) is built only when configured with --enable-sse4.2; we don't enable it because no O3DE consumer uses it and SSE 4.2 requirement would narrow the build matrix unnecessarily. %prep %autosetup -n cityhash-%{version} %build # Configure for shared + static + position-independent code. The # engine consumes via INTERFACE IMPORTED target linking libcityhash.so # directly; the static archive is shipped as a developer convenience. %configure --enable-shared --enable-static --with-pic %make_build %install %make_install # Drop libtool archive; not useful and rpmlint flags it. rm -f %{buildroot}%{_libdir}/libcityhash.la # Drop the autotools-installed docs at /usr/share/doc/cityhash/; %doc # and %license directives install to /usr/share/doc/o3de2605-cityhash/ # and /usr/share/licenses/o3de2605-cityhash/ instead (the package-name # location rpm expects). rm -rf %{buildroot}%{_datadir}/doc/cityhash %files %license COPYING %doc README NEWS %{_libdir}/libcityhash.so.0 %{_libdir}/libcityhash.so.0.* %files devel %{_libdir}/libcityhash.so %{_libdir}/libcityhash.a %{_includedir}/city.h %changelog * Thu May 28 2026 Nick Schuetz - 1.1.1-1.rev1 - Initial license-clean rebuild from upstream google/cityhash at commit f5dc541 (2022-07-19). Stage 1 swap candidate for cityhash, the only multiplatform-section bundle in the engine's BuiltInPackages without a Fedora equivalent. Targets the o3de2605 engine line.