a628fc8ebf4f366f6564d5f90c50edbe83e50af4
[platform/upstream/libwebsockets.git] / packaging / libwebsockets.spec
1 Name:       libwebsockets
2 Summary:    WebSocket Library
3 Version:    2.3.0
4 Release:    1
5 Group:      System/Libraries
6 License:    LGPL-2.1+ OR BSD-3-Clause
7 URL:        https://github.com/warmcat/libwebsockets
8 Source0:    %{name}-%{version}.tar.bz2
9 Requires(post): /sbin/ldconfig
10 Requires(postun): /sbin/ldconfig
11 BuildRequires: zlib-devel
12 BuildRequires: pkgconfig(openssl1.1)
13 BuildRequires: openssl1.1
14 BuildRequires: cmake
15 BuildRequires: pkgconfig(libsystemd-daemon)
16
17 %define _optdeveldir /opt/usr/devel/usr/
18
19 %description
20 C Websockets Server Library
21
22 %package devel
23 Summary:    Development files for %{name}
24 Group:      Development/Libraries
25 Requires:   %{name} = %{version}-%{release}
26
27 %description devel
28 Development files needed for building websocket clients and servers
29
30 %prep
31 %setup -q -n %{name}-%{version}
32
33 %build
34
35 %cmake -DLWS_WITH_SSL=On -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITH_SERVER_STATUS=ON
36
37 make %{?jobs:-j%jobs}
38
39 %install
40 rm -rf %{buildroot}
41
42 %make_install
43
44 %post -p /sbin/ldconfig
45
46 %postun -p /sbin/ldconfig
47
48 %files
49 %manifest %{name}.manifest
50 %defattr(-,root,root,-)
51 %{_libdir}/libwebsockets*.so.*
52 %license LICENSE
53
54 %files devel
55 %defattr(-,root,root,-)
56 %{_includedir}/libwebsockets.h
57 %{_includedir}/lws_config.h
58 %{_libdir}/libwebsockets.so
59 %{_libdir}/pkgconfig/*
60 %{_libdir}/cmake/*