commit 088c2657f5f34916c7148f6d7320d1c21dfc5367 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 10:59:07 2019 -0400 Package init diff --git a/libwebsockets-2.4.2.tar.gz b/libwebsockets-2.4.2.tar.gz new file mode 100644 index 0000000..6d9d0d6 Binary files /dev/null and b/libwebsockets-2.4.2.tar.gz differ diff --git a/libwebsockets-fix-coredump.patch b/libwebsockets-fix-coredump.patch new file mode 100644 index 0000000..47e7808 --- /dev/null +++ b/libwebsockets-fix-coredump.patch @@ -0,0 +1,13 @@ +diff --git a/lib/context.c b/lib/context.c +index 9f221f5..207b032 100644 +--- a/lib/context.c ++++ b/lib/context.c +@@ -1109,7 +1109,7 @@ lws_create_context(struct lws_context_creation_info *info) + + #if LWS_MAX_SMP > 1 + /* each thread serves his own chunk of fds */ +- for (n = 1; n < (int)info->count_threads; n++) ++ for (n = 1; n < (int)context->count_threads; n++) + context->pt[n].fds = context->pt[n - 1].fds + + context->fd_limit_per_thread; + #endif diff --git a/libwebsockets.spec b/libwebsockets.spec new file mode 100644 index 0000000..fee4a2d --- /dev/null +++ b/libwebsockets.spec @@ -0,0 +1,77 @@ +Name: libwebsockets +Version: 2.4.2 +Release: 2 +Summary: A lightweight C library for Websockets +License: LGPLv2 and Public Domain and BSD and MIT and zlib +URL: https://libwebsockets.org +Source0: https://github.com/warmcat/libwebsockets/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch6000: libwebsockets-fix-coredump.patch + +BuildRequires: cmake openssl-devel zlib-devel libev-devel git + +Provides: bundled(sha1-hollerbach) bundled(base64-decode) bundled(ssl-http2) + +%description +Libwebsockets (LWS) is a flexible, lightweight pure C library for implementing modern +network protocols easily with a tiny footprint, using a nonblocking event loop. + +%package devel +Summary: Headers for developing programs that will use %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +Provides: %{name}-tests +Obsoletes: %{name}-tests + +%description devel +This package contains the header files needed for developing +%{name} applications. + +%package_help + +%prep +%autosetup -n %{name}-%{version} -p1 -S git +%build +mkdir -p build +cd build +%cmake \ + -D LWS_LINK_TESTAPPS_DYNAMIC=ON \ + -D LWS_USE_LIBEV=OFF \ + -D LWS_WITHOUT_BUILTIN_GETIFADDRS=ON \ + -D LWS_USE_BUNDLED_ZLIB=OFF \ + -D LWS_WITHOUT_BUILTIN_SHA1=ON \ + -D LWS_WITH_STATIC=OFF \ + -D LWS_MAX_SMP=32 \ + -D CMAKE_BUILD_TYPE=Debug \ + .. +%make_build + +%install +cd build +%make_install +%delete_la_and_a +find %{buildroot} -name '*.cmake' -exec rm -f {} ';' +find %{buildroot} -name '*_static.pc' -exec rm -f {} ';' + +%ldconfig_scriptlets + +%files +%defattr(-,root,root) +%license LICENSE +%{_libdir}/%{name}.so.* + +%files devel +%defattr(-,root,root) +%{_includedir}/*.h +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%{_bindir}/%{name}-test-* +%{_datadir}/%{name}-test-server/ + + +%files help +%defattr(-,root,root) +%doc changelog README.md READMEs/ + +%changelog +* Mon Sep 16 2019 openEuler Buildteam - 2.4.2-2 +- Package init