]>
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 PM |
7 | version = 2.06 |
8 | release = 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 | 27 | |
bc7a5ea8 MT |
28 | # Unifont |
29 | unifont = /usr/share/X11/fonts/misc/unifont.pcf.gz | |
30 | ||
802ea3af MT |
31 | build |
32 | requires | |
33 | autoconf | |
dc22ea77 | 34 | autogen |
802ea3af MT |
35 | automake |
36 | bison | |
ec89cb13 | 37 | bzip2-devel |
0f28973c | 38 | debugedit >= 5.3.5-2 |
bc7a5ea8 | 39 | dejavu-fonts-sans-fonts |
802ea3af MT |
40 | flex |
41 | freetype-devel | |
42 | gettext | |
ee425925 | 43 | gettext-devel |
dc22ea77 | 44 | libdevmapper-devel |
802ea3af | 45 | ncurses-devel |
802ea3af | 46 | zlib-devel |
bc7a5ea8 | 47 | %{unifont} |
802ea3af MT |
48 | end |
49 | ||
72471688 MT |
50 | # Don't leak our CFLAGS to boot code |
51 | export HOST_CFLAGS = %{CFLAGS} | |
52 | export HOST_LDFLAGS = %{LDFLAGS} | |
53 | ||
54 | platforms = efi | |
55 | ||
56 | if "%{DISTRO_PLATFORM}" == "x86" | |
57 | platforms += pc | |
58 | end | |
59 | ||
dc22ea77 | 60 | prepare_cmds |
bc7a5ea8 MT |
61 | cp -vf %{unifont} unifont.pcf.gz |
62 | ./autogen.sh | |
72471688 MT |
63 | |
64 | for platform in %{platforms}; do | |
65 | cp -r %{DIR_APP} %{DIR_APP}-${platform} | |
66 | done | |
dc22ea77 MT |
67 | end |
68 | ||
5218f081 MT |
69 | # As the modules contain always 32 bit code, they |
70 | # should be living in /usr/lib. | |
71 | libdir = %{prefix}/lib | |
72 | ||
72471688 MT |
73 | build |
74 | for platform in %{platforms}; do | |
75 | pushd %{DIR_APP}-${platform} | |
76 | ./configure \ | |
77 | %{configure_options} \ | |
78 | --with-platform=${platform} \ | |
79 | --disable-werror \ | |
80 | CFLAGS= LDFLAGS= | |
81 | ||
82 | make %{PARALLELISMFLAGS} | |
83 | popd | |
84 | done | |
85 | end | |
86 | ||
87 | install | |
88 | for platform in %{platforms}; do | |
89 | pushd %{DIR_APP}-${platform} | |
90 | make install DESTDIR=%{BUILDROOT} | |
91 | popd | |
92 | done | |
93 | ||
2af18b56 | 94 | # Install empty configuration file. |
ec89cb13 | 95 | mkdir -pv %{BUILDROOT}/boot/grub |
2af18b56 | 96 | touch %{BUILDROOT}/boot/grub/grub.cfg |
ec89cb13 | 97 | ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg |
bc7a5ea8 MT |
98 | |
99 | # Don't ship the default theme, replace it by our own one. | |
100 | rm -rfv %{BUILDROOT}/boot/grub/themes/starfield \ | |
101 | %{datadir}/grub/themes | |
102 | mkdir -pv %{BUILDROOT}/boot/grub/themes/system | |
103 | cp -rfv %{DIR_SOURCE}/theme/* \ | |
104 | %{BUILDROOT}/boot/grub/themes/system/ | |
105 | ||
106 | # Prepare the fonts. | |
107 | mkdir -pv %{BUILDROOT}/boot/grub/themes/system | |
108 | pushd %{BUILDROOT}/boot/grub/themes/system/ | |
109 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-10.pf2 -s 10 \ | |
110 | %{datadir}/fonts/dejavu/DejaVuSans.ttf | |
111 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-12.pf2 -s 12 \ | |
112 | %{datadir}/fonts/dejavu/DejaVuSans.ttf | |
113 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-Bold-14.pf2 \ | |
114 | -s 14 %{datadir}/fonts/dejavu/DejaVuSans-Bold.ttf | |
115 | popd | |
802ea3af | 116 | end |
ec89cb13 MT |
117 | |
118 | debuginfo_strict_build_id = false | |
802ea3af MT |
119 | end |
120 | ||
802ea3af MT |
121 | packages |
122 | package %{name} | |
123 | requires | |
124 | gettext | |
bc7a5ea8 | 125 | system-logos >= 2 |
47bdaf55 MT |
126 | end |
127 | ||
ed1822cd MT |
128 | # An EFI version of grub does not exist any more. |
129 | obsoletes | |
130 | grub-efi <= 2.0.0-2 | |
2af18b56 | 131 | end |
dc22ea77 MT |
132 | |
133 | configfiles | |
ed1822cd MT |
134 | /boot/grub/grub.cfg |
135 | /etc/default/grub | |
802ea3af MT |
136 | end |
137 | end | |
1f9bc2f0 MT |
138 | |
139 | package %{name}-debuginfo | |
140 | template DEBUGINFO | |
141 | end | |
802ea3af | 142 | end |