summaryrefslogtreecommitdiff
path: root/spice-streaming-agent.spec.in
blob: ff1b0d4404ba6682406e208d86a5a101ab663bcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Name:           spice-streaming-agent
Version:        @VERSION@
Release:        1%{?dist}
Summary:        SPICE streaming agent
Group:          Applications/System
License:        ASL 2.0
URL:            https://www.redhat.com
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  spice-protocol >= @SPICE_PROTOCOL_MIN_VER@
BuildRequires:  libX11-devel libXfixes-devel
BuildRequires:  libjpeg-turbo-devel
BuildRequires:  catch-devel
BuildRequires:  pkgconfig(udev)
BuildRequires:  systemd-devel
# we need /usr/sbin/semanage program which is available on different
# packages depending on distribution
Requires(post): /usr/sbin/semanage
Requires(postun): /usr/sbin/semanage

%description
An agent, running on a guest, sending video streams of the X display to a
remote client (over SPICE).

%package devel
Requires: spice-protocol >= @SPICE_PROTOCOL_MIN_VER@
Requires: pkgconfig
Summary:  SPICE streaming agent development files

%description devel
This package contains necessary header files to build SPICE streaming
agent plugins.

%prep
%setup -q

%build
%configure --enable-tests --with-udevrulesdir=%{_udevrulesdir}
make %{?_smp_mflags} V=1

%check
make check

%install
make install DESTDIR=%{buildroot} V=1
if test -d "%{buildroot}/%{_libdir}/%{name}/plugins"; then
    find %{buildroot}/%{_libdir}/%{name}/plugins -name '*.la' -delete
fi

%post
semanage fcontext -a -t xserver_exec_t %{_bindir}/spice-streaming-agent 2>/dev/null || :
restorecon %{_bindir}/spice-streaming-agent || :

%postun
if [ $1 -eq 0 ] ; then  # final removal
semanage fcontext -d -t xserver_exec_t %{_bindir}/spice-streaming-agent 2>/dev/null || :
fi


%files
%doc COPYING NEWS README
%{_udevrulesdir}/90-spice-guest-streaming.rules
%{_bindir}/spice-streaming-agent
%{_bindir}/spice-streaming-helper
%{_sysconfdir}/xdg/autostart/spice-streaming.desktop
%{_datadir}/gdm/greeter/autostart/spice-streaming.desktop
/usr/lib/systemd/system/spice-streaming-agent.socket
/usr/lib/systemd/system/spice-streaming-agent.service

%files devel
%defattr(-,root,root,-)
%{_includedir}
%{_libdir}/pkgconfig

%changelog
* Thu May 31 2018 Uri Lublin <uril@redhat.com> - 0.2-1
- First release

* Wed Aug 16 2017 Frediano Ziglio <fziglio@redhat.com> - 0.1-1
- Initial package (pre-release)