From: Dmitry Kovalenko Date: Mon, 21 Aug 2017 09:45:16 +0000 (+0300) Subject: Add packaging code and LICENSE X-Git-Tag: accepted/tizen/4.0/unified/20171012.191640~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Flibwebsockets.git;a=commitdiff_plain;h=121e5bec3e023a97500a43bdbf5f70ad67f1f073 Add packaging code and LICENSE Change-Id: I2604b16b08890720673e5042605ddff410d2100a Signed-off-by: Dmitry Kovalenko --- diff --git a/LICENSE b/LICENSE index 179de59..ce2459d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,21 @@ +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: diff --git a/libwebsockets.manifest b/libwebsockets.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/libwebsockets.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/libwebsockets.spec b/packaging/libwebsockets.spec new file mode 100644 index 0000000..51e3383 --- /dev/null +++ b/packaging/libwebsockets.spec @@ -0,0 +1,61 @@ +Name: libwebsockets +Summary: WebSocket Library +Version: 2.3.0 +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/*