Add packaging code and LICENSE 52/145152/1
authorDmitry Kovalenko <d.kovalenko@samsung.com>
Mon, 21 Aug 2017 09:45:16 +0000 (12:45 +0300)
committerDmitry Kovalenko <d.kovalenko@samsung.com>
Mon, 21 Aug 2017 10:58:50 +0000 (13:58 +0300)
Change-Id: I2604b16b08890720673e5042605ddff410d2100a
Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>
LICENSE
libwebsockets.manifest [new file with mode: 0644]
packaging/libwebsockets.spec [new file with mode: 0644]

diff --git a/LICENSE b/LICENSE
index 179de59..ce2459d 100644 (file)
--- 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 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/libwebsockets.spec b/packaging/libwebsockets.spec
new file mode 100644 (file)
index 0000000..51e3383
--- /dev/null
@@ -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/*