]>
Commit | Line | Data |
---|---|---|
f6e0d133 | 1 | # |
90feddde | 2 | # Conditional build: |
f6e0d133 | 3 | %bcond_with static # build static binaries |
797addca | 4 | %bcond_without grubemu # build grub-emu binary |
f6e0d133 | 5 | # |
afe8504a | 6 | Summary: GRand Unified Bootloader |
c8155f7f ER |
7 | Summary(de.UTF-8): GRUB2 - ein Bootloader für x86 und ppc |
8 | Summary(pl.UTF-8): GRUB2 - bootloader dla x86 i ppc | |
9 | Summary(pt_BR.UTF-8): Gerenciador de inicialização GRUB2 | |
afe8504a | 10 | Name: grub2 |
ffcf4a1e | 11 | Version: 1.97.2 |
449dde54 | 12 | Release: 2 |
2e4bec6f | 13 | License: GPL v2 |
afe8504a | 14 | Group: Base |
aafbee50 | 15 | Source0: http://alpha.gnu.org/gnu/grub/grub-%{version}.tar.gz |
ffcf4a1e | 16 | # Source0-md5: db4d23fb8897523a7e484e974ae3d1c9 |
22909ca1 ER |
17 | Source1: update-grub |
18 | Source2: update-grub.8 | |
b46589aa | 19 | Source3: grub.sysconfig |
e2964b87 | 20 | Source4: grub-custom.cfg |
5ed6d4ac | 21 | URL: http://www.gnu.org/software/grub/grub-2.en.html |
0fb8b1a5 | 22 | BuildRequires: autoconf >= 2.53 |
5028d8c9 | 23 | Patch0: pld-initrd.patch |
b46589aa | 24 | Patch1: pld-sysconfdir.patch |
872700b0 | 25 | Patch2: grub-garbage.patch |
78785d3a | 26 | Patch3: grub-shelllib.patch |
aec70abd | 27 | Patch4: grub-install.in.patch |
f7ae30d0 | 28 | Patch5: grub-lvmdevice.patch |
e2964b87 | 29 | Patch6: pld-mkconfigdir.patch |
449dde54 | 30 | Patch7: grub-mkconfig-diagnostics.patch |
dad1e8fe | 31 | BuildRequires: automake |
8b781299 | 32 | BuildRequires: bison |
12fd19f5 | 33 | BuildRequires: gawk |
1349ebb8 | 34 | BuildRequires: help2man |
afe8504a | 35 | BuildRequires: libtool |
81a7e0ba | 36 | BuildRequires: texinfo |
403e7b01 | 37 | %ifarch %{ix86} %{x8664} |
afe8504a | 38 | BuildRequires: lzo-devel >= 1.0.2 |
67873cc1 | 39 | %endif |
c668211a ER |
40 | %ifarch %{x8664} |
41 | BuildRequires: /usr/lib/libc.so | |
8905dae4 ER |
42 | %if "%{pld_release}" == "ac" |
43 | BuildRequires: libgcc32 | |
44 | %else | |
797addca | 45 | BuildRequires: gcc-multilib |
c668211a | 46 | %endif |
8905dae4 | 47 | %endif |
afe8504a | 48 | BuildRequires: ncurses-devel |
67873cc1 | 49 | BuildRequires: sed >= 4.0 |
6b675158 | 50 | %if %{with static} |
51 | BuildRequires: glibc-static | |
403e7b01 | 52 | %ifarch %{ix86} %{x8664} |
6b675158 | 53 | BuildRequires: lzo-static |
ec6cec95 | 54 | %endif |
6b675158 | 55 | BuildRequires: ncurses-static |
56 | %endif | |
8905dae4 | 57 | BuildRequires: rpm >= 4.4.9-56 |
403e7b01 | 58 | BuildRequires: rpmbuild(macros) >= 1.213 |
afe8504a | 59 | Provides: bootloader |
fc835b5e | 60 | Conflicts: grub |
58a823d7 | 61 | ExclusiveArch: %{ix86} %{x8664} ppc sparc64 |
afe8504a SP |
62 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
63 | ||
64 | %define _sbindir /sbin | |
4a00f3b7 | 65 | %define _bindir %{_sbindir} |
afe8504a | 66 | %define _libdir /boot |
26e757db | 67 | %define _libexecdir %{_libdir}/grub |
9d44d75e | 68 | |
afe8504a SP |
69 | %description |
70 | GRUB is a GPLed bootloader intended to unify bootloading across x86 | |
71 | operating systems. In addition to loading the Linux and *BSD kernels, | |
72 | it implements the Multiboot standard, which allows for flexible | |
73 | loading of multiple boot images (needed for modular kernels such as | |
74 | the GNU Hurd). | |
75 | ||
211df1ed ER |
76 | GRUB 2 is derived from PUPA which was a research project to |
77 | investigate the next generation of GRUB. GRUB 2 has been rewritten | |
78 | from scratch to clean up everything for modularity and portability. | |
79 | ||
80 | GRUB 2 targets at the following goals: | |
81 | - Scripting support, such as conditionals, loops, variables and | |
82 | functions. | |
83 | - Graphical interface. | |
84 | - Dynamic loading of modules in order to extend itself at the run time | |
85 | rather than at the build time. | |
86 | - Portability for various architectures. | |
87 | - Internationalization. This includes support for non-ASCII character | |
88 | code, message catalogs like gettext, fonts, graphics console, and so | |
89 | on. | |
90 | - Real memory management, to make GNU GRUB more extensible. | |
91 | - Modular, hierarchical, object-oriented framework for file systems, | |
92 | files, devices, drives, terminals, commands, partition tables and OS | |
93 | loaders. | |
94 | - Cross-platform installation which allows for installing GRUB from a | |
95 | different architecture. | |
96 | - Rescue mode saves unbootable cases. Stage 1.5 was eliminated. | |
97 | - Fix design mistakes in GRUB Legacy, which could not be solved for | |
98 | backward-compatibility, such as the way of numbering partitions. | |
99 | ||
6b0aefbf | 100 | %description -l de.UTF-8 |
afe8504a SP |
101 | GRUB (GRand Unified Boot-loader) ist ein Bootloader, der oft auf |
102 | Rechnern eingesetzt wird, auf denen das freie Betriebssystem Linux | |
6b0aefbf | 103 | läuft. GRUB löst den betagten LILO (Linux-Loader) ab. |
afe8504a SP |
104 | |
105 | GRUB wurde innerhalb des GNU Hurd-Projektes als Boot-Loader entwickelt | |
6b0aefbf JR |
106 | und wird unter der GPL vertrieben. Aufgrund seiner höheren |
107 | Flexibilität verdrängt GRUB in vielen Linux-Distributionen den | |
afe8504a SP |
108 | traditionellen Boot-Loader LILO. |
109 | ||
6b0aefbf JR |
110 | %description -l es.UTF-8 |
111 | Éste es GRUB - Grand Unified Boot Loader - un administrador de | |
112 | inicialización capaz de entrar en la mayoría de los sistemas | |
afe8504a | 113 | operacionales libres - Linux, FreeBSD, NetBSD, GNU Mach, etc. como |
6b0aefbf | 114 | también en la mayoría de los sistemas operacionales comerciales para |
afe8504a SP |
115 | PC. |
116 | ||
117 | El administrador GRUB puede ser una buena alternativa a LILO, para | |
6b0aefbf JR |
118 | usuarios conmás experiencia y que deseen obtener más recursos de su |
119 | cargador de inicialización (boot loader). | |
afe8504a | 120 | |
6b0aefbf JR |
121 | %description -l pl.UTF-8 |
122 | GRUB jest bootloaderem na licencji GNU, mającym na celu unifikację | |
123 | procesu bootowania na systemach x86. Potrafi nie tylko ładować jądra | |
124 | Linuksa i *BSD: posiada również implementacje standardu Multiboot, | |
125 | który pozwala na elastyczne ładowanie wielu obrazów bootowalnych | |
126 | (czego wymagają modułowe jądra, takie jak GNU Hurd). | |
afe8504a | 127 | |
6b0aefbf JR |
128 | %description -l pt_BR.UTF-8 |
129 | Esse é o GRUB - Grand Unified Boot Loader - um gerenciador de boot | |
afe8504a SP |
130 | capaz de entrar na maioria dos sistemas operacionais livres - Linux, |
131 | FreeBSD, NetBSD, GNU Mach, etc. assim como na maioria dos sistemas | |
132 | operacionais comerciais para PC. | |
133 | ||
6b0aefbf JR |
134 | O GRUB pode ser uma boa alternativa ao LILO, para usuários mais |
135 | avançados e que querem mais recursos de seu boot loader. | |
afe8504a | 136 | |
afe8504a | 137 | %prep |
aafbee50 | 138 | %setup -q -n grub-%{version} |
5028d8c9 | 139 | %patch0 -p1 |
b46589aa | 140 | %patch1 -p1 |
872700b0 | 141 | %patch2 -p1 |
78785d3a | 142 | %patch3 -p1 |
aec70abd | 143 | %patch4 -p1 |
f7ae30d0 | 144 | %patch5 -p1 |
e2964b87 | 145 | %patch6 -p1 |
449dde54 | 146 | %patch7 -p1 |
afe8504a SP |
147 | |
148 | %build | |
3ff87e8a | 149 | cp -f /usr/share/automake/config.sub . |
afe8504a SP |
150 | %{__libtoolize} |
151 | %{__aclocal} | |
152 | %{__autoheader} | |
b1a4846d | 153 | echo timestamp > stamp-h.in |
afe8504a | 154 | %{__autoconf} |
12fd19f5 ER |
155 | export CFLAGS="-Os %{?debug:-g}" |
156 | ||
157 | # mawk stalls at ./genmoddep.awk, so force gawk | |
158 | AWK=gawk \ | |
afe8504a | 159 | %configure \ |
c09e92cc | 160 | %{?with_grubemu:--enable-grub-emu} \ |
0fb8b1a5 | 161 | BUILD_CFLAGS="$CFLAGS" |
12fd19f5 | 162 | %{__make} -j1 \ |
2e4bec6f | 163 | BUILD_CFLAGS="$CFLAGS" \ |
dfbeab3a | 164 | %if %{with static} |
403e7b01 | 165 | %ifarch %{ix86} %{x8664} |
dfbeab3a | 166 | grub_setup_LDFLAGS="-s -static" \ |
167 | grub_mkimage_LDFLAGS="-s -static -llzo" \ | |
ec6cec95 | 168 | %else |
169 | grub_mkimage_LDFLAGS="-s -static" \ | |
170 | %endif | |
171 | grub_emu_LDFLAGS="-s -static -lncurses -ltinfo" \ | |
dfbeab3a | 172 | %endif |
aec70abd ER |
173 | pkgdatadir=%{_libexecdir} \ |
174 | pkglibdir=%{_libexecdir} | |
0fb8b1a5 | 175 | |
afe8504a SP |
176 | %install |
177 | rm -rf $RPM_BUILD_ROOT | |
e2964b87 | 178 | install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{_sysconfdir}/grub.d} |
afe8504a SP |
179 | |
180 | %{__make} install \ | |
26e757db | 181 | pkgdatadir=%{_libexecdir} \ |
aec70abd | 182 | pkglibdir=%{_libexecdir} \ |
b46589aa | 183 | DESTDIR=$RPM_BUILD_ROOT |
afe8504a | 184 | |
26e757db | 185 | cp -a docs/grub.cfg $RPM_BUILD_ROOT%{_libexecdir} |
22909ca1 ER |
186 | install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/update-grub |
187 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8/update-grub.8 | |
b46589aa | 188 | cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/grub |
e2964b87 | 189 | cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/grub.d/custom.cfg |
47069130 | 190 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
e2964b87 | 191 | |
26e757db | 192 | # deprecated. we don't need it |
78785d3a ER |
193 | rm $RPM_BUILD_ROOT/lib/update-grub_lib |
194 | ||
195 | # no junk to /boot/grub (put to -devel?) | |
aec70abd ER |
196 | rm $RPM_BUILD_ROOT%{_libexecdir}/*.h |
197 | rm $RPM_BUILD_ROOT%{_libexecdir}/*.mk | |
fa0a01c7 | 198 | |
cbd79801 ER |
199 | # core.img - bootable image generated by grub-mkimage(1) via grub-install(1) |
200 | touch $RPM_BUILD_ROOT%{_libexecdir}/core.img | |
201 | touch $RPM_BUILD_ROOT%{_libexecdir}/device.map | |
202 | ||
afe8504a SP |
203 | %clean |
204 | rm -rf $RPM_BUILD_ROOT | |
205 | ||
5028d8c9 | 206 | %post -p %{_sbindir}/postshell |
fc58858a | 207 | -/usr/sbin/fix-info-dir -c %{_infodir} |
f4604ef8 | 208 | |
5028d8c9 | 209 | %postun -p %{_sbindir}/postshell |
fc58858a | 210 | -/usr/sbin/fix-info-dir -c %{_infodir} |
f4604ef8 | 211 | |
afe8504a SP |
212 | %files |
213 | %defattr(644,root,root,755) | |
2e4bec6f | 214 | %doc AUTHORS ChangeLog NEWS README THANKS TODO |
aec70abd | 215 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/grub |
3ea0c40e | 216 | %attr(755,root,root) %{_sbindir}/grub-fstest |
fc835b5e | 217 | %attr(755,root,root) %{_sbindir}/grub-install |
3ea0c40e | 218 | %attr(755,root,root) %{_sbindir}/grub-mkfont |
797addca | 219 | %attr(755,root,root) %{_sbindir}/grub-mkrescue |
fc835b5e AM |
220 | %attr(755,root,root) %{_sbindir}/grub-editenv |
221 | %attr(755,root,root) %{_sbindir}/grub-mkconfig | |
222 | %attr(755,root,root) %{_sbindir}/grub-mkelfimage | |
22909ca1 | 223 | %attr(755,root,root) %{_sbindir}/update-grub |
76be4c4a AM |
224 | %ifarch %{ix86} %{x8664} |
225 | %attr(755,root,root) %{_sbindir}/grub-mkimage | |
fc835b5e | 226 | %{_mandir}/man1/grub-mkimage.1* |
76be4c4a AM |
227 | %else |
228 | %attr(755,root,root) %{_sbindir}/grub-probe | |
229 | %attr(755,root,root) %{_sbindir}/grub-mkdevicemap | |
230 | %{_mandir}/man8/grub-probe.8* | |
231 | %{_mandir}/man8/grub-mkdevicemap.8* | |
232 | %endif | |
3ea0c40e AM |
233 | %{_mandir}/man1/grub-fstest.1* |
234 | %{_mandir}/man1/grub-mkfont.1* | |
fc835b5e AM |
235 | %{_mandir}/man1/grub-mkrescue.1* |
236 | %{_mandir}/man1/grub-editenv.1* | |
237 | %{_mandir}/man8/grub-mkconfig.8* | |
238 | %{_mandir}/man1/grub-mkelfimage.1* | |
22909ca1 | 239 | %{_mandir}/man8/update-grub.8* |
797addca AF |
240 | %if %{with grubemu} |
241 | %attr(755,root,root) %{_sbindir}/grub-emu | |
fc835b5e | 242 | %{_mandir}/man8/grub-emu.8* |
797addca | 243 | %endif |
aec70abd ER |
244 | /lib/grub-mkconfig_lib |
245 | ||
26e757db | 246 | %dir %{_libexecdir} |
aec70abd ER |
247 | %config(noreplace) %verify(not md5 mtime size) %{_libexecdir}/grub.cfg |
248 | %{_libexecdir}/*.lst | |
249 | %{_libexecdir}/*.mod | |
e214a350 ER |
250 | %ifarch %{x8664} |
251 | %{_libexecdir}/efiemu*.o | |
76be4c4a | 252 | %endif |
aec70abd | 253 | %ifarch %{ix86} %{x8664} sparc sparc64 |
cbd79801 ER |
254 | %{_libexecdir}/boot.img |
255 | %{_libexecdir}/cdboot.img | |
256 | %{_libexecdir}/diskboot.img | |
257 | %{_libexecdir}/kernel.img | |
258 | %{_libexecdir}/lnxboot.img | |
259 | %{_libexecdir}/pxeboot.img | |
76be4c4a | 260 | %endif |
aec70abd | 261 | |
cbd79801 ER |
262 | # generated by grub at runtime |
263 | %ghost %{_libexecdir}/device.map | |
264 | %ghost %{_libexecdir}/core.img | |
265 | ||
e2964b87 ER |
266 | %dir /lib/grub.d |
267 | %doc /lib/grub.d/README | |
268 | %attr(755,root,root) /lib/grub.d/00_header | |
269 | %attr(755,root,root) /lib/grub.d/10_linux | |
270 | %attr(755,root,root) /lib/grub.d/30_os-prober | |
271 | %attr(755,root,root) /lib/grub.d/40_custom | |
272 | ||
273 | %dir %attr(750,root,root) /etc/grub.d | |
274 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/grub.d/custom.cfg | |
aec70abd | 275 | |
1e58ef6c | 276 | %ifarch %{ix86} %{x8664} |
1ffaf1f6 ER |
277 | %attr(755,root,root) %{_sbindir}/grub-mkdevicemap |
278 | %attr(755,root,root) %{_sbindir}/grub-probe | |
279 | %attr(755,root,root) %{_sbindir}/grub-setup | |
fc835b5e AM |
280 | %{_mandir}/man8/grub-mkdevicemap.8* |
281 | %{_mandir}/man8/grub-probe.8* | |
282 | %{_mandir}/man8/grub-setup.8* | |
4a00f3b7 | 283 | %endif |
aec70abd | 284 | |
f4604ef8 | 285 | %{_infodir}/grub*.info* |