1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
11 url = https://www.gnu.org/software/grub/
13 summary = Grand Unified Boot Loader.
16 GRUB (Grand Unified Boot Loader) is an experimental boot loader
17 capable of booting into most free operating systems - Linux, FreeBSD,
18 NetBSD, GNU Mach, and others as well as most commercial operating
22 source_dl = https://ftp.gnu.org/gnu/grub/
23 sources = %{thisapp}.tar.xz
26 arches = aarch64 x86_64
43 # Don't leak our CFLAGS to boot code
44 export HOST_CFLAGS = %{CFLAGS}
45 export HOST_LDFLAGS = %{LDFLAGS}
49 if "%{DISTRO_PLATFORM}" == "x86"
54 PYTHON=%{python3} ./autogen.sh
56 for platform in %{platforms}; do
57 cp -r %{DIR_APP} %{DIR_APP}-${platform}
61 # As the modules contain always 32 bit code, they
62 # should be living in /usr/lib.
63 libdir = %{prefix}/lib
66 for platform in %{platforms}; do
67 pushd %{DIR_APP}-${platform}
69 %{configure_options} \
70 --with-platform=${platform} \
74 make %{PARALLELISMFLAGS}
80 for platform in %{platforms}; do
81 pushd %{DIR_APP}-${platform}
82 make install DESTDIR=%{BUILDROOT}
86 # Install empty configuration file.
87 mkdir -pv %{BUILDROOT}/boot/grub
88 touch %{BUILDROOT}/boot/grub/grub.cfg
89 ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg
91 # Don't ship the default theme, replace it by our own one.
92 rm -rfv %{BUILDROOT}/boot/grub/themes/starfield \
93 %{datadir}/grub/themes
94 mkdir -pv %{BUILDROOT}/boot/grub/themes/system
95 cp -rfv %{DIR_SOURCE}/theme/* \
96 %{BUILDROOT}/boot/grub/themes/system/
99 mkdir -pv %{BUILDROOT}/boot/grub/themes/system
100 pushd %{BUILDROOT}/boot/grub/themes/system/
101 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-10.pf2 -s 10 \
102 %{datadir}/fonts/dejavu/DejaVuSans.ttf
103 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-12.pf2 -s 12 \
104 %{datadir}/fonts/dejavu/DejaVuSans.ttf
105 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-Bold-14.pf2 \
106 -s 14 %{datadir}/fonts/dejavu/DejaVuSans-Bold.ttf
119 # An EFI version of grub does not exist any more.
130 package %{name}-debuginfo