aboutsummaryrefslogtreecommitdiffstats
path: root/community/virt-what/APKBUILD
blob: 4a85ede0d16924a49e28d6cedaf894d3c58d3318 (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
43
44
45
46
47
48
49
50
51
52
53
54
# Contributor: Henrik Riomar <henrik.riomar@gmail.com>
# Maintainer: Henrik Riomar <henrik.riomar@gmail.com>
pkgname=virt-what
pkgver=1.18
pkgrel=3
pkgdesc="Detect if we are running in a virtual machine"
url="https://people.redhat.com/~rjones/virt-what/"
arch="x86 x86_64 ppc64le"
license="GPL-2.0-or-later"
checkdepends="checkbashisms"
makedepends="automake autoconf perl-dev"
subpackages="$pkgname-doc"
source="http://people.redhat.com/~rjones/$pkgname/files/$pkgname-$pkgver.tar.gz
	0001-Missing-have_cpuinfo-check.patch
	0002-Remove-bashisms.patch
	0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch
	0004-Determine-architecture-via-uname-m.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare

	cd "$builddir"
	autoreconf -ivf
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

check() {
	cd "$builddir"
	make check

	checkbashisms ./virt-what
}

package() {
	cd "$builddir"
	make install DESTDIR="$pkgdir"
}

sha512sums="8085a38111d5664f411f5bb9d2ee221bc22e5b0f2d993e8d518718b3f63b16ba73e052b1623c090493cf8fef52fd237ba823377503a32b4b7d03cc5380d5c613  virt-what-1.18.tar.gz
e910d197b172f7d9bf730238e0ea4cabd9db732051040233e2d25b44e07ed160c875ff9dd76048f0534ee269a77be14d01b2e8e66a51c8e9325109d25fb03d9b  0001-Missing-have_cpuinfo-check.patch
b57686e6f7af4d1c388b26d0a3e3a4964b5f74133aba47f4ed1f6771c8f22337f92f4519f01dd240a82e00e6fdbf0adaa7dd6040c4b9ec4924ce973b1fca9b33  0002-Remove-bashisms.patch
979c91b4f65ec95d85f2ad873e4148cd46e399534109ebeee03f8815c05327b590cf72a68a46f5ad655513591fb0c4a75cd08908446583d44213b87a75741c50  0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch
5a37329546b1c6e98cb03f0727f9c2f1cefa0c856bc594389852a51f69f0735777bd8b66ffa353c9c31e6c857a032b0b8f62e9aee61a8901a14328b31aea6395  0004-Determine-architecture-via-uname-m.patch"