%global expected_lite_version 0.6.3 # RESTinio is a header-only library, so the resulting package is noarch # and contains only headers + CMake package config files. Name: restinio Version: 0.7.3 Release: 1%{?dist} Summary: Header-only C++14 library for asynchronous HTTP/WebSocket servers # RESTinio itself is BSD-3-Clause. Bundled expected-lite is Boost. License: BSD-3-Clause AND BSL-1.0 URL: https://github.com/Stiffstream/restinio Source0: https://github.com/Stiffstream/restinio/releases/download/v.%{version}/restinio-%{version}.tar.bz2 # expected-lite is not packaged in Fedora; bundle the single header it needs. # Pin to a released tag rather than master for reproducible builds. Source1: https://raw.githubusercontent.com/martinmoene/expected-lite/v%{expected_lite_version}/include/nonstd/expected.hpp BuildArch: noarch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: asio-devel BuildRequires: llhttp-devel BuildRequires: fmt-devel # Header-only: consumers need the upstream dependency headers at build time. Requires: asio-devel Requires: llhttp-devel Requires: fmt-devel # We vendor the expected-lite header into our include tree. Provides: bundled(expected-lite) = %{expected_lite_version} %description RESTinio is a header-only, cross-platform C++14 library that brings asynchronous HTTP/1.1 and WebSocket server functionality. It is built on top of standalone Asio and is used as the embedded HTTP server in projects such as Jami. This package installs the RESTinio headers together with the CMake package configuration files needed to build software against the library. %prep %autosetup -n restinio-%{version} # Provide the bundled expected-lite header where RESTINIO_DEP_EXPECTED_LITE=system # expects to find . mkdir -p %{_builddir}/restinio-%{version}/vendor/nonstd install -m 0644 %{SOURCE1} %{_builddir}/restinio-%{version}/vendor/nonstd/expected.hpp %build # The CMake project lives in the dev/ subdirectory. %cmake -S dev \ -DRESTINIO_TEST=Off \ -DRESTINIO_SAMPLE=Off \ -DRESTINIO_BENCHMARK=Off \ -DRESTINIO_WITH_SOBJECTIZER=Off \ -DRESTINIO_DEP_STANDALONE_ASIO=system \ -DRESTINIO_DEP_LLHTTP=system \ -DRESTINIO_DEP_FMT=system \ -DRESTINIO_DEP_EXPECTED_LITE=system \ -DCMAKE_CXX_FLAGS="-I%{_builddir}/restinio-%{version}/vendor" \ -DCMAKE_INSTALL_LIBDIR=%{_datadir} %cmake_build %install %cmake_install # Install the bundled expected-lite header into the system include tree so that # downstream consumers (and RESTinio's installed CMake config) can resolve # . install -d %{buildroot}%{_includedir}/nonstd install -m 0644 %{SOURCE1} %{buildroot}%{_includedir}/nonstd/expected.hpp %files %license LICENSE %doc README.md %{_includedir}/restinio/ %{_includedir}/nonstd/expected.hpp # CMake package config (path may be _datadir or _libdir depending on # upstream; _datadir is correct for a noarch header-only install). %{_datadir}/cmake/restinio/ %changelog * Fri May 29 2026 vx32 - 0.7.3-1 - Initial package of RESTinio 0.7.3 for Jami - Build against system asio, llhttp and fmt - Bundle expected-lite %{expected_lite_version} header