/[packages]/cauldron/wslay/current/SPECS/wslay.spec
ViewVC logotype

Contents of /cauldron/wslay/current/SPECS/wslay.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1418030 - (show annotations) (download)
Wed Jul 3 17:15:20 2019 UTC (2 months, 1 week ago) by akien
File size: 2869 byte(s)
Bump rel (SILENT)
1 %define major 1
2 %define libname %mklibname %{name} %{major}
3 %define devname %mklibname %{name} -d
4
5 Name: wslay
6 Version: 1.1.0
7 Release: %mkrel 2
8 Summary: Lightweight WebSocket library in C
9 Group: System/Libraries
10 License: MIT
11 URL: https://tatsuhiro-t.github.io/wslay
12 Source0: https://github.com/tatsuhiro-t/wslay/archive/release-%{version}/%{name}-release-%{version}.tar.gz
13 # Patch from Debian: https://salsa.debian.org/debian/wslay
14 Patch0: 10_update_cmake.patch
15
16 BuildRequires: cmake
17 # For tests
18 BuildRequires: pkgconfig(cunit)
19
20 %description
21 Wslay is a WebSocket library written in C. It implements the protocol
22 version 13 described in RFC 6455. This library offers 2 levels of API:
23 event-based API and frame-based low-level API.
24
25 For event-based API, it is suitable for non-blocking reactor pattern
26 style. You can set callbacks in various events.
27 For frame-based API, you can send WebSocket frame directly. Wslay only
28 supports data transfer part of WebSocket protocol and does not perform
29 opening handshake in HTTP.
30
31 %package -n %{libname}
32 Summary: Lightweight WebSocket library in C
33 Group: System/Libraries
34
35 %description -n %{libname}
36 Wslay is a WebSocket library written in C. It implements the protocol
37 version 13 described in RFC 6455. This library offers 2 levels of API:
38 event-based API and frame-based low-level API.
39
40 For event-based API, it is suitable for non-blocking reactor pattern
41 style. You can set callbacks in various events.
42 For frame-based API, you can send WebSocket frame directly. Wslay only
43 supports data transfer part of WebSocket protocol and does not perform
44 opening handshake in HTTP.
45
46 %package -n %{devname}
47 Summary: Development headers and library for Wslay
48 Group: Development/C
49 Requires: %{libname} = %{version}-%{release}
50 Provides: %{name}-devel = %{version}-%{release}
51
52 %description -n %{devname}
53 Development headers and library for the Wslay C WebSocket library.
54
55 %prep
56 %autosetup -p1 -n %{name}-release-%{version}
57
58 %build
59 %cmake -DWSLAY_EXAMPLES=NO
60 %make_build
61
62 %install
63 %make_install -C build
64
65 # Create and install pkgconfig file
66 install -d %{buildroot}%{_libdir}/pkgconfig
67 cat << EOF > %{buildroot}%{_libdir}/pkgconfig/lib%{name}.pc
68 prefix=%{_prefix}
69 exec_prefix=\${prefix}
70 libdir=\${prefix}/%{_lib}
71 includedir=\${prefix}/include
72
73 Name: %{name}
74 Description: Lightweight WebSocket library in C
75 URL: %{url}
76 Version: %{version}
77 Libs: -L\${libdir} -l%{name}
78 Cflags: -I\${includedir}
79 EOF
80
81 %check
82 ./build/tests/wslay_tests
83
84 %files -n %{libname}
85 %license AUTHORS COPYING
86 %{_libdir}/lib%{name}.so.%{major}
87 %{_libdir}/lib%{name}.so.%{version}
88
89 %files -n %{devname}
90 %doc NEWS README.rst
91 %license AUTHORS COPYING
92 %{_includedir}/%{name}/
93 %{_libdir}/cmake/%{name}/
94 %{_libdir}/lib%{name}.so
95 %{_libdir}/pkgconfig/lib%{name}.pc

  ViewVC Help
Powered by ViewVC 1.1.26