capnproto/capnproto.spec
Jakub Jelen e0209b3e8e capnproto-1.3.0 (RHEL-127899)
Resolves: RHEL-127899
2025-12-17 14:24:36 +01:00

87 lines
1.9 KiB
RPMSpec
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Force out of source build
%undefine __cmake_in_source_build
%global modulename %{name}-c++
Name: capnproto
Version: 1.3.0
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
%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