#!/bin/sh

NAME="virt-manager"
DESC="GUI for managing virtual machines"

MAKEDEPS="intltool glib python-docutils"
DEPS="libvirt libvirt-glib python-libvirt python-ipaddr python-urlgrabber libosinfo gtksourceview gtk-vnc"

PKG_VER=4.1.0
SOURCE="https://releases.pagure.org/virt-manager/virt-manager-$PKG_VER.tar.gz"

ADDITIONAL="
fix-latest-libvirt-xml-output.patch
tests-remove-sgio-unfiltered.patch
"

#prepare () {
    #apply_patches
#}

build() {
	python3 setup.py build
}


package() {
	python3 setup.py --no-update-icon-cache --no-compile-schemas install --root "$PKG_DEST"
	python3 -m compileall "$PKG_DEST/usr/share/virt-manager"
	python3 -O -m compileall "$PKG_DEST/usr/share/virt-manager"
}

postinstall () {
    glib-compile-schemas /usr/share/glib-2.0/schemas/
}