# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=vpcs
pkgver=0.8.3
pkgrel=0
pkgdesc="Simple virtual PC simulator"
url="https://sourceforge.net/projects/vpcs/"
arch="aarch64 x86 x86_64"
license="BSD-2-Clause"
makedepends="linux-headers bsd-compat-headers"
source="$pkgname-$pkgver.tar.gz::https://github.com/GNS3/vpcs/archive/v$pkgver.tar.gz
	musl-fixes.patch
	vpcs_alpine_aarch64.patch"

build() {
	cd src && ./mk.sh
}

check() {
	cd src && ./vpcs -v || test $? = 2
}

package() {
	mkdir -p "$pkgdir/usr/bin"
	install -Dm755 src/$pkgname $pkgdir/usr/bin/$pkgname
}

sha512sums="
3e0176ae0d3d2e22dc434856fbe9839da2b6d8c4eb24988fbf3b539af45f2f16c8098edf7c3f1769fc1e8edb76bfccda2faf48674266588a3761432f88000f42  vpcs-0.8.3.tar.gz
fd3c6bebab8214c378344f05cb30fcb6978809b23ea5ea2abcfd5b956c6a9200f52ffe579d2b12b6d77e4b94b086dad901959d0663adaa25061b1edb254191af  musl-fixes.patch
5f4333b402032686764ada43db8e8be609b1cbcddcc5204e2cc65ef939550f727e4fa53c012714eccbb873a12c26e77b02036c65fbbd489a198f881eb8ed24ac  vpcs_alpine_aarch64.patch
"
