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-06-30 21:12:20 +00:00
|
|
|
Name: memtest86+
|
2024-01-07 17:59:02 +00:00
|
|
|
Version: 7.00
|
2023-06-30 21:12:20 +00:00
|
|
|
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
|
|
|
|
Source1: memtest86+.kernel-install-plugin
|
|
|
|
|
|
|
|
BuildRequires: gcc, make, xorriso, dosfstools, mtools
|
|
|
|
Requires(pre): systemd-udev >= 252
|
|
|
|
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
|
2023-06-30 21:12:20 +00:00
|
|
|
install -m 0755 %{SOURCE1} %{buildroot}%{_libdir}/%{name}/memtest86+.kernel-install-plugin
|
2023-05-19 00:44:33 +00:00
|
|
|
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}.*
|
2023-06-30 21:12:20 +00:00
|
|
|
%{_libdir}/%{name}/memtest86+.kernel-install-plugin
|
2023-05-19 00:44:33 +00:00
|
|
|
%{_datarootdir}/%{name}/memtest86+%{mt_isa}.iso
|
|
|
|
|
2023-07-04 21:28:48 +00:00
|
|
|
|
2023-05-19 00:44:33 +00:00
|
|
|
%posttrans
|
2023-06-30 21:12:20 +00:00
|
|
|
MEMTEST_IMAGE="memtest86+%{mt_isa}.bin"
|
2023-05-19 00:44:33 +00:00
|
|
|
if [ -d /sys/firmware/efi/ ]; then
|
2023-06-30 21:12:20 +00:00
|
|
|
MEMTEST_IMAGE="memtest86+%{mt_isa}.efi"
|
2023-05-19 00:44:33 +00:00
|
|
|
fi
|
2023-06-30 21:12:20 +00:00
|
|
|
KERNEL_INSTALL_PLUGINS=%{_libdir}/%{name}/memtest86+.kernel-install-plugin \
|
|
|
|
kernel-install add %{version} %{_libdir}/%{name}/${MEMTEST_IMAGE}
|
2023-05-19 00:44:33 +00:00
|
|
|
exit 0
|
|
|
|
|
2023-06-30 21:12:20 +00:00
|
|
|
|
|
|
|
%preun
|
2023-05-19 00:44:33 +00:00
|
|
|
if [ $1 -eq 0 ]; then
|
2023-06-30 21:12:20 +00:00
|
|
|
KERNEL_INSTALL_PLUGINS=%{_libdir}/%{name}/memtest86+.kernel-install-plugin \
|
|
|
|
kernel-install remove %{version}
|
2023-05-19 00:44:33 +00:00
|
|
|
fi
|
|
|
|
exit 0
|
2004-09-09 08:25:45 +00:00
|
|
|
|
|
|
|
|
2023-05-19 00:44:33 +00:00
|
|
|
%changelog
|
|
|
|
%autochangelog
|