# Template file for 'memtest86+'
pkgname=memtest86+
version=8.10
revision=1
archs="i686* x86_64*"
build_style="gnu-makefile"
make_use_env=yes # we DON'T want our cflags to be used
short_desc="Advanced Memory Diagnostic Tool"
maintainer="classabbyamp <void@placeviolette.net>"
license="GPL-2.0-or-later"
homepage="http://www.memtest.org"
distfiles="https://github.com/memtest86plus/memtest86plus/archive/refs/tags/v${version}.tar.gz"
checksum=5617bc42ae4572158988efd466954d08f25cbb78f1714164280064784c484f4d
nostrip=yes

case "$XBPS_TARGET_MACHINE" in
	x86_64*) build_wrksrc="build/x86_64" ;;
	i686*) build_wrksrc="build/i586" ;;
esac

do_install() {
	# for compatibility, install both, even though it's the same binary for BIOS and UEFI
	vinstall mt86plus 755 boot/memtest86+ memtest.bin
	vinstall mt86plus 755 boot/memtest86+ memtest.efi
	vinstall "${FILESDIR}/20_memtest86+" 755 etc/grub.d
}
