summaryrefslogtreecommitdiff
path: root/libre/virt-manager/PKGBUILD
blob: fe51f369c563c7e74676eb7d36f754734cc9cd0c (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
# 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>

pkgbase=virt-manager
pkgname=(virt-install)
pkgver=2.2.1
pkgrel=1
pkgrel+=.par2
pkgdesc="Console user interface for managing virtual machines"
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=('intltool')
source=("https://virt-manager.org/download/sources/virt-manager/virt-manager-$pkgver.tar.gz"
        'libre.patch')
sha512sums=('aa97af52b3552c087beab8701762c21e8e6d818c9787d5376ed4e1ae40a34d5e8870c4c00fda9cb17a2340d1dff5b17e853182df720cdd9ea4c91cf01502a33a'
            '8858c3994da18cf704a5d4a715708ccb39d6e16e89890b7207709f2c5227abc03355d79172ed05ae8837d91b841f3c0d1b533e5bf56756c645192d20f36ffd80')

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

build() {
  cd "$srcdir/$pkgbase-$pkgver"
  python setup.py build
}

package_virt-install() {
  cd "$srcdir/$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 "$srcdir"/virt-manager
  mv "$pkgdir"/usr/bin/virt-manager \
    "$pkgdir"/usr/share/{appdata,applications,glib-2.0,icons}/ \
    "$pkgdir"/usr/share/man/man1/virt-manager.1 \
    "$srcdir/virt-manager/"
}