summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c1129b91abc1061981ec4343b2ea615bcb227ee3 (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
# Maintainer: Chris Werner Rau < aur [ at ] cwrau [ dot ] io >

pkgname=qtemu-git
pkgver=r242.eb0b8fe
pkgrel=1
pkgdesc="Qt5 GUI front-end for QEMU, similar to VirtualBox."
url="http://qtemu.org"
license=("GPL2")
arch=('i686' 'x86_64')
depends=('qemu' 'qt5-base')
conflicts=('qtemu')
source=($pkgname::"git+https://gitlab.com/qtemu/gui.git")
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "${srcdir}/$pkgname"
  if ! [ -d build ]
  then
    mkdir build
  fi
}

build() {
  cd "${srcdir}/$pkgname/build"
  qmake-qt5  \
    QMAKE_CFLAGS="${CFLAGS}" \
    QMAKE_CXXFLAGS="${CXXFLAGS}" \
    ../qtemu.pro
  make
}

package() {
  cd "${srcdir}/$pkgname/build"
  install -Dm644 "${srcdir}/$pkgname"/qtemu.desktop "${pkgdir}"/usr/share/applications/qtemu.desktop
  install -Dm644 "${srcdir}/$pkgname/qtemu.png" "${pkgdir}/usr/share/pixmaps/qtemu.png"
  install -Dm755 qtemu "${pkgdir}/usr/bin/qtemu"
}