22b78f
Name:           http-parser
6cdb74
Version:        2.9.2
a36807
Release:        2%{?dist}
22b78f
Summary:        HTTP request/response parser for C
22b78f
22b78f
License:        MIT
22b78f
URL:            https://github.com/nodejs/http-parser
22b78f
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
22b78f
023cbf
BuildRequires:  meson
22b78f
BuildRequires:  gcc
22b78f
22b78f
%description
22b78f
This is a parser for HTTP messages written in C. It parses both requests and
22b78f
responses. The parser is designed to be used in performance HTTP applications.
22b78f
It does not make any syscalls nor allocations, it does not buffer data, it can
22b78f
be interrupted at anytime. Depending on your architecture, it only requires
22b78f
about 40 bytes of data per message stream (in a web server that is per
22b78f
connection).
22b78f
22b78f
%package devel
22b78f
Summary:        Development headers and libraries for http-parser
22b78f
Requires:       %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
22b78f
22b78f
%description devel
22b78f
Development headers and libraries for http-parser.
22b78f
22b78f
%prep
22b78f
%autosetup -p1
22b78f
# TODO: try to send upstream?
023cbf
cat > meson.build << EOF
023cbf
project('%{name}', 'c', version : '%{version}')
023cbf
install_headers('http_parser.h')
023cbf
foreach x : [['http_parser',        ['-DHTTP_PARSER_STRICT=0']],
023cbf
             ['http_parser_strict', ['-DHTTP_PARSER_STRICT=1']]]
023cbf
  lib = library(x.get(0), 'http_parser.c',
023cbf
                c_args : x.get(1),
023cbf
                version : '%{version}',
023cbf
                install : true)
023cbf
  test('test-@0@'.format(x.get(0)),
023cbf
       executable('test-@0@'.format(x.get(0)), 'test.c',
023cbf
                  c_args : x.get(1),
ca7dd2
                  link_with : lib),
ca7dd2
       timeout : 60)
023cbf
endforeach
22b78f
EOF
22b78f
22b78f
%build
023cbf
%meson
023cbf
%meson_build
22b78f
22b78f
%install
023cbf
%meson_install
22b78f
22b78f
%check
ca7dd2
%meson_test
22b78f
2c1e25
%ldconfig_scriptlets
22b78f
22b78f
%files
023cbf
%license LICENSE-MIT
023cbf
%doc AUTHORS README.md
22b78f
%{_libdir}/libhttp_parser.so.*
22b78f
%{_libdir}/libhttp_parser_strict.so.*
22b78f
22b78f
%files devel
22b78f
%{_includedir}/http_parser.h
22b78f
%{_libdir}/libhttp_parser.so
22b78f
%{_libdir}/libhttp_parser_strict.so
22b78f
22b78f
%changelog
a36807
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.2-2
a36807
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
a36807
6cdb74
* Mon Apr 22 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.9.2-1
6cdb74
- Update to 2.9.2
6cdb74
1bcca9
* Tue Apr 16 2019 Adam Williamson <awilliam@redhat.com> - 2.9.1-2
1bcca9
- Rebuild with Meson fix for #1699099
1bcca9
c38c8e
* Thu Apr 11 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.9.1-1
c38c8e
- Update to 2.9.1
c38c8e
74df1b
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-2
74df1b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
74df1b
a2cb14
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.1-2
a2cb14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
a2cb14
f1ac1c
* Mon Apr 02 2018 Stephen Gallagher <sgallagh@redhat.com> - 2.8.1-1
f1ac1c
- Update to 2.8.1
f1ac1c
023cbf
* Sat Feb 10 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.8.0-1
023cbf
- Update to 2.8.0
023cbf
- Switch to meson buildsystem
023cbf
55101b
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-9
55101b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
55101b
2c1e25
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.7.1-8
2c1e25
- Switch to %%ldconfig_scriptlets
2c1e25
22b78f
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-7
22b78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
22b78f
22b78f
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-6
22b78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
22b78f
22b78f
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-5
22b78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
22b78f
22b78f
* Mon Nov 21 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.7.1-4
22b78f
- Use CMake buildsystem
22b78f
22b78f
* Tue Oct 25 2016 Nathaniel McCallum <npmccallum@redhat.com> - 2.7.1-3
22b78f
- Add (upstreamed) status code patch
22b78f
22b78f
* Tue Aug 16 2016 Stephen Gallagher <sgallagh@redhat.com> - 2.7.1-2
22b78f
- Upgrade to version 2.7.1
22b78f
22b78f
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-2
22b78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
22b78f
22b78f
* Tue Dec 01 2015 Stephen Gallagher <sgallagh@redhat.com> 2.6.0-1
22b78f
- Upgrade to version 2.6.0
22b78f
- Change to new upstream at https://github.com/nodejs/http-parser/
22b78f
22b78f
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-9.20121128gitcd01361
22b78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
22b78f
22b78f
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.0-8.20121128gitcd01361
22b78f
- Rebuilt for GCC 5 C++11 ABI change
22b78f
22b78f
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-7.20121128gitcd01361
22b78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
22b78f
22b78f
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-6.20121128gitcd01361
22b78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
22b78f
22b78f
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-5.20121128gitcd01361
22b78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
22b78f
22b78f
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-4.20121128gitcd01361
22b78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
22b78f
22b78f
* Sun Dec 02 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.0-3.20121128gitcd01361
22b78f
- latest git snapshot
22b78f
- fixes buffer overflow in tests
22b78f
22b78f
* Tue Nov 27 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.0-2.20121110git245f6f0
22b78f
- latest git snapshot
22b78f
- fixes tests
22b78f
- use SMP make flags
22b78f
- build as Release instead of Debug
22b78f
- ship new strict variant
22b78f
22b78f
* Sat Oct 13 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.0-1
22b78f
- new upstream release 2.0
22b78f
- migrate to GYP buildsystem
22b78f
22b78f
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-3
22b78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
22b78f
22b78f
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
22b78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
22b78f
22b78f
* Mon Aug 22 2011 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0-1
22b78f
- New upstream release 1.0
22b78f
- Remove patches, no longer needed for nodejs
22b78f
- Fix typo in -devel description
22b78f
- use github tarball instead of checkout
22b78f
22b78f
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-6.20100911git
22b78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
22b78f
22b78f
* Tue Jan 11 2011 Lubomir Rintel <lkundrak@v3.sk> - 0.3-5.20100911git
22b78f
- Add support for methods used by node.js
22b78f
22b78f
* Thu Nov  4 2010 Dan Horák <dan[at]danny.cz> - 0.3-4.20100911git
22b78f
- build with -fsigned-char
22b78f
22b78f
* Wed Sep 29 2010 jkeating - 0.3-3.20100911git
22b78f
- Rebuilt for gcc bug 634757
22b78f
22b78f
* Mon Sep 20 2010 Lubomir Rintel <lkundrak@v3.sk> - 0.3-2.20100911git
22b78f
- Call ldconfig (Peter Lemenkov)
22b78f
22b78f
* Fri Sep 17 2010 Lubomir Rintel <lkundrak@v3.sk> - 0.3-1.20100911git
22b78f
- Initial packaging
22b78f