Initial commit on c10s

Resolves: RHEL-114452
This commit is contained in:
Jakub Jelen 2025-09-26 11:45:03 +02:00
parent 4d20060539
commit dcc6368c2d
3 changed files with 93 additions and 0 deletions

1
.gitignore vendored
View File

@ -0,0 +1 @@
/capnproto-c++-1.0.1.tar.gz

91
capnproto.spec Normal file
View File

@ -0,0 +1,91 @@
# Force out of source build
%undefine __cmake_in_source_build
%global modulename %{name}-c++
Name: capnproto
Version: 1.0.1
Release: %autorelease
Summary: A data interchange format and capability-based RPC system
License: MIT
URL: https://capnproto.org
Source0: https://capnproto.org/%{modulename}-%{version}.tar.gz
# We need C++
BuildRequires: gcc-c++
BuildRequires: cmake >= 3.1
# Ensure that we use matching version of libraries
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description
Capn Proto is an insanely fast data interchange format
and capability-based RPC system. Think JSON, except binary.
Or think Protocol Buffers, except faster. In fact, in benchmarks,
Capn Proto is INFINITY TIMES faster than Protocol Buffers.
This package contains the schema compiler and command-line
encoder/decoder tools.
%package libs
Summary: Libraries for %{name}
%description libs
The %{name}-libs package contains the libraries for using %{name}
in applications.
%package devel
Summary: Development files for %{name}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%autosetup -n %{modulename}-%{version} -p2
# Disable broken test
## Cf. https://github.com/capnproto/capnproto/issues/1349
## Cf. https://github.com/capnproto/capnproto/issues/1398
sed -e '/TEST(AsyncIo, AncillaryMessageHandler)/,/^}/s/^/\/\//' -i src/kj/async-io-test.c++
%build
# The tests are randomly failing due to poor sparsing support in the build system
export CFLAGS="%{build_cflags} -DHOLES_NOT_SUPPORTED=1"
export CXXFLAGS="%{build_cxxflags} -DHOLES_NOT_SUPPORTED=1"
%cmake -DBUILD_TESTING=ON
%cmake_build
%check
%ctest
%install
%cmake_install
find %{buildroot} -name '*.la' -delete
%files
%{_bindir}/capnp
%{_bindir}/capnpc
%{_bindir}/capnpc-c++
%{_bindir}/capnpc-capnp
%files libs
%license LICENSE.txt
%{_libdir}/*.so.*
%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_libdir}/cmake/CapnProto/
%changelog
%autochangelog

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (capnproto-c++-1.0.1.tar.gz) = c60291f433eea15a51e480e1679a4b9b3b5e67edebc445e371a7a32fce6ec5a7e4b440b17b2adc0565519ec369e3dae8ea727ae790a082a53ecd0d245b5275a9