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