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