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