http-parser-vl.spec 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. Summary: http request/response parser for c
  2. Name: http-parser
  3. Version: 2.4.2
  4. Release: 1%{?_dist_release}
  5. License: MIT
  6. Group: System Environment/Libraries
  7. URL: https://github.com/joyent/http-parser
  8. # https://github.com/joyent/%{name}/archive/v%{version}.tar.gz
  9. Source0: %{name}-%{version}.tar.gz
  10. # based on fedora
  11. Patch0: http-parser-gyp-sharedlib.patch
  12. BuildRequires: gyp
  13. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  14. Vendor: Project Vine
  15. Distribution: Vine Linux
  16. Packager: Takemikaduchi
  17. %description
  18. This is a parser for HTTP messages written in C. It parses both
  19. requests and responses. The parser is designed to be used in
  20. performance HTTP applications. It does not make any syscalls nor
  21. allocations, it does not buffer data, it can be interrupted at
  22. anytime. Depending on your architecture, it only requires about
  23. 40 bytes of data per message stream
  24. (in a web server that is per connection).
  25. %package devel
  26. Summary: Development tools for %{name}
  27. Summary(ja): %{name} の開発環境
  28. Group: Development/Libraries
  29. Requires: %{name} = %{version}-%{release}
  30. Requires: pkgconfig
  31. %description devel
  32. Header files and libraries for building a extension library for the %{name}.
  33. %prep
  34. %setup -q
  35. %patch0 -p1
  36. %build
  37. export CFLAGS='%{optflags} -fPIC'
  38. gyp -f make --depth=`pwd` http_parser.gyp
  39. make %{?_smp_mflags} BUILDTYPE=Release
  40. %install
  41. rm -rf ${RPM_BUILD_ROOT}
  42. mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}
  43. mkdir -p ${RPM_BUILD_ROOT}/%{_includedir}
  44. mv out/Release/lib.target/libhttp_parser.so.2 libhttp_parser.so.%{version}
  45. install -m 0755 libhttp_parser.so.%{version} ${RPM_BUILD_ROOT}%{_libdir}/libhttp_parser.so.%{version}
  46. ln -sf libhttp_parser.so.%{version} ${RPM_BUILD_ROOT}%{_libdir}/libhttp_parser.so.2
  47. install libhttp_parser.so.%{version} ${RPM_BUILD_ROOT}%{_libdir}/libhttp_parser.so
  48. install -m 0644 http_parser.h ${RPM_BUILD_ROOT}%{_includedir}/
  49. %clean
  50. %{__rm} -rf ${RPM_BUILD_ROOT}
  51. %post -p /sbin/ldconfig
  52. %postun -p /sbin/ldconfig
  53. %files
  54. %defattr(-,root,root,-)
  55. %doc LICENSE-MIT README.md
  56. %{_libdir}/libhttp_parser.so.*
  57. %files devel
  58. %defattr(-,root,root,-)
  59. %{_includedir}/http_parser.h
  60. %{_libdir}/libhttp_parser.so
  61. %changelog
  62. * Sun Apr 05 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.2-1
  63. - initial build based on fedora