## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global forgeurl0 https://github.com/yhirose/cpp-httplib %undefine __cmake_in_source_build %bcond_without tests # Compiled version in shared library. # Does not have any so-version, therefore not default %bcond_with compile %if %{without compile} %undefine __cmake_in_source_build %global debug_package %{nil} %endif Name: cpp-httplib Version: 0.9.3 %forgemeta Release: %autorelease Summary: A C++11 single-file header-only cross platform HTTP/HTTPS library License: MIT URL: https://github.com/yhirose/cpp-httplib Source0: %forgesource BuildRequires: redhat-rpm-config BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: openssl-devel BuildRequires: zlib-devel BuildRequires: brotli-devel %if %{with tests} BuildRequires: make openssl BuildRequires: gtest-devel %endif %description A C++11 single-file header-only cross platform HTTP/HTTPS library. It's extremely easy to setup. Just include the httplib.h file in your code! %package devel Summary: A C++11 single-file header-only cross platform HTTP/HTTPS library Recommends: cmake %if %{with compile} Requires: %{name}%{?_isa} = %{version}-%{release} %else Provides: %{name}-static = %{version}-%{release} %endif %description devel A C++11 single-file header-only cross platform HTTP/HTTPS library. It's extremely easy to setup. Just include the httplib.h file in your code! NOTE: This is a multi-threaded 'blocking' HTTP library. If you are looking for a 'non-blocking' library, this is not the one that you want. Development files only. %prep %forgeautosetup -p1 %build %cmake \ %if %{with compile} -DBUILD_SHARED_LIBS=ON -DHTTPLIB_COMPILE=ON \ %endif # %cmake_build %install %cmake_install %check %if %{with tests} pushd test %make_build test # Mock does not provide internet connectivity. # Skip online tests to avoid failures ./test --gtest_filter='-*.*_Online' popd %endif %if %{with compile} %files %license LICENSE %doc README.md # TODO: should use so-versioned library here, but upstream # prefers header-only mode. %{_libdir}/libhttplib.so %endif %files devel %if %{without compile} %license LICENSE %doc README.md %endif %{_includedir}/httplib.h %{_libdir}/cmake/httplib %changelog * Wed Jul 20 2022 Fedora Release Engineering 0.9.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jan 19 2022 Fedora Release Engineering 0.9.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Aug 24 2021 Petr Menšík 0.9.3-1 - Update to 0.9.3 * Sat Aug 21 2021 Petr Menšík 0.9.2-2 - Enable tests during build, use only offline tests * Sat Aug 21 2021 Petr Menšík 0.9.2-1 - Initial package version 0.9.2