Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:X0F:HSF
refind
refind.spec_mine
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File refind.spec_mine of Package refind
%define debug_package %{nil} %define docpath %{_datadir}/doc/refind-%{version} %if 0%{?suse_version} %define docpath %{_datadir}/doc/packages/refind-%{version} %endif Name: refind Version: 0.13.3.1 Release: 1 Summary: EFI boot manager software License: GPLv3 URL: http://www.rodsbooks.com/refind/ Group: System Environment/Base Source0: https://download.sourceforge.net/project/%{name}/%{version}/%{name}-src-%{version}.tar.gz Source1: rEFInd-chalkboard-1.0.tar.xz Source2: theme.conf #http://www.memtest86.com/download.htm Source100: memtest86-usb-9.5-beta-1.zip Patch0: refind_proper-gnuefi-path.patch Requires: efibootmgr gdisk sbsigntools openssl BuildRequires: bash BuildRequires: fdupes BuildRequires: unzip BuildRequires: gnu-efi BuildRequires: efibootmgr BuildRequires: sbsigntools BuildRequires: openssl # for carving out memtest binaries BuildRequires: p7zip-full BuildRequires: xz %define efiarch unknown %ifarch %ix86 %define efiarch ia32 %endif %ifarch x86_64 %define efiarch x64 %endif %ifarch aarch64 %define efiarch aa64 %endif # Directory in which refind.key and refind.crt files are found for # signing of binaries. If absent, binaries are copied unsigned. %define keydir /mnt/refind %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. EFI-compatbile 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 filesystem drivers for ext2/3/4fs, ReiserFS, HFS+, and ISO-9660 enable rEFInd to read boot loaders from these filesystems, too. rEFInd's ability to detect boot loaders at runtime makes it very easy to use, particularly when paired with Linux kernels that provide EFI stub support. It has EFI-capable memtest bundled with it. %prep %setup -q -n refind-src-%{version} -a 100 %patch0 -p1 # carving memtest 7z x -y memtest86-usb.img 7z x -y 'EFI System Partition.img' tar -xJf %{S:1} #sed -i 's|-fno-strict-aliasing|-fno-strict-aliasing -fno-tree-loop-distribute-patterns|' Make.common #sed -i 's|-lefi -lgnuefi|%{_libdir}/libefi.a %{_libdir}/libgnuefi.a|' Make.common %ifarch aarch64 sed -i '37s|aarch64|unknown|' Make.common %endif %build # https://sourceforge.net/p/refind/code/ci/e34a16301f425f273a67ed3abbc45840bc82d892/tree/Make.common?diff=a0a1e053fe1010cc5b05fbd31b970426aa94f400 export CFLAGS="%{optflags} -fno-tree-loop-distribute-patterns" #export CXXFLAGS="" LDFLAGS="" #export EFICRT0=%{_libdir}/gnuefi make gnuefi make fs_gnuefi %install # install memtest mkdir -pv %{buildroot}/boot/efi/EFI/tools/memtest cp -vR EFI/BOOT/* %{buildroot}/boot/efi/EFI/tools/memtest mkdir -p %{buildroot}%{_datadir}/refind-%{version}/refind/themes/ # Copy the rEFInd binaries (rEFInd proper and drivers) to %{_datadir}/refind-%{version}, # including signing the binaries if sbsign is installed and a %{keydir}/refind.key file # is available declare SBSign=`which sbsign 2> /dev/null` if [[ -f %{keydir}/refind.key && -x $SBSign ]] ; then $SBSign --key %{keydir}/refind.key --cert %{keydir}/refind.crt --output %{buildroot}%{_datadir}/refind-%{version}/refind/refind_%{efiarch}.efi refind/refind_%{efiarch}.efi mkdir -p %{buildroot}%{_datadir}/refind-%{version}/refind/drivers_%{efiarch} for File in `ls drivers_%{efiarch}/*_x64.efi` ; do $SBSign --key %{keydir}/refind.key --cert %{keydir}/refind.crt --output %{buildroot}%{_datadir}/refind-%{version}/refind/$File $File done mkdir -p %{buildroot}%{_datadir}/refind-%{version}/refind/tools_%{efiarch} $SBSign --key %{keydir}/refind.key --cert %{keydir}/refind.crt --output %{buildroot}%{_datadir}/refind-%{version}/refind/tools_%{efiarch}/gptsync_%{efiarch}.efi gptsync/gptsync_%{efiarch}.efi else install -Dp -m0644 refind/refind*.efi %{buildroot}%{_datadir}/refind-%{version}/refind/ mkdir -p %{buildroot}%{_datadir}/refind-%{version}/refind/drivers_%{efiarch} cp -a drivers_%{efiarch}/* %{buildroot}%{_datadir}/refind-%{version}/refind/drivers_%{efiarch}/ mkdir -p %{buildroot}%{_datadir}/refind-%{version}/refind/tools_%{efiarch} install -Dp -m0644 gptsync/gptsync_%{efiarch}.efi %{buildroot}%{_datadir}/refind-%{version}/refind/tools_%{efiarch}/gptsync_%{efiarch}.efi fi # Copy configuration and support files to %{_datadir}/refind-%{version} install -Dp -m0644 refind.conf-sample %{buildroot}%{_datadir}/refind-%{version}/refind/ cp -a icons %{buildroot}%{_datadir}/refind-%{version}/refind/ LINE_NUMBER=$(grep -n CreateBootCsvFile refind-install | cut -d : -f 1 | tail -1) perl -pi -le 'print " # Add Default Theme ThisDir=\"\$\(dirname \"\$\(readlink -f \"\$0\"\)\"\)\"; RefindDir=\"\$RootDir/boot/efi/\$TargetDir\"; mkdir -p \$RefindDir/themes; rm -rf \$RefindDir/themes/default cp -an \$ThisDir/refind/themes/default \$RefindDir/themes/default; echo \"include themes/default/theme.conf\" >> \$RefindDir/refind.conf; " if $. == '+$LINE_NUMBER refind-install install -Dp -m0755 refind-install %{buildroot}%{_datadir}/refind-%{version}/ # Copy documentation to %{_datadir}/doc/{packages}/refind-%{version} mkdir -p %{buildroot}/%{docpath} cp -a docs/* %{buildroot}/%{docpath}/ install -Dp -m0644 NEWS.txt COPYING.txt LICENSE.txt README.txt CREDITS.txt %{buildroot}/%{docpath} # Copy keys to /etc/refind.d/keys mkdir -p %{buildroot}/etc/refind.d/keys install -Dp -m0644 keys/* %{buildroot}/etc/refind.d/keys # Copy scripts to %{_sbindir} 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}/refind-%{version}/refind-install %{buildroot}%{_sbindir} # Copy banners and fonts to %{_datadir}/refind-%{version} cp -a banners %{buildroot}%{_datadir}/refind-%{version}/refind/themes/default/ cp -a fonts %{buildroot}%{_datadir}/refind-%{version}/refind/themes/default/ # Copy Default Theme cp -a rEFInd-chalkboard-* %{buildroot}%{_datadir}/refind-%{version}/refind/themes/default cp -a rEFInd-chalkboard-*/icons %{buildroot}%{_datadir}/refind-%{version}/refind/ cp %{S:2} %{buildroot}%{_datadir}/refind-%{version}/refind/themes/default/theme.conf # create efi directory mkdir -p %{buildroot}/boot/efi/EFI/refind %{buildroot}/boot/efi/EFI/tools cp -a %{buildroot}%{_datadir}/refind-%{version}/refind/* %{buildroot}/boot/efi/EFI/refind cp %{buildroot}/boot/efi/EFI/refind/refind.conf-sample %{buildroot}/boot/efi/EFI/refind/refind.conf %fdupes %{buildroot}%{_datadir} %clean #post #PATH=$PATH:/usr/local/bin # Remove any existing NVRAM entry for rEFInd, to avoid creating a duplicate. #ExistingEntry=`efibootmgr | grep "rEFInd Boot Manager" | cut -c 5-8` #if [[ -n $ExistingEntry ]] ; then # efibootmgr --bootnum $ExistingEntry --delete-bootnum #fi #cd %{_datadir}/refind-%{version} #declare VarFile=`ls -d /sys/firmware/efi/efivars/SecureBoot* 2> /dev/null` # Note: Two find operations for ShimFile favors shim over PreLoader -- if both are # present, the script uses shim rather than PreLoader. #declare ShimFile=`find /boot -name shim\.efi -o -name shimx64\.efi -o -name PreLoader\.efi 2> /dev/null | head -n 1` #if [[ ! -n $ShimFile ]] ; then # declare ShimFile=`find /boot -name PreLoader\.efi 2> /dev/null | head -n 1` #fi #declare SBSign=`which sbsign 2> /dev/null` #declare OpenSSL=`which openssl 2> /dev/null` # Run the rEFInd installation script. Do so with the --shim option # if Secure Boot mode is suspected and if a shim program can be # found, or without it if not. If a shim installation is attempted # and the sbsign and openssl programs can be found, do the install # using a local signing key. Note that this option is undesirable # for a distribution, since it would then require the user to # enroll an extra MOK. I'm including it here because I'm NOT a # distribution maintainer, and I want to encourage users to use # their own local keys. #if [[ -n $VarFile && -n $ShimFile ]] ; then # if [[ -n $SBSign && -n $OpenSSL ]] ; then # ./refind-install --shim $ShimFile --localkeys --yes # else # ./refind-install --shim $ShimFile --yes # fi #else # ./refind-install --yes #fi # CAUTION: Don't create a %preun or a %postun script that deletes the files # installed by refind-install, since that script will run after an update, thus # wiping out the just-updated files. %files %defattr(-,root,root -) %dir /boot/efi %dir /boot/efi/EFI %dir /boot/efi/EFI/tools %ghost /boot/efi/EFI/refind %config(noreplace) /boot/efi/EFI/refind/refind.conf /boot/efi/EFI/tools/memtest %{_docdir}/refind-%{version} #{_mandir}/man?/*.?.* %{_sbindir}/* %{_datadir}/refind-%{version} %{_sysconfdir}/refind.d/ %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor