# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. # Disable build id note requirement for now %undefine _missing_build_ids_terminate_build # Force special prefix for Vespa %define _prefix /opt/vespa-deps # Only strip debug info %global _find_debuginfo_opts -g # Don't provide shared library or pkgconfig %global __provides_exclude ^(lib.*\\.so\\.[0-9]*\\(\\)\\(64bit\\)|pkgconfig\\(.*)$ %global __requires_exclude ^lib(re2|absl_.*)\\.so\\.[0-9.]*\\([A-Z._0-9]*\\)\\(64bit\\)|pkgconfig\\(absl_.*)$ # Version %define ver_major 20251105 %define ver_major_long 2025-11-05 %define ver_release 1 Summary: re2 compiled for vespa Name: vespa-re2 Version: %{ver_major} Release: %{ver_release}%{?dist} License: BSD URL: https://github.com/google/re2/ Source0: https://github.com/google/re2/archive/%{ver_major_long}.tar.gz %if 0%{?el8} || 0%{?el9} || 0%{?el10} %define _devtoolset_enable /opt/rh/gcc-toolset-15/enable BuildRequires: vespa-toolset-15-meta BuildRequires: vespa-icu-devel %else BuildRequires: icu-devel BuildRequires: gcc BuildRequires: gcc-c++ %endif %if 0%{?el8} || 0%{?el9} BuildRequires: vespa-cmake BuildRequires: vespa-abseil-cpp-devel %else BuildRequires: cmake BuildRequires: abseil-cpp-devel %endif BuildRequires: make %global _vespa_3rdparty_deps_packaging_notice \ See https://github.com/vespa-engine/vespa-3rdparty-deps for details \ about packaging. %description re2 compiled for vespa %{_vespa_3rdparty_deps_packaging_notice} %package devel Summary: re2 compiled for vespa -- devel Requires: %{name}%{?_isa} = %{version}-%{release} %description devel re2 compiled for vespa -- devel %{_vespa_3rdparty_deps_packaging_notice} %prep %setup -n re2-%{ver_major_long} %build %if 0%{?_devtoolset_enable:1} source %{_devtoolset_enable} || true %endif # PATH to vespa-cmake etc PATH=%{_prefix}/bin:$PATH %ifarch x86_64 %define _arch_cmake_options -march=haswell %endif %ifarch aarch64 %define _arch_cmake_options -march=armv8.2-a+dotprod+crypto+crc -mtune=neoverse-n1 %endif cmake -S . -B build \ -DCMAKE_PREFIX_PATH=%{_prefix} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_DO_STRIP=OFF \ -DCMAKE_INSTALL_RPATH=\$ORIGIN \ -DCMAKE_BUILD_WITH_INSTALL_RPATH=true \ -DCMAKE_CXX_STANDARD=20 \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{_arch_cmake_options} -g -O3" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo VERBOSE=1 cmake --build build %{?_smp_mflags} %install %if 0%{?_devtoolset_enable:1} source %{_devtoolset_enable} || true %endif # PATH to vespa-cmake etc PATH=%{_prefix}/bin:$PATH DESTDIR="%{buildroot}" cmake --install build %files %license LICENSE %{_libdir} %exclude %{_libdir}/*.so %files devel %license LICENSE %{_includedir} %{_libdir}/*.so %changelog * Wed May 27 2026 Arne Juul - use 2025-11-05 version * Tue Aug 12 2025 Arne Juul - use 2025-08-12 version