xe-guest-utilities-6.2.0_p1120.ebuild 1.5 KB

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