1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
9 sup_arches = x86_64 i686
12 url = http://www.gnu.org/software/grub/
14 summary = Grand Unified Boot Loader.
17 GRUB (Grand Unified Boot Loader) is an experimental boot loader
18 capable of booting into most free operating systems - Linux, FreeBSD,
19 NetBSD, GNU Mach, and others as well as most commercial operating
23 source_dl = http://ftp.gnu.org/gnu/grub/
40 # Replace pkglib_DATA (automake 1.11.2 incompatibility)
41 sed -i -e "s/pkglib_DATA/pkgdata_DATA/g" \
42 -e "s/pkglib_SCRIPTS/pkgdata_SCRIPTS/g" \
43 Makefile* */Makefile* \
44 gentpl.py util/grub-*.in
48 # Create a copy of the source tree to build
49 # an EFI enabled version of grub.
50 cp -R . %{DIR_SRC}/%{thisapp}-efi
53 # As the modules contain always 32 bit code, they
54 # should be living in /usr/lib.
55 libdir = %{prefix}/lib
57 configure_options += \
62 --program-transform-name=s,grub,grub, \
64 CFLAGS="$(echo %{CFLAGS} | sed \
65 -e 's/-fstack-protector//g' \
66 -e 's/--param=ssp-buffer-size=4//g' \
67 -e 's/-mregparm=3/-mregparm=4/g' \
68 -e 's/-fexceptions//g' \
70 -e 's/-fasynchronous-unwind-tables//g' )"
75 %{configure_options} \
77 --program-transform-name=s,grub,grub-efi, \
78 CFLAGS="$(echo %{CFLAGS} | sed \
80 -e 's/-fstack-protector//g' \
81 -e 's/--param=ssp-buffer-size=4//g' \
82 -e 's/-mregparm=3/-mregparm=4/g' \
83 -e 's/-fexceptions//g' \
85 -e 's/-fasynchronous-unwind-tables//g' )"
87 make %{PARALLELISMFLAGS}
91 -p /EFI/%{DISTRO_SNAME}/grub-efi \
93 -d grub-core part_gpt hfsplus fat ext2 btrfs normal chain \
94 boot configfile linux appleldr minicmd loadbios reboot halt \
95 search font gfxterm echo video efi_gop efi_uga
100 make install DESTDIR=%{BUILDROOT}
102 mv -v %{BUILDROOT}/etc/bash_completion.d/grub{,-efi}
103 sed -e "s,grub/grub-mkconfig_lib,grub-efi/grub-mkconfig_lib," \
104 -i %{BUILDROOT}/sbin/grub-efi-mkconfig
106 install -m 755 -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/
107 install -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi
108 touch %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg
109 ln -svf ../boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg %{BUILDROOT}/etc/grub-efi.cfg
110 install -m 755 grub.efi %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.efi
113 make install DESTDIR=%{BUILDROOT}
116 install -m 0744 %{DIR_SOURCE}/05_theme %{BUILDROOT}/etc/grub.d/
118 # Install splash background
119 mkdir -pv %{BUILDROOT}/boot/grub
120 install %{DIR_SOURCE}/splash.png %{BUILDROOT}/boot/grub
122 # Install empty configuration file.
123 touch %{BUILDROOT}/boot/grub/grub.cfg
138 /usr/share/X11/fonts/misc/unifont.pcf.gz
146 # Generate grub compatible font for graphical boot menu
147 # This only converts Latin-1, Latin Extended A+B, Arrows, Box and Block characters
149 /usr/bin/grub-mkfont --output /boot/grub/unifont.pf2 \
150 --range=0x0000-0x0241,0x2190-0x21FF,0x2500-0x259f \
151 /usr/share/X11/fonts/misc/unifont.pcf.gz
157 EFI version of GRUB, the Grand Unified Boot Loader.
159 summary = %{description}
161 requires += grub = %{thisver}
164 /boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg
169 /etc/bash_completion.d/grub-efi
177 package %{name}-debuginfo