1 |
%ifarch %{ix86} |
2 |
%define efiarch ia32 |
3 |
%endif |
4 |
%ifarch x86_64 |
5 |
%define efiarch x64 |
6 |
%endif |
7 |
|
8 |
%define debug_package %{nil} |
9 |
|
10 |
Name: refind |
11 |
Version: 0.13.3.1 |
12 |
Release: %mkrel 2 |
13 |
Summary: EFI boot manager |
14 |
License: GPLv3 |
15 |
Group: System/Boot and Init |
16 |
URL: https://www.rodsbooks.com/refind/ |
17 |
Source0: https://sourceforge.net/projects/refind/files/%version/refind-src-%version.tar.gz |
18 |
# Replace old Mageia icon with current version |
19 |
Source1: os_mageia.png |
20 |
# Use Mageia dark blue background |
21 |
Source2: dark-blue-banner.png |
22 |
# Fix ESP mount point and GNU EFI library paths |
23 |
Patch0: mga-system-path-fixes.patch |
24 |
# Add --nvramonly option to refind-install |
25 |
Patch1: install-nvram-only.patch |
26 |
# Support 32-bit EFI on 64-bit O/S (and vice versa) |
27 |
Patch2: detect-efi-size.patch |
28 |
# Change default banner |
29 |
Patch3: use-dark-blue-banner.patch |
30 |
# Fix compatibility with ext4 filesystems created by e2fsprogs >= 1.47.0 |
31 |
Patch4: ignore-ext4-metadata_csum_seed-feature.patch |
32 |
|
33 |
ExclusiveArch: %{ix86} x86_64 |
34 |
BuildRequires: gnu-efi-devel |
35 |
Provides: bootloader |
36 |
Requires: efibootmgr |
37 |
|
38 |
%description |
39 |
|
40 |
A graphical boot manager for EFI- and UEFI-based computers, such as all |
41 |
Intel-based Macs and recent (most 2011 and later) PCs. rEFInd presents a |
42 |
boot menu showing all the EFI boot loaders on the EFI-accessible |
43 |
partitions, and optionally BIOS-bootable partitions on Macs and BIOS boot |
44 |
entries on UEFI PCs with CSMs. EFI-compatible OSes, including Linux, |
45 |
provide boot loaders that rEFInd can detect and launch. rEFInd can launch |
46 |
Linux EFI boot loaders such as ELILO, GRUB Legacy, GRUB 2, and 3.3.0 and |
47 |
later kernels with EFI stub support. EFI file system drivers for ext2/3/4fs, |
48 |
ReiserFS, Btrfs, NTFS, HFS+, and ISO-9660 enable rEFInd to read boot |
49 |
loaders from these file systems, too. rEFInd's ability to detect boot |
50 |
loaders at run time makes it very easy to use, particularly when paired with |
51 |
Linux kernels that provide EFI stub support. |
52 |
|
53 |
%prep |
54 |
%autosetup -p1 |
55 |
cp %{SOURCE1} %{SOURCE2} icons/ |
56 |
|
57 |
%build |
58 |
make LIBDIR=%{_libdir} gnuefi |
59 |
make LIBDIR=%{_libdir} fs_gnuefi |
60 |
|
61 |
%install |
62 |
mkdir -p %{buildroot}%{_datadir}/%{name}/refind/ |
63 |
|
64 |
# Copy the rEFInd binaries (rEFInd proper and drivers) |
65 |
install -Dp -m0644 refind/refind*.efi %{buildroot}%{_datadir}/%{name}/refind/ |
66 |
mkdir -p %{buildroot}%{_datadir}/%{name}/refind/drivers_%{efiarch} |
67 |
cp -a drivers_%{efiarch}/* %{buildroot}%{_datadir}/%{name}/refind/drivers_%{efiarch}/ |
68 |
mkdir -p %{buildroot}%{_datadir}/%{name}/refind/tools_%{efiarch} |
69 |
install -Dp -m0644 gptsync/gptsync_%{efiarch}.efi %{buildroot}%{_datadir}/%{name}/refind/tools_%{efiarch}/gptsync_%{efiarch}.efi |
70 |
|
71 |
# Copy configuration and support files |
72 |
install -Dp -m0644 refind.conf-sample %{buildroot}%{_datadir}/%{name}/refind/ |
73 |
cp -a icons %{buildroot}%{_datadir}/%{name}/refind/ |
74 |
rm -rf %{buildroot}%{_datadir}/%{name}/refind/icons/svg |
75 |
install -Dp -m0755 refind-install %{buildroot}%{_datadir}/%{name}/ |
76 |
|
77 |
# Copy man pages |
78 |
mkdir -p %{buildroot}%{_mandir}/man8 |
79 |
install -Dp -m0644 docs/man/mvrefind.8 %{buildroot}%{_mandir}/man8 |
80 |
install -Dp -m0644 docs/man/mkrlconf.8 %{buildroot}%{_mandir}/man8 |
81 |
install -Dp -m0644 docs/man/refind-install.8 %{buildroot}%{_mandir}/man8 |
82 |
install -Dp -m0644 docs/man/refind-mkdefault.8 %{buildroot}%{_mandir}/man8 |
83 |
|
84 |
# Copy scripts |
85 |
mkdir -p %{buildroot}%{_sbindir} |
86 |
install -Dp -m0755 mkrlconf %{buildroot}%{_sbindir}/ |
87 |
install -Dp -m0755 mvrefind %{buildroot}%{_sbindir}/ |
88 |
install -Dp -m0755 refind-mkdefault %{buildroot}%{_sbindir}/ |
89 |
ln -sr %{buildroot}%{_datadir}/%{name}/refind-install %{buildroot}%{_sbindir} |
90 |
|
91 |
# Copy banners and fonts |
92 |
cp -a banners %{buildroot}%{_datadir}/%{name}/ |
93 |
cp -a fonts %{buildroot}%{_datadir}/%{name}/ |
94 |
|
95 |
# Create sysconfig file |
96 |
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig |
97 |
echo "REFIND_BANNER=%{_datadir}/%{name}/refind/icons/dark-blue-banner.png" > %{buildroot}%{_sysconfdir}/sysconfig/refind |
98 |
echo "MAGEIA_THEME=%{_datadir}/mga/backgrounds/Mageia-Default-3840x2160.png" >> %{buildroot}%{_sysconfdir}/sysconfig/refind |
99 |
|
100 |
# Create version file and urpmi README file |
101 |
echo %{version} > VERSION |
102 |
echo "Version %{version} of the rEFInd boot manager is now available." > README.urpmi |
103 |
echo "To install it in the ESP, either use drakboot or, as root user," >> README.urpmi |
104 |
echo "execute the command '/sbin/refind-install'." >> README.urpmi |
105 |
echo "If you are having no problems with booting your system, there is" >> README.urpmi |
106 |
echo "no need to install this update in the ESP." >> README.urpmi |
107 |
|
108 |
%files |
109 |
%doc NEWS.txt COPYING.txt LICENSE.txt README.txt CREDITS.txt docs/Styles docs/refind |
110 |
%doc VERSION README.urpmi |
111 |
%{_sbindir}/mkrlconf |
112 |
%{_sbindir}/mvrefind |
113 |
%{_sbindir}/refind-install |
114 |
%{_sbindir}/refind-mkdefault |
115 |
%{_datadir}/%{name} |
116 |
%{_mandir}/man8/* |
117 |
%config %{_sysconfdir}/sysconfig/refind |