]>
Commit | Line | Data |
---|---|---|
afe8504a | 1 | # TODO: |
7bb54b6c | 2 | # - rewrite summary/desc ? GRUB2 has nothing to see with GRUB |
afe8504a | 3 | # |
90feddde JB |
4 | # Conditional build: |
5 | %bcond_with static # build static binaries | |
797addca | 6 | %bcond_without grubemu # build grub-emu binary |
90feddde | 7 | # |
afe8504a | 8 | Summary: GRand Unified Bootloader |
c8155f7f ER |
9 | Summary(de.UTF-8): GRUB2 - ein Bootloader für x86 und ppc |
10 | Summary(pl.UTF-8): GRUB2 - bootloader dla x86 i ppc | |
11 | Summary(pt_BR.UTF-8): Gerenciador de inicialização GRUB2 | |
afe8504a | 12 | Name: grub2 |
928842a8 | 13 | Version: 1.97.1 |
5028d8c9 | 14 | Release: 2 |
2e4bec6f | 15 | License: GPL v2 |
afe8504a | 16 | Group: Base |
fc835b5e | 17 | # svn export svn://svn.sv.gnu.org/grub/trunk/grub2 |
aafbee50 AG |
18 | #Source0: %{name}-%{snap}.tar.bz2 |
19 | Source0: http://alpha.gnu.org/gnu/grub/grub-%{version}.tar.gz | |
928842a8 | 20 | # Source0-md5: 66fe18cd9318e3d67a34d7b7a8e7b1f6 |
22909ca1 ER |
21 | Source1: update-grub |
22 | Source2: update-grub.8 | |
b46589aa | 23 | Source3: grub.sysconfig |
5ed6d4ac | 24 | URL: http://www.gnu.org/software/grub/grub-2.en.html |
0fb8b1a5 | 25 | BuildRequires: autoconf >= 2.53 |
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 |
dad1e8fe | 31 | BuildRequires: automake |
8b781299 | 32 | BuildRequires: bison |
12fd19f5 | 33 | BuildRequires: gawk |
afe8504a | 34 | BuildRequires: libtool |
403e7b01 | 35 | %ifarch %{ix86} %{x8664} |
afe8504a | 36 | BuildRequires: lzo-devel >= 1.0.2 |
67873cc1 | 37 | %endif |
c668211a ER |
38 | %ifarch %{x8664} |
39 | BuildRequires: /usr/lib/libc.so | |
797addca | 40 | BuildRequires: gcc-multilib |
c668211a | 41 | %endif |
afe8504a | 42 | BuildRequires: ncurses-devel |
67873cc1 | 43 | BuildRequires: sed >= 4.0 |
6b675158 | 44 | %if %{with static} |
45 | BuildRequires: glibc-static | |
403e7b01 | 46 | %ifarch %{ix86} %{x8664} |
6b675158 | 47 | BuildRequires: lzo-static |
ec6cec95 | 48 | %endif |
6b675158 | 49 | BuildRequires: ncurses-static |
50 | %endif | |
403e7b01 | 51 | BuildRequires: rpmbuild(macros) >= 1.213 |
afe8504a | 52 | Provides: bootloader |
fc835b5e | 53 | Conflicts: grub |
58a823d7 | 54 | ExclusiveArch: %{ix86} %{x8664} ppc sparc64 |
afe8504a SP |
55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
56 | ||
57 | %define _sbindir /sbin | |
4a00f3b7 | 58 | %define _bindir %{_sbindir} |
afe8504a | 59 | %define _libdir /boot |
26e757db | 60 | %define _libexecdir %{_libdir}/grub |
9d44d75e | 61 | |
afe8504a SP |
62 | %description |
63 | GRUB is a GPLed bootloader intended to unify bootloading across x86 | |
64 | operating systems. In addition to loading the Linux and *BSD kernels, | |
65 | it implements the Multiboot standard, which allows for flexible | |
66 | loading of multiple boot images (needed for modular kernels such as | |
67 | the GNU Hurd). | |
68 | ||
6b0aefbf | 69 | %description -l de.UTF-8 |
afe8504a SP |
70 | GRUB (GRand Unified Boot-loader) ist ein Bootloader, der oft auf |
71 | Rechnern eingesetzt wird, auf denen das freie Betriebssystem Linux | |
6b0aefbf | 72 | läuft. GRUB löst den betagten LILO (Linux-Loader) ab. |
afe8504a SP |
73 | |
74 | GRUB wurde innerhalb des GNU Hurd-Projektes als Boot-Loader entwickelt | |
6b0aefbf JR |
75 | und wird unter der GPL vertrieben. Aufgrund seiner höheren |
76 | Flexibilität verdrängt GRUB in vielen Linux-Distributionen den | |
afe8504a SP |
77 | traditionellen Boot-Loader LILO. |
78 | ||
6b0aefbf JR |
79 | %description -l es.UTF-8 |
80 | Éste es GRUB - Grand Unified Boot Loader - un administrador de | |
81 | inicialización capaz de entrar en la mayoría de los sistemas | |
afe8504a | 82 | operacionales libres - Linux, FreeBSD, NetBSD, GNU Mach, etc. como |
6b0aefbf | 83 | también en la mayoría de los sistemas operacionales comerciales para |
afe8504a SP |
84 | PC. |
85 | ||
86 | El administrador GRUB puede ser una buena alternativa a LILO, para | |
6b0aefbf JR |
87 | usuarios conmás experiencia y que deseen obtener más recursos de su |
88 | cargador de inicialización (boot loader). | |
afe8504a | 89 | |
6b0aefbf JR |
90 | %description -l pl.UTF-8 |
91 | GRUB jest bootloaderem na licencji GNU, mającym na celu unifikację | |
92 | procesu bootowania na systemach x86. Potrafi nie tylko ładować jądra | |
93 | Linuksa i *BSD: posiada również implementacje standardu Multiboot, | |
94 | który pozwala na elastyczne ładowanie wielu obrazów bootowalnych | |
95 | (czego wymagają modułowe jądra, takie jak GNU Hurd). | |
afe8504a | 96 | |
6b0aefbf JR |
97 | %description -l pt_BR.UTF-8 |
98 | Esse é o GRUB - Grand Unified Boot Loader - um gerenciador de boot | |
afe8504a SP |
99 | capaz de entrar na maioria dos sistemas operacionais livres - Linux, |
100 | FreeBSD, NetBSD, GNU Mach, etc. assim como na maioria dos sistemas | |
101 | operacionais comerciais para PC. | |
102 | ||
6b0aefbf JR |
103 | O GRUB pode ser uma boa alternativa ao LILO, para usuários mais |
104 | avançados e que querem mais recursos de seu boot loader. | |
afe8504a | 105 | |
afe8504a | 106 | %prep |
aafbee50 | 107 | %setup -q -n grub-%{version} |
5028d8c9 | 108 | %patch0 -p1 |
b46589aa | 109 | %patch1 -p1 |
872700b0 | 110 | %patch2 -p1 |
78785d3a | 111 | %patch3 -p1 |
aec70abd | 112 | %patch4 -p1 |
afe8504a SP |
113 | |
114 | %build | |
3ff87e8a | 115 | cp -f /usr/share/automake/config.sub . |
afe8504a SP |
116 | %{__libtoolize} |
117 | %{__aclocal} | |
118 | %{__autoheader} | |
b1a4846d | 119 | echo timestamp > stamp-h.in |
afe8504a | 120 | %{__autoconf} |
12fd19f5 ER |
121 | export CFLAGS="-Os %{?debug:-g}" |
122 | ||
123 | # mawk stalls at ./genmoddep.awk, so force gawk | |
124 | AWK=gawk \ | |
afe8504a | 125 | %configure \ |
22909ca1 | 126 | %{!?without_grubemu:--enable-grub-emu} \ |
0fb8b1a5 | 127 | BUILD_CFLAGS="$CFLAGS" |
12fd19f5 | 128 | %{__make} -j1 \ |
2e4bec6f | 129 | BUILD_CFLAGS="$CFLAGS" \ |
dfbeab3a | 130 | %if %{with static} |
403e7b01 | 131 | %ifarch %{ix86} %{x8664} |
dfbeab3a | 132 | grub_setup_LDFLAGS="-s -static" \ |
133 | grub_mkimage_LDFLAGS="-s -static -llzo" \ | |
ec6cec95 | 134 | %else |
135 | grub_mkimage_LDFLAGS="-s -static" \ | |
136 | %endif | |
137 | grub_emu_LDFLAGS="-s -static -lncurses -ltinfo" \ | |
dfbeab3a | 138 | %endif |
aec70abd ER |
139 | pkgdatadir=%{_libexecdir} \ |
140 | pkglibdir=%{_libexecdir} | |
0fb8b1a5 | 141 | |
afe8504a SP |
142 | %install |
143 | rm -rf $RPM_BUILD_ROOT | |
b46589aa | 144 | install -d $RPM_BUILD_ROOT/etc/sysconfig |
afe8504a SP |
145 | |
146 | %{__make} install \ | |
26e757db | 147 | pkgdatadir=%{_libexecdir} \ |
aec70abd | 148 | pkglibdir=%{_libexecdir} \ |
b46589aa | 149 | DESTDIR=$RPM_BUILD_ROOT |
afe8504a | 150 | |
26e757db | 151 | cp -a docs/grub.cfg $RPM_BUILD_ROOT%{_libexecdir} |
22909ca1 ER |
152 | install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/update-grub |
153 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8/update-grub.8 | |
b46589aa | 154 | cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/grub |
fc58858a | 155 | rm $RPM_BUILD_ROOT%{_infodir}/dir |
26e757db | 156 | # deprecated. we don't need it |
78785d3a ER |
157 | rm $RPM_BUILD_ROOT/lib/update-grub_lib |
158 | ||
159 | # no junk to /boot/grub (put to -devel?) | |
aec70abd ER |
160 | rm $RPM_BUILD_ROOT%{_libexecdir}/*.h |
161 | rm $RPM_BUILD_ROOT%{_libexecdir}/*.mk | |
fa0a01c7 | 162 | |
cbd79801 ER |
163 | # core.img - bootable image generated by grub-mkimage(1) via grub-install(1) |
164 | touch $RPM_BUILD_ROOT%{_libexecdir}/core.img | |
165 | touch $RPM_BUILD_ROOT%{_libexecdir}/device.map | |
166 | ||
afe8504a SP |
167 | %clean |
168 | rm -rf $RPM_BUILD_ROOT | |
169 | ||
5028d8c9 | 170 | %post -p %{_sbindir}/postshell |
fc58858a | 171 | -/usr/sbin/fix-info-dir -c %{_infodir} |
f4604ef8 | 172 | |
5028d8c9 | 173 | %postun -p %{_sbindir}/postshell |
fc58858a | 174 | -/usr/sbin/fix-info-dir -c %{_infodir} |
f4604ef8 | 175 | |
afe8504a SP |
176 | %files |
177 | %defattr(644,root,root,755) | |
2e4bec6f | 178 | %doc AUTHORS ChangeLog NEWS README THANKS TODO |
aec70abd | 179 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/grub |
3ea0c40e | 180 | %attr(755,root,root) %{_sbindir}/grub-fstest |
fc835b5e | 181 | %attr(755,root,root) %{_sbindir}/grub-install |
3ea0c40e | 182 | %attr(755,root,root) %{_sbindir}/grub-mkfont |
797addca | 183 | %attr(755,root,root) %{_sbindir}/grub-mkrescue |
fc835b5e AM |
184 | %attr(755,root,root) %{_sbindir}/grub-editenv |
185 | %attr(755,root,root) %{_sbindir}/grub-mkconfig | |
186 | %attr(755,root,root) %{_sbindir}/grub-mkelfimage | |
22909ca1 | 187 | %attr(755,root,root) %{_sbindir}/update-grub |
76be4c4a AM |
188 | %ifarch %{ix86} %{x8664} |
189 | %attr(755,root,root) %{_sbindir}/grub-mkimage | |
fc835b5e | 190 | %{_mandir}/man1/grub-mkimage.1* |
76be4c4a AM |
191 | %else |
192 | %attr(755,root,root) %{_sbindir}/grub-probe | |
193 | %attr(755,root,root) %{_sbindir}/grub-mkdevicemap | |
194 | %{_mandir}/man8/grub-probe.8* | |
195 | %{_mandir}/man8/grub-mkdevicemap.8* | |
196 | %endif | |
3ea0c40e AM |
197 | %{_mandir}/man1/grub-fstest.1* |
198 | %{_mandir}/man1/grub-mkfont.1* | |
fc835b5e AM |
199 | %{_mandir}/man1/grub-mkrescue.1* |
200 | %{_mandir}/man1/grub-editenv.1* | |
201 | %{_mandir}/man8/grub-mkconfig.8* | |
202 | %{_mandir}/man1/grub-mkelfimage.1* | |
22909ca1 | 203 | %{_mandir}/man8/update-grub.8* |
797addca AF |
204 | %if %{with grubemu} |
205 | %attr(755,root,root) %{_sbindir}/grub-emu | |
fc835b5e | 206 | %{_mandir}/man8/grub-emu.8* |
797addca | 207 | %endif |
aec70abd ER |
208 | /lib/grub-mkconfig_lib |
209 | ||
26e757db | 210 | %dir %{_libexecdir} |
aec70abd ER |
211 | %config(noreplace) %verify(not md5 mtime size) %{_libexecdir}/grub.cfg |
212 | %{_libexecdir}/*.lst | |
213 | %{_libexecdir}/*.mod | |
76be4c4a | 214 | %ifarch %{ix86} %{x8664} |
aec70abd | 215 | %{_libexecdir}/*.o |
76be4c4a | 216 | %endif |
aec70abd | 217 | %ifarch %{ix86} %{x8664} sparc sparc64 |
cbd79801 ER |
218 | %{_libexecdir}/boot.img |
219 | %{_libexecdir}/cdboot.img | |
220 | %{_libexecdir}/diskboot.img | |
221 | %{_libexecdir}/kernel.img | |
222 | %{_libexecdir}/lnxboot.img | |
223 | %{_libexecdir}/pxeboot.img | |
76be4c4a | 224 | %endif |
aec70abd | 225 | |
cbd79801 ER |
226 | # generated by grub at runtime |
227 | %ghost %{_libexecdir}/device.map | |
228 | %ghost %{_libexecdir}/core.img | |
229 | ||
26e757db ER |
230 | %dir %{_sysconfdir}/grub.d |
231 | %doc %{_sysconfdir}/grub.d/README | |
232 | %attr(755,root,root) %{_sysconfdir}/grub.d/00_header | |
233 | %attr(755,root,root) %{_sysconfdir}/grub.d/10_linux | |
234 | %attr(755,root,root) %{_sysconfdir}/grub.d/30_os-prober | |
235 | %attr(755,root,root) %{_sysconfdir}/grub.d/40_custom | |
aec70abd | 236 | |
1e58ef6c | 237 | %ifarch %{ix86} %{x8664} |
1ffaf1f6 ER |
238 | %attr(755,root,root) %{_sbindir}/grub-mkdevicemap |
239 | %attr(755,root,root) %{_sbindir}/grub-probe | |
240 | %attr(755,root,root) %{_sbindir}/grub-setup | |
fc835b5e AM |
241 | %{_mandir}/man8/grub-mkdevicemap.8* |
242 | %{_mandir}/man8/grub-probe.8* | |
243 | %{_mandir}/man8/grub-setup.8* | |
4a00f3b7 | 244 | %endif |
aec70abd | 245 | |
f4604ef8 | 246 | %{_infodir}/grub*.info* |