51e3383486e9b650e0a7ef38d460d7e4832969ad
[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
35
36 make %{?jobs:-j%jobs}
37
38 %install
39 rm -rf %{buildroot}
40
41 %make_install
42 mkdir -p %{buildroot}%{_datadir}/license
43 install -m0644 %{_builddir}/%{buildsubdir}/LICENSE %{buildroot}%{_datadir}/license/%{name}
44
45 %post -p /sbin/ldconfig
46
47 %postun -p /sbin/ldconfig
48
49 %files
50 %manifest %{name}.manifest
51 %defattr(-,root,root,-)
52 %{_libdir}/libwebsockets*.so.*
53 %{_datadir}/license/%{name}
54
55 %files devel
56 %defattr(-,root,root,-)
57 %{_includedir}/libwebsockets.h
58 %{_includedir}/lws_config.h
59 %{_libdir}/libwebsockets.so
60 %{_libdir}/pkgconfig/*
61 %{_libdir}/cmake/*