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