Clean spec file for Yocto compatibility
[profile/ivi/libwebsockets.git] / packaging / libwebsockets.spec
1 Name:       libwebsockets
2 Summary:    WebSocket Library
3 Version:    1.2
4 Release:    0
5 Group:      System/Libraries
6 License:    LGPL-2.1
7 URL:        http://git.warmcat.com/cgi-bin/cgit/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 %description
17 C Websockets Server Library
18
19 %package devel
20 Summary:    Development files for %{name}
21 Group:      Development/Libraries
22 Requires:   %{name} = %{version}-%{release}
23
24 %description devel
25 Development files needed for building websocket clients and servers
26
27 %prep
28 %setup -q -n %{name}-%{version}
29
30 %build
31
32 %cmake -DWITH_SSL=On -DWITH_SD_DAEMON=ON
33
34 %__make %{?_smp_mflags}
35
36 %install
37 rm -rf %{buildroot}
38 %make_install
39
40 %post -p /sbin/ldconfig
41
42 %postun -p /sbin/ldconfig
43
44 %files
45 %defattr(-,root,root,-)
46 %{_bindir}/libwebsockets*
47 %{_libdir}/libwebsockets*.so.*
48 %{_datadir}/libwebsockets-test-server/*
49
50 %files devel
51 %defattr(-,root,root,-)
52 %{_includedir}/libwebsockets.h
53 %{_libdir}/libwebsockets.so
54 %{_libdir}/pkgconfig/*