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/ ftp://alpha.gnu.org/gnu/grub/
24 sources = %{thisapp}.tar.xz
27 unifont = /usr/share/X11/fonts/misc/unifont.pcf.gz
36 dejavu-fonts-sans-fonts
47 cp -vf %{unifont} unifont.pcf.gz
50 # Create a copy of the source tree to build
51 # an EFI enabled version of grub.
52 cp -pR . %{DIR_SRC}/%{thisapp}-efi
55 # As the modules contain always 32 bit code, they
56 # should be living in /usr/lib.
57 libdir = %{prefix}/lib
59 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 CFLAGS="$(echo %{CFLAGS} | sed \
79 -e 's/-fstack-protector//g' \
80 -e 's/--param=ssp-buffer-size=4//g' \
81 -e 's/-mregparm=3/-mregparm=4/g' \
82 -e 's/-fexceptions//g' \
84 -e 's/-fasynchronous-unwind-tables//g' )"
86 make %{PARALLELISMFLAGS}
90 -p /EFI/%{DISTRO_SNAME}/grub-efi \
92 -d grub-core part_gpt hfsplus fat ext2 btrfs normal chain \
93 boot configfile linux appleldr minicmd loadbios reboot halt \
94 search font gfxterm echo video all_video
99 make install DESTDIR=%{BUILDROOT}
101 install -m 755 -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/
102 install -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi
103 touch %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg
104 ln -svf ../boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg %{BUILDROOT}/etc/grub-efi.cfg
105 install -m 755 grub.efi %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.efi
108 make install DESTDIR=%{BUILDROOT}
110 # Install empty configuration file.
111 mkdir -pv %{BUILDROOT}/boot/grub
112 touch %{BUILDROOT}/boot/grub/grub.cfg
113 ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg
115 # Don't ship the default theme, replace it by our own one.
116 rm -rfv %{BUILDROOT}/boot/grub/themes/starfield \
117 %{datadir}/grub/themes
118 mkdir -pv %{BUILDROOT}/boot/grub/themes/system
119 cp -rfv %{DIR_SOURCE}/theme/* \
120 %{BUILDROOT}/boot/grub/themes/system/
123 mkdir -pv %{BUILDROOT}/boot/grub/themes/system
124 pushd %{BUILDROOT}/boot/grub/themes/system/
125 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-10.pf2 -s 10 \
126 %{datadir}/fonts/dejavu/DejaVuSans.ttf
127 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-12.pf2 -s 12 \
128 %{datadir}/fonts/dejavu/DejaVuSans.ttf
129 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-Bold-14.pf2 \
130 -s 14 %{datadir}/fonts/dejavu/DejaVuSans-Bold.ttf
134 debuginfo_strict_build_id = false
139 /usr/bin/*|/usr/sbin/*
159 EFI version of GRUB, the Grand Unified Boot Loader.
161 summary = %{description}
163 requires += grub = %{thisver}
166 /boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg
172 /usr/lib/grub/i386-efi
176 package %{name}-debuginfo