summaryrefslogtreecommitdiff
path: root/libre/virt-manager/PKGBUILD
blob: 2a93e4259d4324bf39cc29d11e86d111e54a8759 (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
# Maintainer (Arch): Christian Rebischke <chris.rebischke@archlinux.org>
# Contributor (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor (Arch): Daniel Micay <danielmicay@gmail.com>
# Contributor (Arch): Jonathan Wiersma <archaur at jonw dot org>
# Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: grizzlyuser <grizzlyuser@protonmail.com>

pkgbase=virt-manager
pkgname=(virt-install)
pkgver=3.1.0
pkgrel=1
pkgrel+=.par1
pkgdesc="Command line tool for creating new KVM , Xen, or Linux container guests using the libvirt hypervisor"
pkgdesc+=", without non-FSDG compliant distros and operating systems support"
arch=('any')
url="https://virt-manager.org/"
license=('GPL')
depends=('libosinfo' 'libvirt-python' 'python-gobject' 'python-requests')
makedepends=('python-docutils')
checkdepends=('python-pytest' 'cpio' 'cdrtools')
source=("https://virt-manager.org/download/sources/virt-manager/virt-manager-$pkgver.tar.gz"
        'libre.patch')
b2sums=('729a16ee419cfc9f118e4a59336e961f17f38908ab3aaa3598c83bff3e8bca75b150f0f38b021c5ccb839a7c43e87f071859f68c2a81425715e236e14d0a7929'
        'c4b8369bfc78a0603e511a772a2570b84cafdc1cbac553ed9995bb18cdf7259835bb19d1e3120e49f86e19db9b6eb577cf75c3527cfad855c616acd09b3de048')

prepare() {
  cd "$srcdir/$pkgbase-$pkgver"
  patch -p1 -i ../libre.patch
}

build() {
  cd $pkgbase-$pkgver
  python setup.py configure --default-hvs qemu,lxc
  python setup.py build
}

package_virt-install() {
  cd $pkgbase-$pkgver
  python setup.py --no-update-icon-cache --no-compile-schemas install --root "$pkgdir"
  python -m compileall "$pkgdir"/usr/share/virt-manager
  python -O -m compileall "$pkgdir"/usr/share/virt-manager

  # Split virt-manager
  [[ -d "$srcdir"/virt-manager ]] && rm -r "$srcdir"/virt-manager/
  mkdir -p "$srcdir"/split/usr/{bin,share/{man/man1,virt-manager}}
  mv "$pkgdir"/usr/bin/virt-manager "$srcdir"/split/usr/bin/
  mv "$pkgdir"/usr/share/{applications,glib-2.0,icons,metainfo} "$srcdir"/split/usr/share/
  mv "$pkgdir"/usr/share/man/man1/virt-manager.1 "$srcdir"/split/usr/share/man/man1/
  mv "$pkgdir"/usr/share/virt-manager/{icons,ui,virtManager} "$srcdir"/split/usr/share/virt-manager/
}