%ifarch %{ix86} %define efiarch ia32 %endif %ifarch x86_64 %define efiarch x64 %endif %define debug_package %{nil} Name: refind Version: 0.12.0 Release: %mkrel 2 Summary: EFI boot manager License: GPLv3 Group: System/Boot and Init URL: http://www.rodsbooks.com/refind/ Source0: https://sourceforge.net/projects/refind/files/%version/refind-src-%version.tar.gz # Replace old Mageia icon with current version Source1: os_mageia.png # Use Mageia dark blue background Source2: dark-blue-banner.png # Fix ESP mount point and GNU EFI library paths Patch0: mga-system-path-fixes.patch # Add --nvramonly option to refind-install Patch1: install-nvram-only.patch # Support 32-bit EFI on 64-bit O/S (and vice versa) Patch2: detect-efi-size.patch # GGC 10 synthesises a call to memmove, which isn't implemented. Work # round this by disabling that optimisation. Patch3: disable-gcc-memmove-opt.patch # Fix bug in refind-install script. Patch4: fix-install-early-exit.patch # Change default banner Patch5: use-dark-blue-banner.patch ExclusiveArch: %{ix86} x86_64 BuildRequires: gnu-efi-devel Provides: bootloader Requires: efibootmgr %description A graphical boot manager for EFI- and UEFI-based computers, such as all Intel-based Macs and recent (most 2011 and later) PCs. rEFInd presents a boot menu showing all the EFI boot loaders on the EFI-accessible partitions, and optionally BIOS-bootable partitions on Macs and BIOS boot entries on UEFI PCs with CSMs. EFI-compatible OSes, including Linux, provide boot loaders that rEFInd can detect and launch. rEFInd can launch Linux EFI boot loaders such as ELILO, GRUB Legacy, GRUB 2, and 3.3.0 and later kernels with EFI stub support. EFI file system drivers for ext2/3/4fs, ReiserFS, Btrfs, NTFS, HFS+, and ISO-9660 enable rEFInd to read boot loaders from these file systems, too. rEFInd's ability to detect boot loaders at run time makes it very easy to use, particularly when paired with Linux kernels that provide EFI stub support. %prep %autosetup -p1 cp %{SOURCE1} %{SOURCE2} icons/ %build make LIBDIR=%{_libdir} gnuefi make LIBDIR=%{_libdir} fs_gnuefi %install mkdir -p %{buildroot}%{_datadir}/%{name}/refind/ # Copy the rEFInd binaries (rEFInd proper and drivers) install -Dp -m0644 refind/refind*.efi %{buildroot}%{_datadir}/%{name}/refind/ mkdir -p %{buildroot}%{_datadir}/%{name}/refind/drivers_%{efiarch} cp -a drivers_%{efiarch}/* %{buildroot}%{_datadir}/%{name}/refind/drivers_%{efiarch}/ mkdir -p %{buildroot}%{_datadir}/%{name}/refind/tools_%{efiarch} install -Dp -m0644 gptsync/gptsync_%{efiarch}.efi %{buildroot}%{_datadir}/%{name}/refind/tools_%{efiarch}/gptsync_%{efiarch}.efi # Copy configuration and support files install -Dp -m0644 refind.conf-sample %{buildroot}%{_datadir}/%{name}/refind/ cp -a icons %{buildroot}%{_datadir}/%{name}/refind/ rm -rf %{buildroot}%{_datadir}/%{name}/refind/icons/svg install -Dp -m0755 refind-install %{buildroot}%{_datadir}/%{name}/ # Copy man pages mkdir -p %{buildroot}%{_mandir}/man8 install -Dp -m0644 docs/man/mvrefind.8 %{buildroot}%{_mandir}/man8 install -Dp -m0644 docs/man/mkrlconf.8 %{buildroot}%{_mandir}/man8 install -Dp -m0644 docs/man/refind-install.8 %{buildroot}%{_mandir}/man8 install -Dp -m0644 docs/man/refind-mkdefault.8 %{buildroot}%{_mandir}/man8 # Copy scripts mkdir -p %{buildroot}%{_sbindir} install -Dp -m0755 mkrlconf %{buildroot}%{_sbindir}/ install -Dp -m0755 mvrefind %{buildroot}%{_sbindir}/ install -Dp -m0755 refind-mkdefault %{buildroot}%{_sbindir}/ ln -sr %{buildroot}%{_datadir}/%{name}/refind-install %{buildroot}%{_sbindir} # Copy banners and fonts cp -a banners %{buildroot}%{_datadir}/%{name}/ cp -a fonts %{buildroot}%{_datadir}/%{name}/ # Create version file and urpmi README file echo %{version} > VERSION echo "Version %{version} of the rEFInd boot manager is now available." > README.urpmi echo "To install it in the ESP, either use drakboot or, as root user," >> README.urpmi echo "execute the command '/sbin/refind-install'." >> README.urpmi echo "If you are having no problems with booting your system, there is" >> README.urpmi echo "no need to install this update in the ESP." >> README.urpmi %files %doc NEWS.txt COPYING.txt LICENSE.txt README.txt CREDITS.txt docs/Styles docs/refind %doc VERSION README.urpmi %{_sbindir}/mkrlconf %{_sbindir}/mvrefind %{_sbindir}/refind-install %{_sbindir}/refind-mkdefault %{_datadir}/%{name} %{_mandir}/man8/*