[9487] | 1 | Summary: http request/response parser for c |
---|
| 2 | Name: http-parser |
---|
[12395] | 3 | Version: 2.9.4 |
---|
| 4 | Release: 1%{?_dist_release} |
---|
[9487] | 5 | Group: System Environment/Libraries |
---|
[12395] | 6 | Vendor: Project Vine |
---|
| 7 | Distribution: Vine Linux |
---|
[9487] | 8 | |
---|
[12395] | 9 | License: MIT |
---|
| 10 | URL: https://github.com/nodejs/http-parser |
---|
| 11 | Source0: https://github.com/nodejs/http-parser/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz |
---|
[9487] | 12 | |
---|
| 13 | # based on fedora |
---|
[12395] | 14 | Patch0: 0001-url-treat-empty-port-as-default.patch |
---|
[9487] | 15 | |
---|
| 16 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
[12395] | 17 | BuildRequires: meson |
---|
[9487] | 18 | |
---|
| 19 | %description |
---|
| 20 | This is a parser for HTTP messages written in C. It parses both |
---|
| 21 | requests and responses. The parser is designed to be used in |
---|
| 22 | performance HTTP applications. It does not make any syscalls nor |
---|
| 23 | allocations, it does not buffer data, it can be interrupted at |
---|
| 24 | anytime. Depending on your architecture, it only requires about |
---|
| 25 | 40 bytes of data per message stream |
---|
| 26 | (in a web server that is per connection). |
---|
| 27 | |
---|
| 28 | %package devel |
---|
| 29 | Summary: Development tools for %{name} |
---|
| 30 | Summary(ja): %{name} の開発環境 |
---|
| 31 | Group: Development/Libraries |
---|
| 32 | Requires: %{name} = %{version}-%{release} |
---|
| 33 | |
---|
| 34 | %description devel |
---|
| 35 | Header files and libraries for building a extension library for the %{name}. |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | %prep |
---|
| 39 | %setup -q |
---|
| 40 | %patch0 -p1 |
---|
| 41 | |
---|
[12395] | 42 | cat > meson.build << EOF |
---|
| 43 | project('%{name}', 'c', version : '%{version}') |
---|
| 44 | install_headers('http_parser.h') |
---|
| 45 | foreach x : [['http_parser', ['-DHTTP_PARSER_STRICT=0']], |
---|
| 46 | ['http_parser_strict', ['-DHTTP_PARSER_STRICT=1']]] |
---|
| 47 | lib = library(x.get(0), 'http_parser.c', |
---|
| 48 | c_args : x.get(1), |
---|
| 49 | version : '%{version}', |
---|
| 50 | install : true) |
---|
| 51 | test('test-@0@'.format(x.get(0)), |
---|
| 52 | executable('test-@0@'.format(x.get(0)), 'test.c', |
---|
| 53 | c_args : x.get(1), |
---|
| 54 | link_with : lib), |
---|
| 55 | timeout : 60) |
---|
| 56 | endforeach |
---|
| 57 | EOF |
---|
[9487] | 58 | |
---|
[12395] | 59 | |
---|
[9487] | 60 | %build |
---|
[12395] | 61 | %meson |
---|
| 62 | %meson_build |
---|
[9487] | 63 | |
---|
| 64 | |
---|
| 65 | %install |
---|
| 66 | rm -rf ${RPM_BUILD_ROOT} |
---|
[12395] | 67 | %meson_install |
---|
[9487] | 68 | |
---|
| 69 | |
---|
[12395] | 70 | %check |
---|
| 71 | %meson_test |
---|
[9487] | 72 | |
---|
| 73 | |
---|
| 74 | %clean |
---|
| 75 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
| 76 | |
---|
| 77 | %post -p /sbin/ldconfig |
---|
| 78 | |
---|
| 79 | %postun -p /sbin/ldconfig |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | %files |
---|
| 83 | %defattr(-,root,root,-) |
---|
[12395] | 84 | %license LICENSE-MIT |
---|
| 85 | %doc AUTHORS README.md |
---|
[9487] | 86 | %{_libdir}/libhttp_parser.so.* |
---|
[12395] | 87 | %{_libdir}/libhttp_parser_strict.so.* |
---|
[9487] | 88 | |
---|
| 89 | %files devel |
---|
| 90 | %defattr(-,root,root,-) |
---|
| 91 | %{_includedir}/http_parser.h |
---|
| 92 | %{_libdir}/libhttp_parser.so |
---|
[12395] | 93 | %{_libdir}/libhttp_parser_strict.so |
---|
[9487] | 94 | |
---|
| 95 | |
---|
| 96 | %changelog |
---|
[12395] | 97 | * Tue May 05 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.9.4-1 |
---|
| 98 | - new upstream release. |
---|
| 99 | - dropped Patch0. |
---|
| 100 | - imported Patch0 from rawhide. |
---|
| 101 | |
---|
[10913] | 102 | * Thu Sep 01 2016 Toshiaki Ara <ara_t@384.jp> - 2.4.2-2 |
---|
| 103 | - rebuild with gcc-5.4.0 |
---|
| 104 | |
---|
[9487] | 105 | * Sun Apr 05 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.2-1 |
---|
| 106 | - initial build based on fedora |
---|
| 107 | |
---|