Commit 1192af01 authored by Seblu's avatar Seblu
Browse files

lkvm-git: new vcs package syntax

parent 8e7a23f4
Loading
Loading
Loading
Loading
+7 −28
Original line number Diff line number Diff line
# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
# Maintainer: Sébastien Luttringer <seblu.seblu.net>

pkgname=lkvm-git
pkgver=20120409
pkgver=20130921
pkgrel=1
pkgdesc='Native Linux KVM tool'
arch=('i686' 'x86_64')
@@ -9,38 +9,17 @@ license=('GPL2')
url='https://github.com/penberg/linux-kvm'
depends=('glibc' 'zlib' 'libaio' 'libvncserver' 'sdl' 'git')
provides=('kvm')

gitroot='git://github.com/penberg/linux-kvm.git'
gitname='linux-kvm'
options=('!buildflags')
source=('git+git://github.com/penberg/linux-kvm.git')
md5sums=('SKIP')

build() {
  # manually fetch git repository
  cd "$startdir"
  if (( NOEXTRACT == 0 )); then
    if [[ -d $gitname ]] ; then
	    msg2 'Pulling git'
	    cd $gitname
      git pull origin
    else
      msg2 'Cloning git'
	    git clone --depth 1 "$gitroot"
    fi
  fi
  # linking source to srdir
  ln -sf "$startdir/$gitname" "$srcdir"
  # start building
  msg2 'Compiling'
  cd "$srcdir/$gitname/tools/kvm"
  cd linux-kvm/tools/kvm
  make
}

#check() {
#  cd "$srcdir/$gitname/tools/kvm"
#  make check
#}

package() {
  cd "$srcdir/$gitname/tools/kvm"
  cd linux-kvm/tools/kvm
  install -D -m 755 lkvm "$pkgdir/usr/bin/lkvm"
  install -D -m 755 vm "$pkgdir/usr/bin/vm"
}