summaryrefslogtreecommitdiffstats
path: root/recipes-extra/virt-manager/virt-manager_1.0.0.bb
blob: 21ad3bbbaffa9a1a78a51401b4927511bc663cd7 (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
SUMMARY = "virt-manager"
DESCRIPTION = "virt-manager"
HOMEPAGE = "http://virt-manager.org"
SECTION = "devel"

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"

SRC_URI = "https://fedorahosted.org/released/virt-manager/virt-manager-${PV}.tar.gz"
SRC_URI[sha256sum] = "2b2f59f7fccd2fcfbaf4306e33342e5d2be8f0ddd71af9eeca0c1f215e1e29aa"
SRC_URI[md5sum] = "8a0585de48d8060a5394aae912342c95"

sharedir = "${datadir}"

FILES_${PN} = " \
    ${bindir}/virt-clone \
    ${bindir}/virt-image \
    ${bindir}/virt-install \
    ${bindir}/virt-convert \
    ${bindir}/virt-xml \
    ${sharedir}/virt-manager/virt-clone \
    ${sharedir}/virt-manager/virt-image \
    ${sharedir}/virt-manager/virt-install \
    ${sharedir}/virt-manager/virt-convert \
    ${sharedir}/virt-manager/virt-xml \
    ${sharedir}/virt-manager/virtinst \
    ${sharedir}/virt-manager/virtconv \
    ${sharedir}/virt-manager/virtcli \
    \
    ${sharedir}/virt-manager/virt-manager \
    ${sharedir}/virt-manager/virtManager \
    ${sharedir}/virt-manager/ui \
    ${sharedir}/virt-manager/icons \
    ${sharedir}/icons \
    ${sharedir}/appdata \
    ${sharedir}/applications \
    ${sharedir}/glib-2.0 \
    ${@base_contains('DISTRO_FEATURES', 'x11', '${bindir}/virt-manager', '', d)} \
    "

DEPENDS = "nativesdk-perl"

RDEPENDS_${PN} = " \
    libvirt-python \
    python-urlgrabber \
    libxml2-python \
    ${@base_contains('DISTRO_FEATURES', 'x11', 'python-pygtk', '', d)} \
    "


do_configure() {
	python setup.py configure
}

do_build() {
	python setup.py build --prefix=${prefix}
}

# virt-manager is the only command that requires graphical libraries. The
# package does however not supply a --no-graphics argument or such to the
# install program, which is understandable since distutils (which is
# undocumented to a large degree) seems to be called with the complete file
# list before the argument parsing is performed. To avoid that this command is
# available when the package is built as part of a non-x11 distro, remove the
# /usr/bin/virt-manager file.

REMOVE_COMMAND = "${@base_contains('DISTRO_FEATURES', 'x11', '', 'rm ${D}${bindir}/virt-manager', d)}"
do_install() {
	python setup.py install --prefix=${prefix} --root=${D}

	sh -c "${REMOVE_COMMAND}"
}