]>
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 |
b581cb22 | 8 | release = 1.1 |
fd0c6b65 | 9 | |
ee425925 | 10 | sup_arches = aarch64 x86_64 |
fd0c6b65 | 11 | thisapp = %{name}-%{version} |
c36e4789 | 12 | |
6cec16f1 | 13 | groups = System/Boot |
ee425925 PM |
14 | url = https://www.gnu.org/software/grub/ |
15 | license = GPLv3 | |
802ea3af | 16 | summary = Grand Unified Boot Loader. |
c36e4789 | 17 | |
802ea3af | 18 | description |
dc22ea77 MT |
19 | GRUB (Grand Unified Boot Loader) is an experimental boot loader |
20 | capable of booting into most free operating systems - Linux, FreeBSD, | |
21 | NetBSD, GNU Mach, and others as well as most commercial operating | |
c36e4789 | 22 | systems. |
802ea3af MT |
23 | end |
24 | ||
ee425925 | 25 | source_dl = https://ftp.gnu.org/gnu/grub/ |
ec89cb13 | 26 | sources = %{thisapp}.tar.xz |
802ea3af MT |
27 | |
28 | build | |
29 | requires | |
30 | autoconf | |
31 | automake | |
32 | bison | |
ec89cb13 | 33 | bzip2-devel |
802ea3af MT |
34 | flex |
35 | freetype-devel | |
36 | gettext | |
ee425925 | 37 | gettext-devel |
dc22ea77 | 38 | libdevmapper-devel |
802ea3af | 39 | ncurses-devel |
b581cb22 | 40 | python3 |
802ea3af MT |
41 | zlib-devel |
42 | end | |
43 | ||
72471688 MT |
44 | # Don't leak our CFLAGS to boot code |
45 | export HOST_CFLAGS = %{CFLAGS} | |
46 | export HOST_LDFLAGS = %{LDFLAGS} | |
47 | ||
48 | platforms = efi | |
49 | ||
50 | if "%{DISTRO_PLATFORM}" == "x86" | |
51 | platforms += pc | |
52 | end | |
53 | ||
dc22ea77 | 54 | prepare_cmds |
b581cb22 | 55 | PYTHON=%{python3} ./autogen.sh |
72471688 MT |
56 | |
57 | for platform in %{platforms}; do | |
58 | cp -r %{DIR_APP} %{DIR_APP}-${platform} | |
59 | done | |
dc22ea77 MT |
60 | end |
61 | ||
5218f081 MT |
62 | # As the modules contain always 32 bit code, they |
63 | # should be living in /usr/lib. | |
64 | libdir = %{prefix}/lib | |
65 | ||
72471688 MT |
66 | build |
67 | for platform in %{platforms}; do | |
68 | pushd %{DIR_APP}-${platform} | |
69 | ./configure \ | |
70 | %{configure_options} \ | |
71 | --with-platform=${platform} \ | |
72 | --disable-werror \ | |
73 | CFLAGS= LDFLAGS= | |
74 | ||
75 | make %{PARALLELISMFLAGS} | |
76 | popd | |
77 | done | |
78 | end | |
79 | ||
80 | install | |
81 | for platform in %{platforms}; do | |
82 | pushd %{DIR_APP}-${platform} | |
83 | make install DESTDIR=%{BUILDROOT} | |
84 | popd | |
85 | done | |
86 | ||
2af18b56 | 87 | # Install empty configuration file. |
ec89cb13 | 88 | mkdir -pv %{BUILDROOT}/boot/grub |
2af18b56 | 89 | touch %{BUILDROOT}/boot/grub/grub.cfg |
ec89cb13 | 90 | ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg |
bc7a5ea8 MT |
91 | |
92 | # Don't ship the default theme, replace it by our own one. | |
93 | rm -rfv %{BUILDROOT}/boot/grub/themes/starfield \ | |
94 | %{datadir}/grub/themes | |
95 | mkdir -pv %{BUILDROOT}/boot/grub/themes/system | |
96 | cp -rfv %{DIR_SOURCE}/theme/* \ | |
97 | %{BUILDROOT}/boot/grub/themes/system/ | |
98 | ||
99 | # Prepare the fonts. | |
100 | mkdir -pv %{BUILDROOT}/boot/grub/themes/system | |
101 | pushd %{BUILDROOT}/boot/grub/themes/system/ | |
102 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-10.pf2 -s 10 \ | |
103 | %{datadir}/fonts/dejavu/DejaVuSans.ttf | |
104 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-12.pf2 -s 12 \ | |
105 | %{datadir}/fonts/dejavu/DejaVuSans.ttf | |
106 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-Bold-14.pf2 \ | |
107 | -s 14 %{datadir}/fonts/dejavu/DejaVuSans-Bold.ttf | |
108 | popd | |
802ea3af MT |
109 | end |
110 | end | |
111 | ||
802ea3af MT |
112 | packages |
113 | package %{name} | |
114 | requires | |
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 |