]>
Commit | Line | Data |
---|---|---|
c36e4789 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
c36e4789 MT |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = grub |
ee425925 | 7 | version = 2.06 |
c6f9b49c | 8 | release = 2 |
fd0c6b65 | 9 | |
6cec16f1 | 10 | groups = System/Boot |
ee425925 PM |
11 | url = https://www.gnu.org/software/grub/ |
12 | license = GPLv3 | |
802ea3af | 13 | summary = Grand Unified Boot Loader. |
c36e4789 | 14 | |
802ea3af | 15 | description |
dc22ea77 MT |
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 | |
c36e4789 | 19 | systems. |
802ea3af MT |
20 | end |
21 | ||
ee425925 | 22 | source_dl = https://ftp.gnu.org/gnu/grub/ |
ec89cb13 | 23 | sources = %{thisapp}.tar.xz |
802ea3af MT |
24 | |
25 | build | |
84587bfe MT |
26 | arches = aarch64 x86_64 |
27 | ||
802ea3af MT |
28 | requires |
29 | autoconf | |
30 | automake | |
31 | bison | |
ec89cb13 | 32 | bzip2-devel |
802ea3af MT |
33 | flex |
34 | freetype-devel | |
35 | gettext | |
ee425925 | 36 | gettext-devel |
dc22ea77 | 37 | libdevmapper-devel |
802ea3af | 38 | ncurses-devel |
b581cb22 | 39 | python3 |
802ea3af MT |
40 | zlib-devel |
41 | end | |
42 | ||
72471688 MT |
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 | ||
dc22ea77 | 53 | prepare_cmds |
b581cb22 | 54 | PYTHON=%{python3} ./autogen.sh |
72471688 MT |
55 | |
56 | for platform in %{platforms}; do | |
57 | cp -r %{DIR_APP} %{DIR_APP}-${platform} | |
58 | done | |
dc22ea77 MT |
59 | end |
60 | ||
5218f081 MT |
61 | # As the modules contain always 32 bit code, they |
62 | # should be living in /usr/lib. | |
63 | libdir = %{prefix}/lib | |
64 | ||
72471688 MT |
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 | ||
2af18b56 | 86 | # Install empty configuration file. |
ec89cb13 | 87 | mkdir -pv %{BUILDROOT}/boot/grub |
2af18b56 | 88 | touch %{BUILDROOT}/boot/grub/grub.cfg |
ec89cb13 | 89 | ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg |
bc7a5ea8 MT |
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 | |
802ea3af MT |
108 | end |
109 | end | |
110 | ||
802ea3af MT |
111 | packages |
112 | package %{name} | |
113 | requires | |
c6f9b49c | 114 | efibootmgr |
802ea3af | 115 | gettext |
bc7a5ea8 | 116 | system-logos >= 2 |
47bdaf55 MT |
117 | end |
118 | ||
ed1822cd MT |
119 | # An EFI version of grub does not exist any more. |
120 | obsoletes | |
121 | grub-efi <= 2.0.0-2 | |
2af18b56 | 122 | end |
dc22ea77 MT |
123 | |
124 | configfiles | |
ed1822cd MT |
125 | /boot/grub/grub.cfg |
126 | /etc/default/grub | |
802ea3af MT |
127 | end |
128 | end | |
1f9bc2f0 MT |
129 | |
130 | package %{name}-debuginfo | |
131 | template DEBUGINFO | |
132 | end | |
802ea3af | 133 | end |