pkgname=pm-qa
pkgver=git
pkgrel=1
arch=('i386' 'x86_64')
url="https://git.linaro.org/power/pm-qa.git"
license=('GPL')
source=('https://git.linaro.org/power/pm-qa.git' https://github.com/glmark2/glmark2.git)
sha256sums=('SKIP' 'SKIP')

build()
{
	cd ${srcdir}/pm-qa
	make -C cpuidle cpuidle_killer
	cd utils
	make

	cd ${srcdir}/glmark2
	benchmark_path="${pkgdir}/lkp/benchmarks/${pkgname}"
	mkdir -p $benchmark_path/glmark2
	[ "$DISTRO" = "centos" -o "$DISTRO" = "aliyun" ] && sed -i 's/-std=c++14/-std=c++1y/' wscript
	./waf configure --prefix=$benchmark_path/glmark2 --with-flavors=x11-gl || return
	./waf || return
	./waf install || return
}

package() {
	benchmark_path="${pkgdir}/lkp/benchmarks/${pkgname}"
	cp -af "${srcdir}/${pkgname}/"* $benchmark_path
}
