]>
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 | # |
b1a4846d | 8 | %define snap 20090710 |
afe8504a | 9 | Summary: GRand Unified Bootloader |
c8155f7f ER |
10 | Summary(de.UTF-8): GRUB2 - ein Bootloader für x86 und ppc |
11 | Summary(pl.UTF-8): GRUB2 - bootloader dla x86 i ppc | |
12 | Summary(pt_BR.UTF-8): Gerenciador de inicialização GRUB2 | |
afe8504a | 13 | Name: grub2 |
fc835b5e AM |
14 | Version: 1.97 |
15 | Release: 0.%{snap}.1 | |
2e4bec6f | 16 | License: GPL v2 |
afe8504a | 17 | Group: Base |
fc835b5e AM |
18 | # svn export svn://svn.sv.gnu.org/grub/trunk/grub2 |
19 | Source0: %{name}-%{snap}.tar.bz2 | |
b1a4846d | 20 | # Source0-md5: a9f3f5f4babcac04f3bad6249f31370b |
5ed6d4ac | 21 | URL: http://www.gnu.org/software/grub/grub-2.en.html |
0fb8b1a5 | 22 | BuildRequires: autoconf >= 2.53 |
dad1e8fe | 23 | BuildRequires: automake |
8b781299 | 24 | BuildRequires: bison |
12fd19f5 | 25 | BuildRequires: gawk |
afe8504a | 26 | BuildRequires: libtool |
403e7b01 | 27 | %ifarch %{ix86} %{x8664} |
afe8504a | 28 | BuildRequires: lzo-devel >= 1.0.2 |
67873cc1 | 29 | %endif |
c668211a ER |
30 | %ifarch %{x8664} |
31 | BuildRequires: /usr/lib/libc.so | |
797addca | 32 | BuildRequires: gcc-multilib |
c668211a | 33 | %endif |
afe8504a | 34 | BuildRequires: ncurses-devel |
67873cc1 | 35 | BuildRequires: sed >= 4.0 |
6b675158 | 36 | %if %{with static} |
37 | BuildRequires: glibc-static | |
403e7b01 | 38 | %ifarch %{ix86} %{x8664} |
6b675158 | 39 | BuildRequires: lzo-static |
ec6cec95 | 40 | %endif |
6b675158 | 41 | BuildRequires: ncurses-static |
42 | %endif | |
403e7b01 | 43 | BuildRequires: rpmbuild(macros) >= 1.213 |
afe8504a | 44 | Provides: bootloader |
fc835b5e | 45 | Conflicts: grub |
58a823d7 | 46 | ExclusiveArch: %{ix86} %{x8664} ppc sparc64 |
afe8504a SP |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
49 | %define _sbindir /sbin | |
4a00f3b7 | 50 | %define _bindir %{_sbindir} |
afe8504a | 51 | %define _libdir /boot |
fc835b5e | 52 | %define _datadir %{_libdir}/grub |
797addca AF |
53 | %define _legcdir %{_libdir}/grub |
54 | %define _confdir /etc/grub.d/ | |
9d44d75e | 55 | |
afe8504a SP |
56 | %description |
57 | GRUB is a GPLed bootloader intended to unify bootloading across x86 | |
58 | operating systems. In addition to loading the Linux and *BSD kernels, | |
59 | it implements the Multiboot standard, which allows for flexible | |
60 | loading of multiple boot images (needed for modular kernels such as | |
61 | the GNU Hurd). | |
62 | ||
6b0aefbf | 63 | %description -l de.UTF-8 |
afe8504a SP |
64 | GRUB (GRand Unified Boot-loader) ist ein Bootloader, der oft auf |
65 | Rechnern eingesetzt wird, auf denen das freie Betriebssystem Linux | |
6b0aefbf | 66 | läuft. GRUB löst den betagten LILO (Linux-Loader) ab. |
afe8504a SP |
67 | |
68 | GRUB wurde innerhalb des GNU Hurd-Projektes als Boot-Loader entwickelt | |
6b0aefbf JR |
69 | und wird unter der GPL vertrieben. Aufgrund seiner höheren |
70 | Flexibilität verdrängt GRUB in vielen Linux-Distributionen den | |
afe8504a SP |
71 | traditionellen Boot-Loader LILO. |
72 | ||
6b0aefbf JR |
73 | %description -l es.UTF-8 |
74 | Éste es GRUB - Grand Unified Boot Loader - un administrador de | |
75 | inicialización capaz de entrar en la mayoría de los sistemas | |
afe8504a | 76 | operacionales libres - Linux, FreeBSD, NetBSD, GNU Mach, etc. como |
6b0aefbf | 77 | también en la mayoría de los sistemas operacionales comerciales para |
afe8504a SP |
78 | PC. |
79 | ||
80 | El administrador GRUB puede ser una buena alternativa a LILO, para | |
6b0aefbf JR |
81 | usuarios conmás experiencia y que deseen obtener más recursos de su |
82 | cargador de inicialización (boot loader). | |
afe8504a | 83 | |
6b0aefbf JR |
84 | %description -l pl.UTF-8 |
85 | GRUB jest bootloaderem na licencji GNU, mającym na celu unifikację | |
86 | procesu bootowania na systemach x86. Potrafi nie tylko ładować jądra | |
87 | Linuksa i *BSD: posiada również implementacje standardu Multiboot, | |
88 | który pozwala na elastyczne ładowanie wielu obrazów bootowalnych | |
89 | (czego wymagają modułowe jądra, takie jak GNU Hurd). | |
afe8504a | 90 | |
6b0aefbf JR |
91 | %description -l pt_BR.UTF-8 |
92 | Esse é o GRUB - Grand Unified Boot Loader - um gerenciador de boot | |
afe8504a SP |
93 | capaz de entrar na maioria dos sistemas operacionais livres - Linux, |
94 | FreeBSD, NetBSD, GNU Mach, etc. assim como na maioria dos sistemas | |
95 | operacionais comerciais para PC. | |
96 | ||
6b0aefbf JR |
97 | O GRUB pode ser uma boa alternativa ao LILO, para usuários mais |
98 | avançados e que querem mais recursos de seu boot loader. | |
afe8504a | 99 | |
afe8504a | 100 | %prep |
fc835b5e | 101 | %setup -q -n %{name} |
afe8504a SP |
102 | |
103 | %build | |
3ff87e8a | 104 | cp -f /usr/share/automake/config.sub . |
afe8504a SP |
105 | %{__libtoolize} |
106 | %{__aclocal} | |
107 | %{__autoheader} | |
b1a4846d | 108 | echo timestamp > stamp-h.in |
afe8504a | 109 | %{__autoconf} |
0fb8b1a5 | 110 | #for rmk in conf/*.rmk; do |
111 | # ruby genmk.rb < $rmk > `echo $rmk | sed 's/\.rmk$/.mk/'` | |
112 | #done | |
12fd19f5 ER |
113 | export CFLAGS="-Os %{?debug:-g}" |
114 | ||
115 | # mawk stalls at ./genmoddep.awk, so force gawk | |
116 | AWK=gawk \ | |
afe8504a | 117 | %configure \ |
797addca | 118 | %{!?_without_grubemu:--enable-grub-emu}\ |
0fb8b1a5 | 119 | BUILD_CFLAGS="$CFLAGS" |
12fd19f5 | 120 | %{__make} -j1 \ |
2e4bec6f | 121 | BUILD_CFLAGS="$CFLAGS" \ |
dfbeab3a | 122 | %if %{with static} |
403e7b01 | 123 | %ifarch %{ix86} %{x8664} |
dfbeab3a | 124 | grub_setup_LDFLAGS="-s -static" \ |
125 | grub_mkimage_LDFLAGS="-s -static -llzo" \ | |
ec6cec95 | 126 | %else |
127 | grub_mkimage_LDFLAGS="-s -static" \ | |
128 | %endif | |
129 | grub_emu_LDFLAGS="-s -static -lncurses -ltinfo" \ | |
dfbeab3a | 130 | %endif |
797addca | 131 | pkgdatadir="%{_datadir}" |
0fb8b1a5 | 132 | |
afe8504a SP |
133 | %install |
134 | rm -rf $RPM_BUILD_ROOT | |
afe8504a SP |
135 | |
136 | %{__make} install \ | |
2e4bec6f | 137 | DESTDIR=$RPM_BUILD_ROOT \ |
797addca | 138 | pkgdatadir="%{_datadir}" |
afe8504a | 139 | |
fa0a01c7 AM |
140 | install docs/grub.cfg $RPM_BUILD_ROOT%{_datadir} |
141 | ||
2e4bec6f | 142 | %ifarch ppc |
797addca | 143 | install grubof $RPM_BUILD_ROOT%{_datadir} |
2e4bec6f | 144 | %endif |
fc835b5e AM |
145 | |
146 | # create -devel subpackage? | |
147 | rm -r $RPM_BUILD_ROOT%{_includedir}/grub $RPM_BUILD_ROOT%{_includedir}/*.h | |
afe8504a SP |
148 | |
149 | %clean | |
150 | rm -rf $RPM_BUILD_ROOT | |
151 | ||
afe8504a SP |
152 | %files |
153 | %defattr(644,root,root,755) | |
2e4bec6f | 154 | %doc AUTHORS ChangeLog NEWS README THANKS TODO |
b1a4846d | 155 | %attr(755,root,root) %{_sbindir}/grub-dumpbios |
1ffaf1f6 | 156 | %attr(755,root,root) %{_sbindir}/grub-mkimage |
fc835b5e | 157 | %attr(755,root,root) %{_sbindir}/grub-install |
797addca | 158 | %attr(755,root,root) %{_sbindir}/grub-mkrescue |
fc835b5e AM |
159 | %attr(755,root,root) %{_sbindir}/grub-editenv |
160 | %attr(755,root,root) %{_sbindir}/grub-mkconfig | |
161 | %attr(755,root,root) %{_sbindir}/grub-mkelfimage | |
b1a4846d | 162 | %{_mandir}/man8/grub-dumpbios.8* |
fc835b5e AM |
163 | %{_mandir}/man1/grub-mkimage.1* |
164 | %{_mandir}/man8/grub-install.8* | |
165 | %{_mandir}/man1/grub-mkrescue.1* | |
166 | %{_mandir}/man1/grub-editenv.1* | |
167 | %{_mandir}/man8/grub-mkconfig.8* | |
168 | %{_mandir}/man1/grub-mkelfimage.1* | |
797addca AF |
169 | %if %{with grubemu} |
170 | %attr(755,root,root) %{_sbindir}/grub-emu | |
fc835b5e | 171 | %{_mandir}/man8/grub-emu.8* |
797addca | 172 | %endif |
fa0a01c7 | 173 | %config(noreplace) %verify(not md5 mtime size) %dir %{_datadir}/grub.cfg |
64f4f11e AM |
174 | %dir %{_datadir} |
175 | %{_datadir}/*-pc | |
176 | %attr(755,root,root) %{_legcdir}/*_lib | |
177 | %attr(755,root,root) %{_legcdir}/*.* | |
797addca AF |
178 | %dir %{_confdir} |
179 | %attr(755,root,root) %{_confdir}/00_header | |
797addca | 180 | %attr(755,root,root) %{_confdir}/10_linux |
fc835b5e AM |
181 | %attr(755,root,root) %{_confdir}/30_os-prober |
182 | %attr(755,root,root) %{_confdir}/40_custom | |
797addca | 183 | %doc %{_confdir}/README |
1e58ef6c | 184 | %ifarch %{ix86} %{x8664} |
1ffaf1f6 ER |
185 | %attr(755,root,root) %{_sbindir}/grub-mkdevicemap |
186 | %attr(755,root,root) %{_sbindir}/grub-probe | |
187 | %attr(755,root,root) %{_sbindir}/grub-setup | |
fc835b5e AM |
188 | %{_mandir}/man8/grub-mkdevicemap.8* |
189 | %{_mandir}/man8/grub-probe.8* | |
190 | %{_mandir}/man8/grub-setup.8* | |
4a00f3b7 | 191 | %endif |