sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / app-emulation / xe-guest-utilities / xe-guest-utilities-5.6.0_p595.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit eutils rpm linux-info
6 DESCRIPTION="XenServer Virtual Machine Tools"
7 HOMEPAGE="https://www.citrix.com/"
8 PV_BASE=${PV/_*}
9 PV_FULL=${PV/_p/-}
10 SRC_URI="http://updates.vmd.citrix.com/XenServer/${PV_BASE}/rhel4x/SRPMS/xe-guest-utilities-${PV_FULL}.src.rpm"
11 LICENSE="LGPL-3 LGPL-2.1"
12 SLOT="0"
13 KEYWORDS="~amd64"
14 IUSE="xenstore"
15 DEPEND="app-arch/rpm2targz"
16 RDEPEND="
17         !xenstore? ( app-emulation/xen-tools )
18         xenstore? ( !app-emulation/xen-tools )"
19 S=${WORKDIR}
20 CONFIG_CHECK="~XEN_COMPAT_XENFS ~XENFS"
21 QA_PREBUILT="usr/bin/xenstore* usr/bin/xeninfo"
22
23 src_unpack() {
24         rpm_src_unpack ${A}
25         # Upstream includes xenstore-sources.tar.bz2
26         # but it is NOT the complete source :-(
27 }
28
29 src_prepare() {
30         epatch "${FILESDIR}"/${PN}-5.6.100_p651-gentoo.patch
31         epatch "${FILESDIR}"/${PN}-5.6.100_p651-update-guest-attrs.patch
32 }
33
34 src_install() {
35         newinitd "${FILESDIR}/xe-daemon.initd" xe-daemon
36         dosbin xe-daemon
37         dosbin xe-linux-distribution
38         dosbin xe-update-guest-attrs
39         insinto /lib/udev/rules.d
40         newins xen-vcpu-hotplug.rules 10-xen-vcpu-hotplug.rules
41
42         if use xenstore; then
43                 dobin usr/bin/xeninfo
44                 dobin usr/bin/xenstore
45                 dobin usr/bin/xenstore-*
46         fi
47 }
48
49 pkg_postinst() {
50         if [ ! -e /etc/runlevels/boot/xe-daemon ]; then
51                 elog "To start the xe-daemon automatically by default"
52                 elog "you should add it to the boot runlevel :"
53                 elog "'rc-update add xe-daemon boot'"
54                 elog
55         fi
56 }