Package init

This commit is contained in:
overweight 2019-09-30 10:52:49 -04:00
commit 5591e7dbbe
2 changed files with 85 additions and 0 deletions

BIN
http-parser-2.9.2.tar.gz Normal file

Binary file not shown.

85
http-parser.spec Normal file
View File

@ -0,0 +1,85 @@
Name: http-parser
Version: 2.9.2
Release: 1
Summary: HTTP request/response parser for C
License: MIT
URL: https://github.com/nodejs/%{name}
Source0: https://github.com/nodejs/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc meson
%description
http-parser parses the HTTP request headers and body. As such, it acts as
a barrier in the policy to guarantee that the entire content has been received
before any other filters are invoked.The parser filter forces the server
to do "store-and-forward" routing instead of the default "cut-through" routing,
where the request is only parsed on-demand. This filter can be used as a simple test
to ensure that the message is XML, for example.
Features:
* No dependencies
* Handles persistent streams (keep-alive)
* Decodes chunked encoding
* Upgrade support
* Defends against buffer overflow attacks
%package devel
Summary: Development headers and static libraries
%description devel
Development headers and static libraries for http-parser.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
cat > meson.build << EOF
project('%{name}', 'c',
version : '%{version}',
license: 'MIT')
install_headers('http_parser.h')
foreach x : [['http_parser', ['-DHTTP_PARSER_STRICT=0']],
['http_parser_strict', ['-DHTTP_PARSER_STRICT=1']]]
lib = library(x.get(0), 'http_parser.c', c_args : x.get(1),
version : '%{version}', install : true)
test('test-@0@'.format(x.get(0)),
executable('test-@0@'.format(x.get(0)), 'test.c',
c_args : x.get(1), link_with : lib),
timeout : 60)
endforeach
EOF
%build
%meson
%meson_build
%install
%meson_install
%check
%meson_test
%ldconfig_scriptlets
%files
%defattr(-,root,root)
%license LICENSE*
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/*.h
%{_libdir}/*.so
%files help
%defattr(-,root,root)
%doc AUTHORS README.md
%changelog
* Sat Aug 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.9.2-1
- Package init