# Maintainer: Luke Shumaker <lukeshu@parabola.nu>

pkgname=systemd-qemu
pkgver=20180909
url=https://git.lukeshu.com/$pkgname
license=('AGPL')

pkgrel=2
arch=(any)
depends=(qemu-headless 'bash>=4.4' numactl socat util-linux systemd)
makedepends=(git)
source=("git+${url}.git#tag=v${pkgver}")
sha256sums=('SKIP')

backup=(
        'etc/systemd/system/qemu'
        'etc/systemd/system/qemu@.service'
)

_makeargs=(
        sysconfdir=/etc
        bindir=/etc/systemd/system
        systemunitdir=/etc/systemd/system
)

build() {
	cd "$srcdir/$pkgname"
        make "${_makeargs[@]}"
}
        

package() {
	cd "$srcdir/$pkgname"
	make "${_makeargs[@]}" install DESTDIR="$pkgdir"
}
