summaryrefslogtreecommitdiff
path: root/absl.spec
diff options
context:
space:
mode:
Diffstat (limited to 'absl.spec')
-rw-r--r--absl.spec86
1 files changed, 86 insertions, 0 deletions
diff --git a/absl.spec b/absl.spec
new file mode 100644
index 0000000..0851267
--- /dev/null
+++ b/absl.spec
@@ -0,0 +1,86 @@
+# Abseil C++ Common Libraries.
+#
+# Source0 is the upstream release tag archive. The tarball placed in SOURCES is
+# a repackage of tag 20260817.0 (commit 2065f4ded0558c6f89fee67c8e5228feb4eb960e)
+# with its top-level directory normalised to name-version form, so the
+# automatic source extraction directory is deterministic and reproducible.
+%undefine __cmake_in_source_build
+
+# Upstream library soname version (ABSL_SOVERSION), independent of the
+# YYYYMMDD release version.
+%global absl_soversion 2608.0.0
+
+Name: absl
+Version: 20260817.0
+Release: 1%{?dist}
+Summary: C++ Common Libraries
+
+License: Apache-2.0
+URL: https://abseil.io
+Source0: https://github.com/abseil/abseil-cpp/archive/refs/tags/%{version}.tar.gz#/absl-%{version}.tar.gz
+
+BuildRequires: cmake
+BuildRequires: ninja-build
+BuildRequires: gcc-c++
+BuildRequires: make
+
+%description
+Abseil is an open-source collection of C++ library code designed to augment
+the C++ standard library. The Abseil library code is collected from Google's
+own C++ code base, has been extensively tested and used in production, and is
+the same code we depend on in our daily coding lives.
+
+In some cases, Abseil provides pieces missing from the C++ standard; in others,
+Abseil provides alternatives to the standard for special needs we have found
+through usage in the Google code base. We denote those cases clearly within the
+library code we provide you.
+
+Abseil is not meant to be a competitor to the standard library; we have just
+found that many of these utilities serve a purpose within our code base, and we
+now want to provide those resources to the C++ community as a whole.
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+Development headers, CMake integration files and pkgconfig files for %{name}
+(Abseil C++ Common Libraries).
+
+%prep
+%autosetup -n %{name}-%{version}
+
+%build
+# Invoke the cmake binary directly rather than the cmake rpm macro so the
+# build is portable across builders, including ones lacking the cmake macro.
+cmake -S %{_vpath_srcdir} -B %{_vpath_builddir} -GNinja \
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DCMAKE_INSTALL_LIBDIR=%{_lib} \
+ -DBUILD_SHARED_LIBS=ON \
+ -DABSL_BUILD_TESTING=OFF \
+ -DABSL_BUILD_TEST_HELPERS=OFF \
+ -DABSL_PROPAGATE_CXX_STD=ON \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_CXX_STANDARD=17
+cmake --build %{_vpath_builddir} --parallel
+
+%install
+DESTDIR="%{buildroot}" cmake --install "%{_vpath_builddir}"
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%license LICENSE
+%doc FAQ.md README.md UPGRADES.md
+%{_libdir}/libabsl_*.so.*
+
+%files devel
+%{_includedir}/absl
+%{_libdir}/cmake/absl
+%{_libdir}/libabsl_*.so
+%{_libdir}/pkgconfig/*.pc
+
+%changelog
+* Fri Nov 27 2026 openEuler Builder <builder@openeuler.org> - 20260817.0-1
+- Initial package (Abseil C++ Common Libraries)