]> git.ipfire.org Git - ipfire-3.x.git/blob - grub/grub.nm
json-c: Update to version 0.17-20230812
[ipfire-3.x.git] / grub / grub.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = grub
7 version = 2.06
8 release = 2
9
10 groups = System/Boot
11 url = https://www.gnu.org/software/grub/
12 license = GPLv3
13 summary = Grand Unified Boot Loader.
14
15 description
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
19 systems.
20 end
21
22 source_dl = https://ftp.gnu.org/gnu/grub/
23 sources = %{thisapp}.tar.xz
24
25 build
26 arches = aarch64 x86_64
27
28 requires
29 autoconf
30 automake
31 bison
32 bzip2-devel
33 flex
34 freetype-devel
35 gettext
36 gettext-devel
37 libdevmapper-devel
38 ncurses-devel
39 python3
40 zlib-devel
41 end
42
43 # Don't leak our CFLAGS to boot code
44 export HOST_CFLAGS = %{CFLAGS}
45 export HOST_LDFLAGS = %{LDFLAGS}
46
47 platforms = efi
48
49 if "%{DISTRO_PLATFORM}" == "x86"
50 platforms += pc
51 end
52
53 prepare_cmds
54 PYTHON=%{python3} ./autogen.sh
55
56 for platform in %{platforms}; do
57 cp -r %{DIR_APP} %{DIR_APP}-${platform}
58 done
59 end
60
61 # As the modules contain always 32 bit code, they
62 # should be living in /usr/lib.
63 libdir = %{prefix}/lib
64
65 build
66 for platform in %{platforms}; do
67 pushd %{DIR_APP}-${platform}
68 ./configure \
69 %{configure_options} \
70 --with-platform=${platform} \
71 --disable-werror \
72 CFLAGS= LDFLAGS=
73
74 make %{PARALLELISMFLAGS}
75 popd
76 done
77 end
78
79 install
80 for platform in %{platforms}; do
81 pushd %{DIR_APP}-${platform}
82 make install DESTDIR=%{BUILDROOT}
83 popd
84 done
85
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
90
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/
97
98 # Prepare the fonts.
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
107 popd
108 end
109 end
110
111 packages
112 package %{name}
113 requires
114 efibootmgr
115 gettext
116 system-logos >= 2
117 end
118
119 # An EFI version of grub does not exist any more.
120 obsoletes
121 grub-efi <= 2.0.0-2
122 end
123
124 configfiles
125 /boot/grub/grub.cfg
126 /etc/default/grub
127 end
128 end
129
130 package %{name}-debuginfo
131 template DEBUGINFO
132 end
133 end