1 | Summary: http request/response parser for c |
---|
2 | Name: http-parser |
---|
3 | Version: 2.9.4 |
---|
4 | Release: 1%{?_dist_release} |
---|
5 | Group: System Environment/Libraries |
---|
6 | Vendor: Project Vine |
---|
7 | Distribution: Vine Linux |
---|
8 | |
---|
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 |
---|
12 | |
---|
13 | # based on fedora |
---|
14 | Patch0: 0001-url-treat-empty-port-as-default.patch |
---|
15 | |
---|
16 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
17 | BuildRequires: meson |
---|
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 | |
---|
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 |
---|
58 | |
---|
59 | |
---|
60 | %build |
---|
61 | %meson |
---|
62 | %meson_build |
---|
63 | |
---|
64 | |
---|
65 | %install |
---|
66 | rm -rf ${RPM_BUILD_ROOT} |
---|
67 | %meson_install |
---|
68 | |
---|
69 | |
---|
70 | %check |
---|
71 | %meson_test |
---|
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,-) |
---|
84 | %license LICENSE-MIT |
---|
85 | %doc AUTHORS README.md |
---|
86 | %{_libdir}/libhttp_parser.so.* |
---|
87 | %{_libdir}/libhttp_parser_strict.so.* |
---|
88 | |
---|
89 | %files devel |
---|
90 | %defattr(-,root,root,-) |
---|
91 | %{_includedir}/http_parser.h |
---|
92 | %{_libdir}/libhttp_parser.so |
---|
93 | %{_libdir}/libhttp_parser_strict.so |
---|
94 | |
---|
95 | |
---|
96 | %changelog |
---|
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 | |
---|
102 | * Thu Sep 01 2016 Toshiaki Ara <ara_t@384.jp> - 2.4.2-2 |
---|
103 | - rebuild with gcc-5.4.0 |
---|
104 | |
---|
105 | * Sun Apr 05 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.2-1 |
---|
106 | - initial build based on fedora |
---|
107 | |
---|