]> git.pld-linux.org Git - packages/grub2.git/blob - grub2.spec
up to 2.12
[packages/grub2.git] / grub2.spec
1 # TODO
2 # - reap out which in probe scripts and drop R: which
3 # - subpackages? e.g. modules and utils
4 # - check where is that locale path: /boot/grub/locale and fix it or change it
5 # - grubemu notes
6 #   --enable-grub-emu-usb conflicts with --enable-grub-emu-pci, emu-pci seems experimental
7 #   - to build and install the `grub-emu' debugging utility we need to re-run build with --target=emu
8 #   - put grub-emu to subpackage if it is fixed
9 #
10 # Conditional build:
11 %bcond_with     grubemu         # grub-emu debugging utility
12 %bcond_without  efiemu          # efiemu runtimes (64-bit efiemu on 32-bit boot platform)
13 %bcond_without  unifont         # unifont based fonts
14 %bcond_without  arc             # MIPS ARC platform support
15 %bcond_without  coreboot        # coreboot/linuxbios platform support (x86/arm specific)
16 %bcond_without  efi             # EFI platform support
17 %bcond_without  ieee1275        # ieee1275 platform support (x86/ppc/sparc specific)
18 %bcond_without  loongson        # MIPS loongson platform support (mipsel specific)
19 %bcond_without  multiboot       # multiboot platform support (x86/arm specific)
20 %bcond_without  pc              # PC BIOS platform support (x86 specific)
21 %bcond_without  qemu            # qemu platform support (x86/mips specific)
22 %bcond_without  uboot           # ARM uBoot platform support
23 %bcond_without  xen             # Xen platform support (x86 specific)
24 %bcond_without  xen_pvh         # Xen PVH platform support (x86 specific)
25
26 %ifnarch mips mipsel mips64 mips64el
27 %undefine       with_arc
28 %endif
29 %ifnarch %{ix86} %{x8664} x32 %{arm}
30 %undefine       with_coreboot
31 %endif
32 %ifnarch %{ix86} %{x8664} x32 %{arm} aarch64 ia64
33 %undefine       with_efi
34 %endif
35 %ifnarch %{ix86} %{x8664} x32 ppc ppc64 sparc64
36 %undefine       with_ieee1275
37 %endif
38 %ifnarch mipsel mips64el
39 %undefine       with_loongson
40 %endif
41 %ifnarch %{ix86} %{x8664} x32
42 %undefine       with_multiboot
43 %undefine       with_pc
44 %undefine       with_xen
45 %undefine       with_xen_pvh
46 %endif
47 %ifnarch %{ix86} mips mipsel mips64 mips64el
48 %undefine       with_qemu
49 %endif
50 %ifnarch %{arm}
51 %undefine       with_uboot
52 %endif
53
54 # FIXME: x86_64-xen build is broken (as of 2.06)
55 %ifarch %{x8664} x32
56 %undefine       with_xen
57 %endif
58
59 # these require unifont
60 %if %{without unifont}
61 %undefine       with_coreboot
62 %undefine       with_loongson
63 %undefine       with_qemu
64 %endif
65
66 %ifnarch %{x8664} x32
67 # non-x86_64 arch doesn't support this
68 %undefine       with_efiemu
69 %endif
70
71 # the 'most natural' platform should go last
72 %ifarch %{ix86} %{x8664} x32
73 %define         platforms %{?with_coreboot:coreboot} %{?with_ieee1275:ieee1275} %{?with_multiboot:multiboot} %{?with_qemu:qemu} %{?with_xen:xen} %{?with_xen_pvh:xen_pvh} %{?with_efi:efi} %{?with_pc:pc}
74 %endif
75 %ifarch %{arm}
76 %define         platforms %{?with_efi:efi} %{?with_uboot:uboot}
77 %endif
78 %ifarch aarch64 ia64 riscv32 riscv64
79 %define         platforms efi
80 %endif
81 %ifarch mips mips64
82 %define         platforms arc
83 %endif
84 %ifarch mipsel mips64el
85 %define         platforms %{?with_arc:arc} %{?with_loongson:loongson}
86 %endif
87 %ifarch ppc ppc64 sparc64
88 %define         platforms ieee1275
89 %endif
90
91 %ifarch %{ix86}
92 %define coreboot_arch   i386
93 %define efi_arch        i386
94 %define ieee1275_arch   i386
95 %define qemu_arch       i386
96 %define qemu_plat       qemu
97 %define xen_arch        i386
98 %endif
99 %ifarch %{x8664} x32
100 %define coreboot_arch   i386
101 %define efi_arch        x86_64
102 %define ieee1275_arch   i386
103 %define qemu_arch       i386
104 %define qemu_plat       qemu
105 %define xen_arch        x86_64
106 %endif
107 %ifarch %{arm}
108 %define coreboot_arch   arm
109 %define efi_arch        arm
110 %endif
111 %ifarch aarch64
112 %define efi_arch        arm64
113 %endif
114 %ifarch ia64
115 %define efi_arch        ia64
116 %endif
117 %ifarch mips mips64
118 %define arc_arch        mips
119 %define qemu_arch       mips
120 %define qemu_plat       qemu_mips
121 %endif
122 %ifarch mipsel mips64el
123 %define arc_arch        mipsel
124 %define qemu_arch       mipsel
125 %define qemu_plat       qemu_mips
126 %endif
127 %ifarch ppc ppc64
128 %define ieee1275_arch   powerpc
129 %endif
130 %ifarch riscv32
131 %define efi_arch        riscv32
132 %endif
133 %ifarch riscv64
134 %define efi_arch        riscv64
135 %endif
136 %ifarch sparc64
137 %define ieee1275_arch   sparc64
138 %endif
139
140 Summary:        GRand Unified Bootloader
141 Summary(de.UTF-8):      GRUB2 - ein Bootloader für x86 und ppc
142 Summary(hu.UTF-8):      GRUB2 - rendszerbetöltő x86 és ppc gépekhez
143 Summary(pl.UTF-8):      GRUB2 - bootloader dla x86 i ppc
144 Summary(pt_BR.UTF-8):   Gerenciador de inicialização GRUB2
145 Name:           grub2
146 Version:        2.06
147 Release:        1
148 License:        GPL v2
149 Group:          Base
150 Source0:        https://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz
151 # Source0-md5:  cf0fd928b1e5479c8108ee52cb114363
152 Source1:        update-grub
153 Source2:        update-grub.8
154 Source3:        grub.sysconfig
155 Source4:        grub-custom.cfg
156 Patch1:         pld-sysconfdir.patch
157 Patch2:         grub-garbage.patch
158 Patch3:         grub-lvmdevice.patch
159 Patch4:         pld-mkconfigdir.patch
160 Patch5:         grub-mkconfig-diagnostics.patch
161 Patch6:         posix.patch
162 Patch7:         %{name}-fonts_path.patch
163 Patch9:         just-say-linux.patch
164 Patch10:        ignore-kernel-symlinks.patch
165 Patch11:        choose-preferred-initrd.patch
166 Patch12:        %{name}-cfg.patch
167 Patch13:        efi-net-fix.patch
168 Patch14:        blscfg.patch
169 URL:            http://www.gnu.org/software/grub/
170 BuildRequires:  autoconf >= 2.63
171 BuildRequires:  automake >= 1:1.11.1-1
172 BuildRequires:  bison >= 2.3
173 BuildRequires:  device-mapper-devel >= 1.02.34
174 BuildRequires:  flex >= 2.5.35
175 BuildRequires:  fonts-TTF-DejaVu
176 %if %{with unifont}
177 BuildRequires:  fonts-misc-unifont
178 %endif
179 BuildRequires:  freetype-devel >= 2.1.5
180 BuildRequires:  gawk
181 BuildRequires:  gcc >= 6:5.1
182 %ifarch %{x8664} x32
183 %if %{with efiemu} || %{with coreboot} || %{with ieee1275} || %{with multiboot} || %{with pc} || %{with xen_pvh}
184 BuildRequires:  gcc-multilib-32 >= 6:5.1
185 %endif
186 %endif
187 %ifarch x32
188 %if %{with efiemu} || %{with efi}
189 BuildRequires:  gcc-multilib-64 >= 6:5.1
190 %endif
191 %endif
192 BuildRequires:  gettext-tools >= 0.18.3
193 BuildRequires:  glibc-localedb-all
194 BuildRequires:  glibc-static
195 BuildRequires:  help2man
196 BuildRequires:  libfuse-devel
197 BuildRequires:  libtool
198 BuildRequires:  ncurses-devel
199 BuildRequires:  pkgconfig
200 BuildRequires:  python >= 1:2.6
201 BuildRequires:  python-modules >= 1:2.6
202 BuildRequires:  rpm >= 4.4.9-56
203 BuildRequires:  rpm-build >= 4.6
204 BuildRequires:  rpmbuild(macros) >= 1.213
205 BuildRequires:  sed >= 4.0
206 BuildRequires:  tar >= 1:1.22
207 BuildRequires:  texinfo
208 BuildRequires:  xz
209 BuildRequires:  xz-devel
210 Requires:       %{name}-platform = %{version}-%{release}
211 Requires:       pld-release
212 Requires:       which
213 %ifarch %{ix86} %{x8664} x32
214 Suggests:       %{name}-platform-pc
215 %endif
216 Suggests:       cdrkit-mkisofs
217 Suggests:       os-prober
218 Provides:       bootloader
219 Conflicts:      grub
220 ExclusiveArch:  %{ix86} %{x8664} x32 %{arm} aarch64 ia64 mips mipsel mips64 mips64el ppc ppc64 riscv32 riscv64 sparc64
221 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
222
223 %define         _sbindir        /sbin
224 %define         _bindir         %{_sbindir}
225 %define         _libdir         /lib
226 %define         _datadir        %{_libdir}
227 %define         _libexecdir     %{_libdir}/grub
228 %define         _grubdir        /boot/grub
229 %define         _localedir      /usr/share/locale
230
231 # part of grub code is not relocable (these are not Linux libs)
232 # stack protector also breaks non-Linux binaries
233 # any kind of forced optimizations makes grub2 unreliable (random
234 # reboots and hangs on boot menu screen)
235 %define         filterout_c     -fPIC -O.
236 %undefine       _ssp_cflags
237 %undefine       _fortify_cflags
238
239 %description
240 GRUB is a GPLed bootloader intended to unify bootloading across x86
241 operating systems. In addition to loading the Linux and *BSD kernels,
242 it implements the Multiboot standard, which allows for flexible
243 loading of multiple boot images (needed for modular kernels such as
244 the GNU Hurd).
245
246 GRUB 2 is derived from PUPA which was a research project to
247 investigate the next generation of GRUB. GRUB 2 has been rewritten
248 from scratch to clean up everything for modularity and portability.
249
250 GRUB 2 targets at the following goals:
251 - Scripting support, such as conditionals, loops, variables and
252   functions.
253 - Graphical interface.
254 - Dynamic loading of modules in order to extend itself at the run time
255   rather than at the build time.
256 - Portability for various architectures.
257 - Internationalization. This includes support for non-ASCII character
258   code, message catalogs like gettext, fonts, graphics console, and so
259   on.
260 - Real memory management, to make GNU GRUB more extensible.
261 - Modular, hierarchical, object-oriented framework for file systems,
262   files, devices, drives, terminals, commands, partition tables and OS
263   loaders.
264 - Cross-platform installation which allows for installing GRUB from a
265   different architecture.
266 - Rescue mode saves unbootable cases. Stage 1.5 was eliminated.
267 - Fix design mistakes in GRUB Legacy, which could not be solved for
268   backward-compatibility, such as the way of numbering partitions.
269
270 %description -l de.UTF-8
271 GRUB (GRand Unified Boot-loader) ist ein Bootloader, der oft auf
272 Rechnern eingesetzt wird, auf denen das freie Betriebssystem Linux
273 läuft. GRUB löst den betagten LILO (Linux-Loader) ab.
274
275 GRUB wurde innerhalb des GNU Hurd-Projektes als Boot-Loader entwickelt
276 und wird unter der GPL vertrieben. Aufgrund seiner höheren
277 Flexibilität verdrängt GRUB in vielen Linux-Distributionen den
278 traditionellen Boot-Loader LILO.
279
280 %description -l hu.UTF-8
281 GRUB egy GPL liszenszű rendszerbetöltő. Linux és *BSD kernelek
282 betöltése mellett támogatja a Multiboot standard-ot, amely lehetővé
283 teszi boot képek betöltését (moduláris kerneleknek kell, mint pl. a
284 GNU Hurd).
285
286 GRUB2 céljai a következők:
287 - szkriptelés támogatása, úgymint feltételek, ciklusok, változók,
288   függvények.
289 - grafikus felület
290 - modulok dinamikus betöltése futási időben
291 - hordozhatóság több architektúrára
292 - többnyelvűség: nem-ASCII karakterek támogatása, üzenetkatalógusok,
293   mint gettext, betűtípusok, grafikus konzolon, és így tovább
294 - valós memória kezelés, amellyel még bővíthetőbbé tehetjük
295 - moduláris, hierarchikus, objektum-orientált keretrendszer
296   fájlrendszerekhez, fájlokhoz, eszközökhöz, meghajtókhoz,
297   terminálokhoz, parancsokhoz, partíciós táblákhoz és OS betöltőkhöz
298
299 %description -l es.UTF-8
300 Éste es GRUB - Grand Unified Boot Loader - un administrador de
301 inicialización capaz de entrar en la mayoría de los sistemas
302 operacionales libres - Linux, FreeBSD, NetBSD, GNU Mach, etc. como
303 también en la mayoría de los sistemas operacionales comerciales para
304 PC.
305
306 El administrador GRUB puede ser una buena alternativa a LILO, para
307 usuarios conmás experiencia y que deseen obtener más recursos de su
308 cargador de inicialización (boot loader).
309
310 %description -l pl.UTF-8
311 GRUB jest bootloaderem na licencji GNU GPL, mającym na celu unifikację
312 procesu bootowania na systemach x86. Potrafi nie tylko ładować jądra
313 Linuksa i *BSD: posiada również implementację standardu Multiboot,
314 który pozwala na elastyczne ładowanie wielu obrazów bootowalnych
315 (czego wymagają modułowe jądra, takie jak GNU Hurd).
316
317 %description -l pt_BR.UTF-8
318 Esse é o GRUB - Grand Unified Boot Loader - um gerenciador de boot
319 capaz de entrar na maioria dos sistemas operacionais livres - Linux,
320 FreeBSD, NetBSD, GNU Mach, etc. assim como na maioria dos sistemas
321 operacionais comerciais para PC.
322
323 O GRUB pode ser uma boa alternativa ao LILO, para usuários mais
324 avançados e que querem mais recursos de seu boot loader.
325
326 %package -n bash-completion-%{name}
327 Summary:        bash-completion for GRUB
328 Summary(pl.UTF-8):      Bashowe uzupełnianie nazw dla GRUB-a
329 Group:          Applications/Shells
330 Requires:       %{name} = %{version}-%{release}
331 Requires:       bash-completion
332 BuildArch:      noarch
333
334 %description -n bash-completion-%{name}
335 This package provides bash-completion for GRUB.
336
337 %description -n bash-completion-%{name} -l pl.UTF-8
338 Pakiet ten dostarcza bashowe uzupełnianie nazw dla GRUB-a.
339
340 %package fonts
341 Summary:        Fonts for GRUB
342 Summary(pl.UTF-8):      Fonty dla GRUB-a
343 Group:          Base
344 Requires:       %{name} = %{version}-%{release}
345
346 %description fonts
347 Fonts for GRUB.
348
349 %description fonts -l pl.UTF-8
350 Fonty dla GRUB-a.
351
352 %package platform-arc
353 Summary:        MIPS ARC platform support for GRUB
354 Summary(pl.UTF-8):      Obsługa platformy MIPS ARC dla GRUB-a
355 Group:          Base
356 Requires:       %{name} = %{version}-%{release}
357 Provides:       %{name}-platform = %{version}-%{release}
358
359 %description platform-arc
360 MIPS ARC platform support for GRUB.
361
362 %description platform-arc -l pl.UTF-8
363 Obsługa platformy MIPS ARC dla GRUB-a.
364
365 %package platform-coreboot
366 Summary:        Coreboot (LinuxBIOS) platform support for GRUB
367 Summary(pl.UTF-8):      Obsługa platformy Coreboot (LinuxBIOS) dla GRUB-a
368 Group:          Base
369 Requires:       %{name} = %{version}-%{release}
370 Requires:       %{name}-fonts = %{version}-%{release}
371 Provides:       %{name}-platform = %{version}-%{release}
372
373 %description platform-coreboot
374 Coreboot (LinuxBIOS) platform support for GRUB.
375
376 %description platform-coreboot -l pl.UTF-8
377 Obsługa platformy Coreboot (LinuxBIOS) dla GRUB-a.
378
379 %package platform-efi
380 Summary:        (U)EFI platform support for GRUB
381 Summary(pl.UTF-8):      Obsługa platformy (U)EFI dla GRUB-a
382 Group:          Base
383 Requires:       %{name} = %{version}-%{release}
384 Suggests:       efibootmgr
385 Provides:       %{name}-platform = %{version}-%{release}
386
387 %description platform-efi
388 (U)EFI platform support for GRUB.
389
390 %description platform-efi -l pl.UTF-8
391 Obsługa platformy (U)EFI dla GRUB-a.
392
393 %package platform-ieee1275
394 Summary:        IEEE 1275 (OpenFirmware) platform support for GRUB
395 Summary(pl.UTF-8):      Obsługa platformy IEEE 1275 (OpenFirmware) dla GRUB-a
396 Group:          Base
397 Requires:       %{name} = %{version}-%{release}
398 Provides:       %{name}-platform = %{version}-%{release}
399
400 %description platform-ieee1275
401 IEEE 1275 (OpenFirmware) platform support for GRUB.
402
403 %description platform-ieee1275 -l pl.UTF-8
404 Obsługa platformy IEEE 1275 (OpenFirmware) dla GRUB-a.
405
406 %package platform-loongson
407 Summary:        MIPS Loongson platform support for GRUB
408 Summary(pl.UTF-8):      Obsługa platformy MIPS Loongson dla GRUB-a
409 Group:          Base
410 Requires:       %{name} = %{version}-%{release}
411 Requires:       %{name}-fonts = %{version}-%{release}
412 Provides:       %{name}-platform = %{version}-%{release}
413
414 %description platform-loongson
415 MIPS Loongson (yeelong, fuloong) platform support for GRUB.
416
417 %description platform-loongson -l pl.UTF-8
418 Obsługa platformy MIPS Loongson (yeelong, fuloong) dla GRUB-a.
419
420 %package platform-multiboot
421 Summary:        Multiboot platform support for GRUB
422 Summary(pl.UTF-8):      Obsługa platformy Multiboot dla GRUB-a
423 Group:          Base
424 Requires:       %{name} = %{version}-%{release}
425 Provides:       %{name}-platform = %{version}-%{release}
426
427 %description platform-multiboot
428 Multiboot platform support for GRUB.
429
430 %description platform-multiboot -l pl.UTF-8
431 Obsługa platformy Multiboot dla GRUB-a.
432
433 %package platform-pc
434 Summary:        PC BIOS platform support for GRUB
435 Summary(pl.UTF-8):      Obsługa platformy PC BIOS dla GRUB-a
436 Group:          Base
437 Requires:       %{name} = %{version}-%{release}
438 Provides:       %{name}-platform = %{version}-%{release}
439
440 %description platform-pc
441 PC BIOS platform support for GRUB.
442
443 %description platform-pc -l pl.UTF-8
444 Obsługa platformy PC BIOS dla GRUB-a.
445
446 %package platform-qemu
447 Summary:        Qemu platform support for GRUB
448 Summary(pl.UTF-8):      Obsługa platformy Qemu dla GRUB-a
449 Group:          Base
450 Requires:       %{name} = %{version}-%{release}
451 Requires:       %{name}-fonts = %{version}-%{release}
452 Provides:       %{name}-platform = %{version}-%{release}
453
454 %description platform-qemu
455 Qemu platform support for GRUB.
456
457 %description platform-qemu -l pl.UTF-8
458 Obsługa platformy Qemu dla GRUB-a.
459
460 %package platform-uboot
461 Summary:        ARM uBoot platform support for GRUB
462 Summary(pl.UTF-8):      Obsługa platformy ARM uBoot dla GRUB-a
463 Group:          Base
464 Requires:       %{name} = %{version}-%{release}
465 Provides:       %{name}-platform = %{version}-%{release}
466
467 %description platform-uboot
468 ARM uBoot platform support for GRUB.
469
470 %description platform-uboot -l pl.UTF-8
471 Obsługa platformy ARM uBoot dla GRUB-a.
472
473 %package platform-xen
474 Summary:        Xen platform support for GRUB
475 Summary(pl.UTF-8):      Obsługa platformy Xen dla GRUB-a
476 Group:          Base
477 Requires:       %{name} = %{version}-%{release}
478 Provides:       %{name}-platform = %{version}-%{release}
479
480 %description platform-xen
481 Xen platform support for GRUB.
482
483 %description platform-xen -l pl.UTF-8
484 Obsługa platformy Xen dla GRUB-a.
485
486 %package platform-xen_pvh
487 Summary:        Xen PVH platform support for GRUB
488 Summary(pl.UTF-8):      Obsługa platformy Xen PVH dla GRUB-a
489 Group:          Base
490 Requires:       %{name} = %{version}-%{release}
491 Provides:       %{name}-platform = %{version}-%{release}
492
493 %description platform-xen_pvh
494 Xen PVH platform support for GRUB.
495
496 %description platform-xen_pvh -l pl.UTF-8
497 Obsługa platformy Xen PVH dla GRUB-a.
498
499 %package mkfont
500 Summary:        GRUB font files converter
501 Summary(pl.UTF-8):      Konwerter plików fontów GRUB-a
502 Group:          Base
503
504 %description mkfont
505 Converts common font file formats into PF2.
506
507 %description mkfont -l pl.UTF-8
508 Program do konwersji popularnych formatów plików fontów do PF2.
509
510 %package theme-starfield
511 Summary:        starfield theme for GRUB
512 Summary(pl.UTF-8):      Motyw starfield dla GRUB-a
513 Requires:       %{name} = %{version}-%{release}
514 Group:          Base
515
516 %description theme-starfield
517 starfield theme for GRUB.
518
519 %description theme-starfield -l pl.UTF-8
520 Motyw starfield dla GRUB-a.
521
522 %prep
523 %setup -q -n grub-%{version}
524 %patch1 -p1
525 %patch2 -p1
526 %patch3 -p1
527 %patch4 -p1
528 %patch5 -p1
529 %patch6 -p1
530 %patch7 -p1
531 %patch9 -p1
532 %patch10 -p1
533 %patch11 -p1
534 %patch12 -p0
535 %patch13 -p1
536 %patch14 -p1
537
538 # we don't have C.utf-8 and need an UTF-8 locale for build
539 sed -i -e 's/LC_ALL=C.UTF-8/LC_ALL=en_US.utf-8/g' po/Makefile* po/Rules*
540
541 %build
542 # if gold is used then grub doesn't even boot
543 # https://savannah.gnu.org/bugs/?34539
544 # http://sourceware.org/bugzilla/show_bug.cgi?id=14196
545 install -d our-ld
546 ln -f -s /usr/bin/ld.bfd our-ld/ld
547 export PATH=$(pwd)/our-ld:$PATH
548
549 ## not only the typical autotools stuff
550 #./autogen.sh
551
552 #{__gettextize}
553 %{__aclocal} -I m4
554 %{__autoconf}
555 %{__autoheader}
556 %{__automake}
557
558 for platform in %{platforms} ; do
559         install -d build-${platform}
560         cd build-${platform}
561
562         platform_opts=""
563         case platform in
564           coreboot|ieee1275|multiboot|pc|qemu|xen_pvh)
565                 platform_opts="--enable-efiemu%{!?with_efiemu:=no}"
566                 ;;
567         esac
568
569         ln -f -s ../configure .
570         # mawk stalls at ./genmoddep.awk, so force gawk
571         AWK=gawk \
572         %configure \
573                 --with-platform=${platform} \
574                 --disable-werror \
575                 --enable-grub-themes \
576         %if %{with grubemu}
577                 --enable-grub-emu-usb \
578                 --enable-grub-emu-sdl \
579                 --enable-grub-emu-pci \
580         %endif
581                 $platform_opts \
582                 TARGET_LDFLAGS=-static
583
584         %{__make} -j1 -C po update-gmo
585         %{__make}
586         cd ..
587 done
588
589 %install
590 rm -rf $RPM_BUILD_ROOT
591
592 for platform in %{platforms} ; do
593         cd build-${platform}
594         %{__make} install \
595                 pkgdatadir=%{_libexecdir} \
596                 pkglibdir=%{_libexecdir} \
597                 DESTDIR=$RPM_BUILD_ROOT
598         cd ..
599 done
600
601 # not in Th (?)
602 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/de@hebrew
603 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/en@{arabic,cyrillic,greek,hebrew,piglatin}
604
605 %find_lang grub
606
607 # this must be after 'make install'
608 install -d $RPM_BUILD_ROOT%{_libexecdir}/locale
609
610 install -d $RPM_BUILD_ROOT%{_grubdir}
611 cp -p docs/grub.cfg $RPM_BUILD_ROOT%{_grubdir}
612
613 # grub.d/41_custom
614 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_grubdir}/custom.cfg
615 %{__rm} $RPM_BUILD_ROOT/lib/grub.d/40_custom
616
617 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/update-grub
618 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8/update-grub.8
619
620 install -d $RPM_BUILD_ROOT/etc/sysconfig
621 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/grub
622
623 # rm -f, because it sometimes exists, sometimes not, depending which texlive you have installed
624 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
625
626 # platform specific, unnecessarily always installed
627 %ifnarch %{ix86} %{x8664} x32
628 %{__rm} $RPM_BUILD_ROOT{%{_sbindir}/grub-bios-setup,%{_mandir}/man8/grub-bios-setup.8}
629 %endif
630 %ifnarch sparc64
631 %{__rm} $RPM_BUILD_ROOT{%{_sbindir}/grub-sparc64-setup,%{_mandir}/man8/grub-sparc64-setup.8}
632 %endif
633
634 # core.img - bootable image generated by grub-mkimage(1) via grub-install(1)
635 touch $RPM_BUILD_ROOT%{_grubdir}/core.img
636 touch $RPM_BUILD_ROOT%{_grubdir}/device.map
637
638 # needs to be exactly 1KiB
639 # but we're ghosting it. so whom are we kidding here? :P (maybe %config it in future?)
640 dd bs=1024 if=/dev/zero count=1 of=$RPM_BUILD_ROOT%{_grubdir}/grubenv
641
642 %clean
643 rm -rf $RPM_BUILD_ROOT
644
645 %post -p %{_sbindir}/postshell
646 -/usr/sbin/fix-info-dir -c %{_infodir}
647
648 %postun -p %{_sbindir}/postshell
649 -/usr/sbin/fix-info-dir -c %{_infodir}
650
651 %triggerpostun -- %{name} < 2.00-2
652 # Note this trigger on version upgrade needed only for upgrade from
653 # old grub2 packages which contained modules in /boot/grub
654 # or were built with optimizations enabled.
655 # Don't do anything on --downgrade.
656 if [ $1 -le 1 ]; then
657         exit 0
658 fi
659 echo "Grub was upgraded, trying to setup it to boot sector"
660 /sbin/grub-install '(hd0)' || :
661
662 # -- %{name} < 1.99-7.3
663 # migrate /etc/grub.d/custom.cfg.rpmsave  -> /boot/grub/custom.cfg
664 if [ -f %{_sysconfdir}/grub.d/custom.cfg.rpmsave ]; then
665         cp -f %{_grubdir}/custom.cfg{,.rpmnew}
666         mv -f  %{_sysconfdir}/grub.d/custom.cfg.rpmsave %{_grubdir}/custom.cfg
667 fi
668
669 %files -f grub.lang
670 %defattr(644,root,root,755)
671 %doc AUTHORS ChangeLog NEWS README THANKS TODO
672 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/grub
673 %attr(755,root,root) %{_sbindir}/grub-editenv
674 %attr(755,root,root) %{_sbindir}/grub-fstest
675 %attr(755,root,root) %{_sbindir}/grub-file
676 %attr(755,root,root) %{_sbindir}/grub-glue-efi
677 %attr(755,root,root) %{_sbindir}/grub-kbdcomp
678 %attr(755,root,root) %{_sbindir}/grub-install
679 %attr(755,root,root) %{_sbindir}/grub-macbless
680 %attr(755,root,root) %{_sbindir}/grub-menulst2cfg
681 %attr(755,root,root) %{_sbindir}/grub-mkconfig
682 %attr(755,root,root) %{_sbindir}/grub-mklayout
683 %attr(755,root,root) %{_sbindir}/grub-mknetdir
684 %attr(755,root,root) %{_sbindir}/grub-mkpasswd-pbkdf2
685 %attr(755,root,root) %{_sbindir}/grub-mkrelpath
686 %attr(755,root,root) %{_sbindir}/grub-mkrescue
687 %attr(755,root,root) %{_sbindir}/grub-mkstandalone
688 %attr(755,root,root) %{_sbindir}/grub-mount
689 %attr(755,root,root) %{_sbindir}/grub-ofpathname
690 %attr(755,root,root) %{_sbindir}/grub-reboot
691 %attr(755,root,root) %{_sbindir}/grub-render-label
692 %attr(755,root,root) %{_sbindir}/grub-script-check
693 %attr(755,root,root) %{_sbindir}/grub-set-default
694 %attr(755,root,root) %{_sbindir}/grub-syslinux2cfg
695 %attr(755,root,root) %{_sbindir}/update-grub
696 %ifarch %{ix86} %{x8664} x32
697 %attr(755,root,root) %{_sbindir}/grub-bios-setup
698 %{_mandir}/man8/grub-bios-setup.8*
699 %endif
700 %ifarch %{ix86} %{x8664} x32
701 %attr(755,root,root) %{_sbindir}/grub-mkimage
702 %{_mandir}/man1/grub-mkimage.1*
703 %else
704 %attr(755,root,root) %{_sbindir}/grub-probe
705 %{_mandir}/man8/grub-probe.8*
706 %endif
707 %ifarch sparc64
708 %attr(755,root,root) %{_sbindir}/grub-sparc64-setup
709 %{_mandir}/man8/grub-sparc64-setup.8*
710 %endif
711 %{_mandir}/man1/grub-editenv.1*
712 %{_mandir}/man1/grub-file.1*
713 %{_mandir}/man1/grub-fstest.1*
714 %{_mandir}/man1/grub-glue-efi.1*
715 %{_mandir}/man1/grub-kbdcomp.1*
716 %{_mandir}/man1/grub-menulst2cfg.1*
717 %{_mandir}/man1/grub-mklayout.1*
718 %{_mandir}/man1/grub-mknetdir.1*
719 %{_mandir}/man1/grub-mkpasswd-pbkdf2.1*
720 %{_mandir}/man1/grub-mkrelpath.1*
721 %{_mandir}/man1/grub-mkrescue.1*
722 %{_mandir}/man1/grub-mkstandalone.1*
723 %{_mandir}/man1/grub-mount.1*
724 %{_mandir}/man1/grub-render-label.1*
725 %{_mandir}/man1/grub-script-check.1*
726 %{_mandir}/man1/grub-syslinux2cfg.1*
727 %{_mandir}/man8/grub-install.8*
728 %{_mandir}/man8/grub-macbless.8*
729 %{_mandir}/man8/grub-mkconfig.8*
730 %{_mandir}/man8/grub-ofpathname.8*
731 %{_mandir}/man8/grub-reboot.8*
732 %{_mandir}/man8/grub-set-default.8*
733 %{_mandir}/man8/update-grub.8*
734 %if %{with grubemu}
735 %attr(755,root,root) %{_sbindir}/grub-emu
736 %{_mandir}/man8/grub-emu.8*
737 %endif
738 %{_libexecdir}/grub-mkconfig_lib
739
740 %dir %{_grubdir}
741 %dir %{_libexecdir}
742 # XXX: check this locale dir location and if it is neccesaary to exist on /boot
743
744 %dir %{_libexecdir}/locale
745 %config(noreplace) %verify(not md5 mtime size) %{_grubdir}/grub.cfg
746 %config(noreplace) %verify(not md5 mtime size) %{_grubdir}/custom.cfg
747
748 # generated by grub at runtime
749 %ghost %{_grubdir}/device.map
750 %ghost %{_grubdir}/core.img
751 %ghost %{_grubdir}/grubenv
752
753 %dir /lib/grub.d
754 %doc /lib/grub.d/README
755 %attr(755,root,root) /lib/grub.d/00_header
756 %attr(755,root,root) /lib/grub.d/10_linux
757 %attr(755,root,root) /lib/grub.d/20_linux_xen
758 %attr(755,root,root) /lib/grub.d/30_os-prober
759 %attr(755,root,root) /lib/grub.d/41_custom
760
761 %ifarch %{ix86} %{x8664} x32
762 %attr(755,root,root) %{_sbindir}/grub-probe
763 %{_mandir}/man8/grub-probe.8*
764 %endif
765
766 %{_infodir}/grub*.info*
767
768 %dir %{_datadir}/grub/themes
769
770 %files -n bash-completion-%{name}
771 %defattr(644,root,root,755)
772 /etc/bash_completion.d/grub
773
774 %if %{with unifont}
775 %files fonts
776 %defattr(644,root,root,755)
777 %{_libexecdir}/ascii.h
778 %{_libexecdir}/ascii.pf2
779 %{_libexecdir}/euro.pf2
780 %{_libexecdir}/unicode.pf2
781 %{_libexecdir}/widthspec.h
782 %endif
783
784 %if %{with arc}
785 %files platform-arc
786 %defattr(644,root,root,755)
787 %dir %{_libexecdir}/%{arc_arch}-arc
788 %{_libexecdir}/%{arc_arch}-arc/modinfo.sh
789 %{_libexecdir}/%{arc_arch}-arc/*.lst
790 %{_libexecdir}/%{arc_arch}-arc/*.mod
791 %{_libexecdir}/%{arc_arch}-arc/*.module
792 %{_libexecdir}/%{arc_arch}-arc/config.h
793 %{_libexecdir}/%{arc_arch}-arc/gdb_grub
794 %{_libexecdir}/%{arc_arch}-arc/gmodule.pl
795 %{_libexecdir}/%{arc_arch}-arc/kernel.exec
796 %{_libexecdir}/%{arc_arch}-arc/kernel.img
797 %endif
798
799 %if %{with coreboot}
800 %files platform-coreboot
801 %defattr(644,root,root,755)
802 %dir %{_libexecdir}/%{coreboot_arch}-coreboot
803 %{_libexecdir}/%{coreboot_arch}-coreboot/modinfo.sh
804 %{_libexecdir}/%{coreboot_arch}-coreboot/*.lst
805 %{_libexecdir}/%{coreboot_arch}-coreboot/*.mod
806 %{_libexecdir}/%{coreboot_arch}-coreboot/*.module
807 %{_libexecdir}/%{coreboot_arch}-coreboot/config.h
808 %{_libexecdir}/%{coreboot_arch}-coreboot/gdb_grub
809 %{_libexecdir}/%{coreboot_arch}-coreboot/gmodule.pl
810 %{_libexecdir}/%{coreboot_arch}-coreboot/kernel.exec
811 %{_libexecdir}/%{coreboot_arch}-coreboot/kernel.img
812 %if %{with efiemu}
813 %{_libexecdir}/%{coreboot_arch}-coreboot/efiemu*.o
814 %endif
815 %endif
816
817 %if %{with efi}
818 %files platform-efi
819 %defattr(644,root,root,755)
820 %attr(755,root,root) /lib/grub.d/30_uefi-firmware
821 %dir %{_libexecdir}/%{efi_arch}-efi
822 %{_libexecdir}/%{efi_arch}-efi/modinfo.sh
823 %{_libexecdir}/%{efi_arch}-efi/*.lst
824 %{_libexecdir}/%{efi_arch}-efi/*.mod
825 %{_libexecdir}/%{efi_arch}-efi/*.module
826 %{_libexecdir}/%{efi_arch}-efi/config.h
827 %{_libexecdir}/%{efi_arch}-efi/gdb_grub
828 %{_libexecdir}/%{efi_arch}-efi/gmodule.pl
829 %{_libexecdir}/%{efi_arch}-efi/kernel.exec
830 %{_libexecdir}/%{efi_arch}-efi/kernel.img
831 %endif
832
833 %if %{with ieee1275}
834 %files platform-ieee1275
835 %defattr(644,root,root,755)
836 %dir %{_libexecdir}/%{ieee1275_arch}-ieee1275
837 %{_libexecdir}/%{ieee1275_arch}-ieee1275/modinfo.sh
838 %{_libexecdir}/%{ieee1275_arch}-ieee1275/*.lst
839 %{_libexecdir}/%{ieee1275_arch}-ieee1275/*.mod
840 %{_libexecdir}/%{ieee1275_arch}-ieee1275/*.module
841 %{_libexecdir}/%{ieee1275_arch}-ieee1275/config.h
842 %{_libexecdir}/%{ieee1275_arch}-ieee1275/gdb_grub
843 %{_libexecdir}/%{ieee1275_arch}-ieee1275/gmodule.pl
844 %{_libexecdir}/%{ieee1275_arch}-ieee1275/kernel.exec
845 %{_libexecdir}/%{ieee1275_arch}-ieee1275/kernel.img
846 %if %{with efiemu}
847 %{_libexecdir}/%{ieee1275_arch}-ieee1275/efiemu*.o
848 %endif
849 %endif
850
851 %if %{with multiboot}
852 %files platform-multiboot
853 %defattr(644,root,root,755)
854 %dir %{_libexecdir}/i386-multiboot
855 %{_libexecdir}/i386-multiboot/modinfo.sh
856 %{_libexecdir}/i386-multiboot/*.lst
857 %{_libexecdir}/i386-multiboot/*.mod
858 %{_libexecdir}/i386-multiboot/*.module
859 %{_libexecdir}/i386-multiboot/config.h
860 %{_libexecdir}/i386-multiboot/gdb_grub
861 %{_libexecdir}/i386-multiboot/gmodule.pl
862 %{_libexecdir}/i386-multiboot/kernel.exec
863 %{_libexecdir}/i386-multiboot/kernel.img
864 %if %{with efiemu}
865 %{_libexecdir}/i386-multiboot/efiemu*.o
866 %endif
867 %endif
868
869 %if %{with pc}
870 %files platform-pc
871 %defattr(644,root,root,755)
872 %dir %{_libexecdir}/i386-pc
873 %{_libexecdir}/i386-pc/modinfo.sh
874 %{_libexecdir}/i386-pc/*.lst
875 %{_libexecdir}/i386-pc/*.mod
876 %{_libexecdir}/i386-pc/*.module
877 %{_libexecdir}/i386-pc/config.h
878 %{_libexecdir}/i386-pc/gdb_grub
879 %{_libexecdir}/i386-pc/gmodule.pl
880 %{_libexecdir}/i386-pc/boot.image
881 %{_libexecdir}/i386-pc/boot.img
882 %{_libexecdir}/i386-pc/boot_hybrid.image
883 %{_libexecdir}/i386-pc/boot_hybrid.img
884 %{_libexecdir}/i386-pc/cdboot.image
885 %{_libexecdir}/i386-pc/cdboot.img
886 %{_libexecdir}/i386-pc/diskboot.image
887 %{_libexecdir}/i386-pc/diskboot.img
888 %{_libexecdir}/i386-pc/kernel.exec
889 %{_libexecdir}/i386-pc/kernel.img
890 %{_libexecdir}/i386-pc/lnxboot.image
891 %{_libexecdir}/i386-pc/lnxboot.img
892 %{_libexecdir}/i386-pc/lzma_decompress.image
893 %{_libexecdir}/i386-pc/lzma_decompress.img
894 %{_libexecdir}/i386-pc/pxeboot.image
895 %{_libexecdir}/i386-pc/pxeboot.img
896 %if %{with efiemu}
897 %{_libexecdir}/i386-pc/efiemu*.o
898 %endif
899 %endif
900
901 %if %{with qemu}
902 %files platform-qemu
903 %defattr(644,root,root,755)
904 %dir %{_libexecdir}/%{qemu_arch}-%{qemu_plat}
905 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/modinfo.sh
906 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/*.lst
907 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/*.mod
908 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/*.module
909 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/config.h
910 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/gdb_grub
911 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/gmodule.pl
912 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/boot.image
913 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/boot.img
914 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/kernel.exec
915 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/kernel.img
916 %endif
917
918 %if %{with uboot}
919 %files platform-uboot
920 %defattr(644,root,root,755)
921 %dir %{_libexecdir}/arm-uboot
922 %{_libexecdir}/arm-uboot/modinfo.sh
923 %{_libexecdir}/arm-uboot/*.lst
924 %{_libexecdir}/arm-uboot/*.mod
925 %{_libexecdir}/arm-uboot/*.module
926 %{_libexecdir}/arm-uboot/config.h
927 %{_libexecdir}/arm-uboot/gdb_grub
928 %{_libexecdir}/arm-uboot/gmodule.pl
929 %{_libexecdir}/arm-uboot/kernel.exec
930 %{_libexecdir}/arm-uboot/kernel.img
931 %endif
932
933 %if %{with xen}
934 %files platform-xen
935 %defattr(644,root,root,755)
936 %dir %{_libexecdir}/%{xen_arch}-xen
937 %{_libexecdir}/%{xen_arch}-xen/modinfo.sh
938 %{_libexecdir}/%{xen_arch}-xen/*.lst
939 %{_libexecdir}/%{xen_arch}-xen/*.mod
940 %{_libexecdir}/%{xen_arch}-xen/*.module
941 %{_libexecdir}/%{xen_arch}-xen/config.h
942 %{_libexecdir}/%{xen_arch}-xen/gdb_grub
943 %{_libexecdir}/%{xen_arch}-xen/gmodule.pl
944 %{_libexecdir}/%{xen_arch}-xen/kernel.exec
945 %{_libexecdir}/%{xen_arch}-xen/kernel.img
946 %endif
947
948 %if %{with xen_pvh}
949 %files platform-xen_pvh
950 %defattr(644,root,root,755)
951 %dir %{_libexecdir}/i386-xen_pvh
952 %{_libexecdir}/i386-xen_pvh/modinfo.sh
953 %{_libexecdir}/i386-xen_pvh/*.lst
954 %{_libexecdir}/i386-xen_pvh/*.mod
955 %{_libexecdir}/i386-xen_pvh/*.module
956 %{_libexecdir}/i386-xen_pvh/config.h
957 %{_libexecdir}/i386-xen_pvh/gdb_grub
958 %{_libexecdir}/i386-xen_pvh/gmodule.pl
959 %{_libexecdir}/i386-xen_pvh/kernel.exec
960 %{_libexecdir}/i386-xen_pvh/kernel.img
961 %if %{with efiemu}
962 %{_libexecdir}/i386-xen_pvh/efiemu*.o
963 %endif
964 %endif
965
966 %files mkfont
967 %defattr(644,root,root,755)
968 %attr(755,root,root) %{_sbindir}/grub-mkfont
969 %{_mandir}/man1/grub-mkfont.1*
970
971 %files theme-starfield
972 %defattr(644,root,root,755)
973 %{_datadir}/grub/themes/starfield
This page took 0.280714 seconds and 3 git commands to generate.