|
@@ -1,24 +1,20 @@
|
|
|
Summary: http request/response parser for c
|
|
|
Name: http-parser
|
|
|
-Version: 2.4.2
|
|
|
-Release: 2%{?_dist_release}
|
|
|
-License: MIT
|
|
|
+Version: 2.9.4
|
|
|
+Release: 1%{?_dist_release}
|
|
|
Group: System Environment/Libraries
|
|
|
-URL: https://github.com/joyent/http-parser
|
|
|
+Vendor: Project Vine
|
|
|
+Distribution: Vine Linux
|
|
|
|
|
|
-# https://github.com/joyent/%{name}/archive/v%{version}.tar.gz
|
|
|
-Source0: %{name}-%{version}.tar.gz
|
|
|
+License: MIT
|
|
|
+URL: https://github.com/nodejs/http-parser
|
|
|
+Source0: https://github.com/nodejs/http-parser/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
|
|
|
# based on fedora
|
|
|
-Patch0: http-parser-gyp-sharedlib.patch
|
|
|
-
|
|
|
-BuildRequires: gyp
|
|
|
+Patch0: 0001-url-treat-empty-port-as-default.patch
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
-
|
|
|
-Vendor: Project Vine
|
|
|
-Distribution: Vine Linux
|
|
|
-Packager: Takemikaduchi
|
|
|
+BuildRequires: meson
|
|
|
|
|
|
%description
|
|
|
This is a parser for HTTP messages written in C. It parses both
|
|
@@ -34,7 +30,6 @@ Summary: Development tools for %{name}
|
|
|
Summary(ja): %{name} の開発環境
|
|
|
Group: Development/Libraries
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
-Requires: pkgconfig
|
|
|
|
|
|
%description devel
|
|
|
Header files and libraries for building a extension library for the %{name}.
|
|
@@ -44,24 +39,36 @@ Header files and libraries for building a extension library for the %{name}.
|
|
|
%setup -q
|
|
|
%patch0 -p1
|
|
|
|
|
|
+cat > meson.build << EOF
|
|
|
+project('%{name}', 'c', version : '%{version}')
|
|
|
+install_headers('http_parser.h')
|
|
|
+foreach x : [['http_parser', ['-DHTTP_PARSER_STRICT=0']],
|
|
|
+ ['http_parser_strict', ['-DHTTP_PARSER_STRICT=1']]]
|
|
|
+ lib = library(x.get(0), 'http_parser.c',
|
|
|
+ c_args : x.get(1),
|
|
|
+ version : '%{version}',
|
|
|
+ install : true)
|
|
|
+ test('test-@0@'.format(x.get(0)),
|
|
|
+ executable('test-@0@'.format(x.get(0)), 'test.c',
|
|
|
+ c_args : x.get(1),
|
|
|
+ link_with : lib),
|
|
|
+ timeout : 60)
|
|
|
+endforeach
|
|
|
+EOF
|
|
|
+
|
|
|
|
|
|
%build
|
|
|
-export CFLAGS='%{optflags} -fPIC'
|
|
|
-gyp -f make --depth=`pwd` http_parser.gyp
|
|
|
-make %{?_smp_mflags} BUILDTYPE=Release
|
|
|
+%meson
|
|
|
+%meson_build
|
|
|
|
|
|
|
|
|
%install
|
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
|
+%meson_install
|
|
|
|
|
|
-mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}
|
|
|
-mkdir -p ${RPM_BUILD_ROOT}/%{_includedir}
|
|
|
|
|
|
-mv out/Release/lib.target/libhttp_parser.so.2 libhttp_parser.so.%{version}
|
|
|
-install -m 0755 libhttp_parser.so.%{version} ${RPM_BUILD_ROOT}%{_libdir}/libhttp_parser.so.%{version}
|
|
|
-ln -sf libhttp_parser.so.%{version} ${RPM_BUILD_ROOT}%{_libdir}/libhttp_parser.so.2
|
|
|
-install libhttp_parser.so.%{version} ${RPM_BUILD_ROOT}%{_libdir}/libhttp_parser.so
|
|
|
-install -m 0644 http_parser.h ${RPM_BUILD_ROOT}%{_includedir}/
|
|
|
+%check
|
|
|
+%meson_test
|
|
|
|
|
|
|
|
|
%clean
|
|
@@ -74,16 +81,24 @@ install -m 0644 http_parser.h ${RPM_BUILD_ROOT}%{_includedir}/
|
|
|
|
|
|
%files
|
|
|
%defattr(-,root,root,-)
|
|
|
-%doc LICENSE-MIT README.md
|
|
|
+%license LICENSE-MIT
|
|
|
+%doc AUTHORS README.md
|
|
|
%{_libdir}/libhttp_parser.so.*
|
|
|
+%{_libdir}/libhttp_parser_strict.so.*
|
|
|
|
|
|
%files devel
|
|
|
%defattr(-,root,root,-)
|
|
|
%{_includedir}/http_parser.h
|
|
|
%{_libdir}/libhttp_parser.so
|
|
|
+%{_libdir}/libhttp_parser_strict.so
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Tue May 05 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.9.4-1
|
|
|
+- new upstream release.
|
|
|
+- dropped Patch0.
|
|
|
+- imported Patch0 from rawhide.
|
|
|
+
|
|
|
* Thu Sep 01 2016 Toshiaki Ara <ara_t@384.jp> - 2.4.2-2
|
|
|
- rebuild with gcc-5.4.0
|
|
|
|