1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools linux-info
8 DESCRIPTION="SPICE VD Linux Guest Agent"
9 HOMEPAGE="https://www.spice-space.org/"
10 SRC_URI="https://www.spice-space.org/download/releases/${P}.tar.bz2"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="consolekit gtk selinux systemd"
18 >=app-emulation/spice-protocol-0.14.0
20 >=x11-libs/libpciaccess-0.10
26 consolekit? ( sys-auth/consolekit sys-apps/dbus )
27 gtk? ( x11-libs/gtk+:3 )
28 systemd? ( sys-apps/systemd )"
32 selinux? ( sec-policy/selinux-vdagent )"
34 CONFIG_CHECK="~INPUT_UINPUT ~VIRTIO_CONSOLE"
35 ERROR_INPUT_UINPUT="User level input support (INPUT_UINPUT) is required"
36 ERROR_VIRTIO_CONSOLE="VirtIO console/serial device support (VIRTIO_CONSOLE) is required"
40 if use consolekit; then
41 opt+=( --with-session-info=console-kit )
42 elif use systemd; then
43 opt+=( --with-session-info=systemd )
45 opt+=( --with-session-info=none )
49 --with-init-script=systemd \
50 --localstatedir="${EPREFIX}"/var \
58 cd "${ED}" && rmdir -p var/run/spice-vdagentd || die
60 keepdir /var/log/spice-vdagentd
62 newinitd "${FILESDIR}/${PN}.initd-4" "${PN}"
63 newconfd "${FILESDIR}/${PN}.confd-2" "${PN}"