pkgname=analyze-suspend
pkgver=git
pkgrel=1
arch=('i386' 'x86_64')
url="https://github.com/intel/pm-graph.git"
license=('GPL')
source=("https://github.com/intel/pm-graph.git"
	"https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
	"https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git")
md5sums=('SKIP' 'SKIP' 'SKIP')

build() {
	cd "$srcdir/linux/tools/power/x86/turbostat"
	make
}

package() {
	benchmark_path="${pkgdir}/lkp/benchmarks/${pkgname}"
	mkdir -p "${benchmark_path}"
	cp -af "${srcdir}/pm-graph/"* "${benchmark_path}"
	turbostat_path="${pkgdir}/lkp/benchmarks/turbostat"
	mkdir -p "${turbostat_path}"
	cp -a "${srcdir}/linux/tools/power/x86/turbostat/turbostat" "${turbostat_path}"
	firmware_path="${pkgdir}/lib/firmware/"
	mkdir -p $firmware_path
	cp -af "${srcdir}/linux-firmware/"* "${firmware_path}"
}
