############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = grub version = 2.06 release = 2 groups = System/Boot url = https://www.gnu.org/software/grub/ license = GPLv3 summary = Grand Unified Boot Loader. description GRUB (Grand Unified Boot Loader) is an experimental boot loader capable of booting into most free operating systems - Linux, FreeBSD, NetBSD, GNU Mach, and others as well as most commercial operating systems. end source_dl = https://ftp.gnu.org/gnu/grub/ sources = %{thisapp}.tar.xz build arches = aarch64 x86_64 requires autoconf automake bison bzip2-devel flex freetype-devel gettext gettext-devel libdevmapper-devel ncurses-devel python3 zlib-devel 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 PYTHON=%{python3} ./autogen.sh 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 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 for platform in %{platforms}; do pushd %{DIR_APP}-${platform} make install DESTDIR=%{BUILDROOT} popd done # Install empty configuration file. mkdir -pv %{BUILDROOT}/boot/grub touch %{BUILDROOT}/boot/grub/grub.cfg ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg # Don't ship the default theme, replace it by our own one. rm -rfv %{BUILDROOT}/boot/grub/themes/starfield \ %{datadir}/grub/themes mkdir -pv %{BUILDROOT}/boot/grub/themes/system cp -rfv %{DIR_SOURCE}/theme/* \ %{BUILDROOT}/boot/grub/themes/system/ # Prepare the fonts. mkdir -pv %{BUILDROOT}/boot/grub/themes/system pushd %{BUILDROOT}/boot/grub/themes/system/ %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-10.pf2 -s 10 \ %{datadir}/fonts/dejavu/DejaVuSans.ttf %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-12.pf2 -s 12 \ %{datadir}/fonts/dejavu/DejaVuSans.ttf %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-Bold-14.pf2 \ -s 14 %{datadir}/fonts/dejavu/DejaVuSans-Bold.ttf popd end end packages package %{name} requires efibootmgr gettext system-logos >= 2 end # An EFI version of grub does not exist any more. obsoletes grub-efi <= 2.0.0-2 end configfiles /boot/grub/grub.cfg /etc/default/grub end end package %{name}-debuginfo template DEBUGINFO end end