## START: Set by rpmautospec ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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 %bcond bootstrap 0 Name: llhttp Version: 9.3.1 %global so_version 9.3 %global previous_so_version 9.2 Release: %autorelease Summary: Port of http_parser to llparse License: MIT URL: https://github.com/nodejs/llhttp Source0: %{url}/archive/refs/tags/release/v%{version}/llhttp-release-v%{version}.tar.gz Source1: %{url}/archive/v%{version}/llhttp-%{version}.tar.gz BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ %if %{with bootstrap} %if "%{_lib}" == "lib64" BuildRequires: libllhttp.so.%{previous_so_version}()(64bit) %else BuildRequires: libllhttp.so.%{previous_so_version} %endif %endif %description This project is a port of http_parser to TypeScript. llparse is used to generate the output C source file, which could be compiled and linked with the embedder's program (like Node.js). %package devel Summary: Development files for llhttp Requires: llhttp%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description devel The llhttp-devel package contains libraries and header files for developing applications that use llhttp. %prep %autosetup -n llhttp-release-v%{version} %build # AL2023 compatibility %if 0%{?amzn} == 2023 export CFLAGS="%{build_cflags}" export CXXFLAGS="%{build_cxxflags}" export LDFLAGS="%{build_ldflags}" %endif %cmake %cmake_build %install %cmake_install %if %{with bootstrap} cp -vp %{buildroot}%{_libdir}/libllhttp.so.%{so_version}{,.*} \ %{buildroot}%{_libdir}/libllhttp.so.%{previous_so_version} %endif %files %license LICENSE %doc README.md %{_libdir}/libllhttp.so.%{so_version}{,.*} %if %{with bootstrap} %{_libdir}/libllhttp.so.%{previous_so_version}{,.*} %endif %files devel %{_includedir}/llhttp.h %{_libdir}/libllhttp.so %{_libdir}/pkgconfig/libllhttp.pc %{_libdir}/cmake/llhttp/