summaryrefslogtreecommitdiff
path: root/libre/virt-manager/PKGBUILD
blob: c6b04e7342ccd15c88422d89fd220bfa93eae6ae (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
# Maintainer (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.1.0
pkgrel=2
pkgrel+=.par1
pkgdesc="Console user interface for managing virtual machines"
pkgdesc+=", without non-FSDG compliant distros and operating systems support"
arch=('any')
url="http://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=('48590ff58246e13b73c7ab741ca854bfebae27fb90a891168db5d3fac1d066cce603f83b8d993e70e387624f911fc8503abe488e7992bc50f49d7e980aed5afb'
            'cb7cfcf9cf46db8edb2fcdf7fe21b203de811fdc81aa3cf990febba89ebb0cf53cc27b44171df2d979afa187dcdefb1f256fda67a37a2dbde4c23866cc1a9839')

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/"
}