2004-09-09 08:25:45 +00:00
|
|
|
# Prevent stripping
|
2014-08-26 12:19:26 +00:00
|
|
|
%global __spec_install_post /usr/lib/rpm/brp-compress
|
2004-09-09 08:25:45 +00:00
|
|
|
# Turn off debuginfo package
|
2014-08-26 12:19:26 +00:00
|
|
|
%global debug_package %{nil}
|
2023-05-19 00:44:33 +00:00
|
|
|
%global common_description %{expand:
|
2014-02-17 12:33:08 +00:00
|
|
|
Memtest86+ is a thorough stand-alone memory test for x86 and x86-64
|
|
|
|
architecture computers. BIOS based memory tests are only a quick
|
|
|
|
check and often miss many of the failures that are detected by
|
2004-09-09 08:25:45 +00:00
|
|
|
Memtest86+.
|
2023-05-19 00:44:33 +00:00
|
|
|
}
|
2011-01-11 15:53:18 +00:00
|
|
|
%ifarch x86_64
|
2023-05-19 00:44:33 +00:00
|
|
|
%global mt_isa x64
|
2011-01-11 15:53:18 +00:00
|
|
|
%endif
|
2023-05-19 00:44:33 +00:00
|
|
|
%ifarch %{ix86}
|
|
|
|
%global mt_isa ia32
|
2009-04-24 19:12:27 +00:00
|
|
|
%endif
|
2004-09-09 08:25:45 +00:00
|
|
|
|
2023-05-19 00:44:33 +00:00
|
|
|
Name: memtest86+
|
|
|
|
Version: 6.20
|
|
|
|
Release: %autorelease
|
|
|
|
Summary: Stand-alone memory tester for x86-64 computers
|
|
|
|
License: GPL-2.0-only
|
|
|
|
URL: https://www.memtest.org/
|
|
|
|
Source0: https://github.com/memtest86plus/memtest86plus/archive/v%{version}/memtest86-plus-%{version}.tar.gz
|
2011-12-07 22:44:46 +00:00
|
|
|
|
2023-05-19 00:44:33 +00:00
|
|
|
BuildRequires: gcc, make, xorriso, dosfstools, mtools
|
|
|
|
ExclusiveArch: x86_64 %{ix86}
|
2011-12-07 14:48:31 +00:00
|
|
|
|
2023-05-19 00:44:33 +00:00
|
|
|
%description
|
|
|
|
%wordwrap -v common_description
|
2004-09-09 08:25:45 +00:00
|
|
|
|
|
|
|
|
2023-05-19 00:44:33 +00:00
|
|
|
%prep
|
|
|
|
%autosetup -n memtest86plus-%{version} -p1
|
2004-09-09 08:25:45 +00:00
|
|
|
|
|
|
|
|
2023-05-19 00:44:33 +00:00
|
|
|
%build
|
|
|
|
pushd build%{__isa_bits}
|
|
|
|
make
|
|
|
|
make iso
|
|
|
|
popd
|
2004-09-09 08:25:45 +00:00
|
|
|
|
|
|
|
|
2023-05-19 00:44:33 +00:00
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{_libdir}/%{name}
|
|
|
|
mkdir -p %{buildroot}%{_datarootdir}/%{name}
|
2004-09-09 08:25:45 +00:00
|
|
|
|
2023-05-19 00:44:33 +00:00
|
|
|
pushd build%{__isa_bits}
|
|
|
|
install -m 0644 memtest.efi %{buildroot}%{_libdir}/%{name}/memtest86+%{mt_isa}.efi
|
|
|
|
install -m 0644 memtest.bin %{buildroot}%{_libdir}/%{name}/memtest86+%{mt_isa}.bin
|
|
|
|
install -m 0644 memtest.iso %{buildroot}%{_datarootdir}/%{name}/memtest86+%{mt_isa}.iso
|
|
|
|
popd
|
2004-09-09 08:25:45 +00:00
|
|
|
|
|
|
|
|
2023-05-19 00:44:33 +00:00
|
|
|
%files
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
%{_libdir}/%{name}/memtest86+%{mt_isa}.*
|
|
|
|
%{_datarootdir}/%{name}/memtest86+%{mt_isa}.iso
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
install -m 0644 %{_libdir}/%{name}/memtest86+%{mt_isa}.* /boot/
|
|
|
|
if [ -d /sys/firmware/efi/ ]; then
|
|
|
|
cat << EOBLSEFI > /boot/loader/entries/`cat /etc/machine-id`-0-memtest86+-%{version}-uefi.%{mt_isa}.conf
|
|
|
|
title Memtest86+ v%{version} %{mt_isa} UEFI
|
|
|
|
linux /memtest86+%{mt_isa}.efi
|
|
|
|
EOBLSEFI
|
|
|
|
else
|
|
|
|
cat << EOBLSBIN > /boot/loader/entries/`cat /etc/machine-id`-0-memtest86+-%{version}-bios.%{mt_isa}.conf
|
|
|
|
title Memtest86+ v%{version} %{mt_isa} BIOS
|
|
|
|
linux /memtest86+%{mt_isa}.bin
|
|
|
|
EOBLSBIN
|
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
rm -f /boot/memtest86+%{mt_isa}.*
|
|
|
|
rm -f /boot/loader/entries/`cat /etc/machine-id`-0-memtest86+-%{version}-*.%{mt_isa}.conf
|
|
|
|
fi
|
|
|
|
exit 0
|
2004-09-09 08:25:45 +00:00
|
|
|
|
|
|
|
|
2023-05-19 00:44:33 +00:00
|
|
|
%changelog
|
|
|
|
%autochangelog
|