###############################################################################
name = grub
-version = 2.00
-release = 2
-sup_arches = x86_64 i686
+version = 2.02
+release = 0.1
+
+sup_arches = aarch64 x86_64 i686
+thisapp = %{name}-%{version}
groups = System/Boot
url = http://www.gnu.org/software/grub/
automake
bison
bzip2-devel
+ debugedit >= 5.3.5-2
dejavu-fonts-sans-fonts
flex
freetype-devel
%{unifont}
end
+ # Don't leak our CFLAGS to boot code
+ export HOST_CFLAGS = %{CFLAGS}
+ export HOST_LDFLAGS = %{LDFLAGS}
+
+ platforms = efi
+
+ if "%{DISTRO_PLATFORM}" == "x86"
+ platforms += pc
+ end
+
prepare_cmds
cp -vf %{unifont} unifont.pcf.gz
./autogen.sh
- # Create a copy of the source tree to build
- # an EFI enabled version of grub.
- cp -pR . %{DIR_SRC}/%{thisapp}-efi
+ for platform in %{platforms}; do
+ cp -r %{DIR_APP} %{DIR_APP}-${platform}
+ done
end
# As the modules contain always 32 bit code, they
# should be living in /usr/lib.
libdir = %{prefix}/lib
- configure_options += \
- --target="i386" \
- --with-platform=pc \
- --program-transform-name=s,grub,grub, \
- --disable-werror \
- CFLAGS="$(echo %{CFLAGS} | sed \
- -e 's/-fstack-protector//g' \
- -e 's/--param=ssp-buffer-size=4//g' \
- -e 's/-mregparm=3/-mregparm=4/g' \
- -e 's/-fexceptions//g' \
- -e 's/-m64//g' \
- -e 's/-fasynchronous-unwind-tables//g' )"
-
- build_cmds
- cd ../%{thisapp}-efi
- ./configure \
- %{configure_options} \
- --with-platform=efi \
- CFLAGS="$(echo %{CFLAGS} | sed \
- -e 's/-O.//g' \
- -e 's/-fstack-protector//g' \
- -e 's/--param=ssp-buffer-size=4//g' \
- -e 's/-mregparm=3/-mregparm=4/g' \
- -e 's/-fexceptions//g' \
- -e 's/-m64//g' \
- -e 's/-fasynchronous-unwind-tables//g' )"
-
- make %{PARALLELISMFLAGS}
-
- ./grub-mkimage \
- -O i386-efi \
- -p /EFI/%{DISTRO_SNAME}/grub-efi \
- -o grub.efi \
- -d grub-core part_gpt hfsplus fat ext2 btrfs normal chain \
- boot configfile linux appleldr minicmd loadbios reboot halt \
- search font gfxterm echo video all_video
+ build
+ for platform in %{platforms}; do
+ pushd %{DIR_APP}-${platform}
+ ./configure \
+ %{configure_options} \
+ --with-platform=${platform} \
+ --disable-werror \
+ CFLAGS= LDFLAGS=
+
+ make %{PARALLELISMFLAGS}
+ popd
+ done
end
install
- cd ../%{thisapp}-efi
- make install DESTDIR=%{BUILDROOT}
-
- install -m 755 -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/
- install -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi
- touch %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg
- ln -svf ../boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg %{BUILDROOT}/etc/grub-efi.cfg
- install -m 755 grub.efi %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.efi
-
- cd -
- make install DESTDIR=%{BUILDROOT}
+ for platform in %{platforms}; do
+ pushd %{DIR_APP}-${platform}
+ make install DESTDIR=%{BUILDROOT}
+ popd
+ done
# Install empty configuration file.
mkdir -pv %{BUILDROOT}/boot/grub
debuginfo_strict_build_id = false
end
-quality-agent
- whitelist_nx
- /usr/bin/*|/usr/sbin/*
- end
-end
-
packages
package %{name}
requires
gettext
- os-prober
system-logos >= 2
end
- configfiles
- /boot/grub/grub.cfg
- /etc/default/grub
- end
- end
-
- package %{name}-efi
- description
- EFI version of GRUB, the Grand Unified Boot Loader.
+ # An EFI version of grub does not exist any more.
+ obsoletes
+ grub-efi <= 2.0.0-2
end
- summary = %{description}
-
- requires += grub = %{thisver}
configfiles
- /boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg
- end
-
- files
- /boot/efi
- /etc/grub-efi.cfg
- /usr/lib/grub/i386-efi
+ /boot/grub/grub.cfg
+ /etc/default/grub
end
end