Upgrade to 4.3 stable
[platform/upstream/libwebsockets.git] / packaging / libwebsockets.spec
1 Name:       libwebsockets
2 Summary:    WebSocket Library
3 Version:    4.3.stable
4 Release:    0
5 Group:      System/Libraries
6 License:    MIT with exceptions
7 URL:        https://github.com/warmcat/libwebsockets
8 Source0:    %{name}-%{version}.tar.gz
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
16 %define _optdeveldir /opt/usr/devel/usr/
17
18 %description
19 C Websockets Server Library
20
21 %package devel
22 Summary:    Development files for %{name}
23 Group:      Development/Libraries
24 Requires:   %{name} = %{version}-%{release}
25
26 %description devel
27 Development files needed for building websocket clients and servers
28
29 %prep
30 %setup -q -n %{name}-%{version}
31
32 %build
33
34 %cmake -DLWS_WITH_SSL=On \
35         -DLWS_WITHOUT_TESTAPPS=ON \
36         -DLWS_WITH_SERVER_STATUS=ON \
37         -DLWS_IPV6=ON \
38         -DLWS_WITH_SO_BINDTODEVICE=ON \
39         -DLWS_WITH_HTTP2=OFF\
40         .
41
42 make %{?jobs:-j%jobs}
43
44 %install
45 rm -rf %{buildroot}
46
47 %make_install
48
49 %post -p /sbin/ldconfig
50
51 %postun -p /sbin/ldconfig
52
53 %files
54 %manifest %{name}.manifest
55 %defattr(-,root,root,-)
56 %{_libdir}/libwebsockets*.so.*
57 %license LICENSE
58
59 %files devel
60 %defattr(-,root,root,-)
61 %{_includedir}/libwebsockets.h
62 %{_includedir}/lws_config.h
63 %{_includedir}/libwebsockets/*
64 %{_libdir}/libwebsockets.so
65 %{_libdir}/pkgconfig/*
66 %{_libdir}/cmake/*