# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributors: henning mueller <henning@orgizm.net>

pkgname=imvirt
pkgver=0.9.6
pkgrel=13
pkgdesc='Detect the virtualization technology of a machine, it is run in'
url='http://micky.ibh.net/~liske/imvirt.html'
arch=('x86_64')
license=('GPL2')
depends=('perl' 'dmidecode' 'perl-module-find' 'perl-file-slurp' 'perl-data-dumper')
options=('!emptydirs')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/DE-IBH/${pkgname}/archive/v${pkgver}.tar.gz)
sha512sums=('a3e6d8d6ff48f8e97c448443c0a5bff4d50db4721704e083be74c3dba78b43422678a8fd93841d82a7f34e12a70cb578a2052f9898817efe5101e4a2d21d5f0b')

prepare() {
  cd ${pkgname}-${pkgver}
  sed 's|/usr/sbin|/usr/bin|g' -i perl/lib/ImVirt/Utils/dmidecode/pipe.pm
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --libexecdir=/usr/lib/${pkgname} --sbindir=/usr/bin
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:
