]>
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 | # |
fc835b5e | 8 | %define snap 20090328 |
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 | |
20 | # Source0-md5: 4078b48449c12cdc7e7d1225249607d4 | |
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} | |
108 | %{__autoconf} | |
0fb8b1a5 | 109 | #for rmk in conf/*.rmk; do |
110 | # ruby genmk.rb < $rmk > `echo $rmk | sed 's/\.rmk$/.mk/'` | |
111 | #done | |
12fd19f5 ER |
112 | export CFLAGS="-Os %{?debug:-g}" |
113 | ||
114 | # mawk stalls at ./genmoddep.awk, so force gawk | |
115 | AWK=gawk \ | |
afe8504a | 116 | %configure \ |
797addca | 117 | %{!?_without_grubemu:--enable-grub-emu}\ |
0fb8b1a5 | 118 | BUILD_CFLAGS="$CFLAGS" |
12fd19f5 | 119 | %{__make} -j1 \ |
2e4bec6f | 120 | BUILD_CFLAGS="$CFLAGS" \ |
dfbeab3a | 121 | %if %{with static} |
403e7b01 | 122 | %ifarch %{ix86} %{x8664} |
dfbeab3a | 123 | grub_setup_LDFLAGS="-s -static" \ |
124 | grub_mkimage_LDFLAGS="-s -static -llzo" \ | |
ec6cec95 | 125 | %else |
126 | grub_mkimage_LDFLAGS="-s -static" \ | |
127 | %endif | |
128 | grub_emu_LDFLAGS="-s -static -lncurses -ltinfo" \ | |
dfbeab3a | 129 | %endif |
797addca | 130 | pkgdatadir="%{_datadir}" |
0fb8b1a5 | 131 | |
afe8504a SP |
132 | %install |
133 | rm -rf $RPM_BUILD_ROOT | |
afe8504a SP |
134 | |
135 | %{__make} install \ | |
2e4bec6f | 136 | DESTDIR=$RPM_BUILD_ROOT \ |
797addca | 137 | pkgdatadir="%{_datadir}" |
afe8504a | 138 | |
fa0a01c7 AM |
139 | install docs/grub.cfg $RPM_BUILD_ROOT%{_datadir} |
140 | ||
2e4bec6f | 141 | %ifarch ppc |
797addca | 142 | install grubof $RPM_BUILD_ROOT%{_datadir} |
2e4bec6f | 143 | %endif |
fc835b5e AM |
144 | |
145 | # create -devel subpackage? | |
146 | rm -r $RPM_BUILD_ROOT%{_includedir}/grub $RPM_BUILD_ROOT%{_includedir}/*.h | |
afe8504a SP |
147 | |
148 | %clean | |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
afe8504a SP |
151 | %files |
152 | %defattr(644,root,root,755) | |
2e4bec6f | 153 | %doc AUTHORS ChangeLog NEWS README THANKS TODO |
1ffaf1f6 | 154 | %attr(755,root,root) %{_sbindir}/grub-mkimage |
fc835b5e | 155 | %attr(755,root,root) %{_sbindir}/grub-install |
797addca | 156 | %attr(755,root,root) %{_sbindir}/grub-mkrescue |
fc835b5e AM |
157 | %attr(755,root,root) %{_sbindir}/grub-editenv |
158 | %attr(755,root,root) %{_sbindir}/grub-mkconfig | |
159 | %attr(755,root,root) %{_sbindir}/grub-mkelfimage | |
160 | %{_mandir}/man1/grub-mkimage.1* | |
161 | %{_mandir}/man8/grub-install.8* | |
162 | %{_mandir}/man1/grub-mkrescue.1* | |
163 | %{_mandir}/man1/grub-editenv.1* | |
164 | %{_mandir}/man8/grub-mkconfig.8* | |
165 | %{_mandir}/man1/grub-mkelfimage.1* | |
797addca AF |
166 | %if %{with grubemu} |
167 | %attr(755,root,root) %{_sbindir}/grub-emu | |
fc835b5e | 168 | %{_mandir}/man8/grub-emu.8* |
797addca | 169 | %endif |
fa0a01c7 | 170 | %config(noreplace) %verify(not md5 mtime size) %dir %{_datadir}/grub.cfg |
64f4f11e AM |
171 | %dir %{_datadir} |
172 | %{_datadir}/*-pc | |
173 | %attr(755,root,root) %{_legcdir}/*_lib | |
174 | %attr(755,root,root) %{_legcdir}/*.* | |
797addca AF |
175 | %dir %{_confdir} |
176 | %attr(755,root,root) %{_confdir}/00_header | |
797addca | 177 | %attr(755,root,root) %{_confdir}/10_linux |
fc835b5e AM |
178 | %attr(755,root,root) %{_confdir}/30_os-prober |
179 | %attr(755,root,root) %{_confdir}/40_custom | |
797addca | 180 | %doc %{_confdir}/README |
1e58ef6c | 181 | %ifarch %{ix86} %{x8664} |
1ffaf1f6 ER |
182 | %attr(755,root,root) %{_sbindir}/grub-mkdevicemap |
183 | %attr(755,root,root) %{_sbindir}/grub-probe | |
184 | %attr(755,root,root) %{_sbindir}/grub-setup | |
fc835b5e AM |
185 | %{_mandir}/man8/grub-mkdevicemap.8* |
186 | %{_mandir}/man8/grub-probe.8* | |
187 | %{_mandir}/man8/grub-setup.8* | |
4a00f3b7 | 188 | %endif |