+Copyright (c) 1987, 1993, 1994, 1996 The Regents of the University of California. All rights reserved.
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
Libwebsockets and included programs are provided under the terms of the GNU
Library General Public License (LGPL) 2.1, with the following exceptions:
--- /dev/null
+Name: libwebsockets
+Summary: WebSocket Library
+Version: 1.7.9
+Release: 1
+Group: System/Libraries
+License: LGPL-2.1+ OR BSD-3-Clause
+URL: https://github.com/warmcat/libwebsockets
+Source0: %{name}-%{version}.tar.bz2
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires: zlib-devel
+BuildRequires: openssl-devel
+BuildRequires: cmake
+BuildRequires: pkgconfig(libsystemd-daemon)
+
+%define _optdeveldir /opt/usr/devel/usr/
+
+%description
+C Websockets Server Library
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Development files needed for building websocket clients and servers
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+
+%cmake -DLWS_WITH_SSL=On -DLWS_WITHOUT_TESTAPPS=ON
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+
+%make_install
+mkdir -p %{buildroot}%{_datadir}/license
+install -m0644 %{_builddir}/%{buildsubdir}/LICENSE %{buildroot}%{_datadir}/license/%{name}
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libwebsockets*.so.*
+%{_datadir}/license/%{name}
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/libwebsockets.h
+%{_includedir}/lws_config.h
+%{_libdir}/libwebsockets.so
+%{_libdir}/pkgconfig/*
+%{_libdir}/cmake/*