http-parser-vl.spec 2.6 KB

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