9b9d704bb0533fc828b7d2963c56d4823b4f6519
[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: openssl-devel
13 BuildRequires: cmake
14 BuildRequires: pkgconfig(libsystemd-daemon)
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 -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITH_SERVER_STATUS=ON
35
36 make %{?jobs:-j%jobs}
37
38 %install
39 rm -rf %{buildroot}
40
41 %make_install
42
43 %post -p /sbin/ldconfig
44
45 %postun -p /sbin/ldconfig
46
47 %files
48 %manifest %{name}.manifest
49 %defattr(-,root,root,-)
50 %{_libdir}/libwebsockets*.so.*
51 %license LICENSE
52
53 %files devel
54 %defattr(-,root,root,-)
55 %{_includedir}/libwebsockets.h
56 %{_includedir}/lws_config.h
57 %{_libdir}/libwebsockets.so
58 %{_libdir}/pkgconfig/*
59 %{_libdir}/cmake/*