]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - rewrite summary/desc ? GRUB2 has nothing to see with GRUB | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_with static # build static binaries | |
6 | %bcond_without grubemu # build grub-emu binary | |
7 | # | |
8 | %define snap 20090710 | |
9 | Summary: GRand Unified Bootloader | |
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 | |
13 | Name: grub2 | |
14 | Version: 1.97 | |
15 | Release: 0.%{snap}.1 | |
16 | License: GPL v2 | |
17 | Group: Base | |
18 | # svn export svn://svn.sv.gnu.org/grub/trunk/grub2 | |
19 | Source0: %{name}-%{snap}.tar.bz2 | |
20 | # Source0-md5: a9f3f5f4babcac04f3bad6249f31370b | |
21 | URL: http://www.gnu.org/software/grub/grub-2.en.html | |
22 | BuildRequires: autoconf >= 2.53 | |
23 | BuildRequires: automake | |
24 | BuildRequires: bison | |
25 | BuildRequires: gawk | |
26 | BuildRequires: libtool | |
27 | %ifarch %{ix86} %{x8664} | |
28 | BuildRequires: lzo-devel >= 1.0.2 | |
29 | %endif | |
30 | %ifarch %{x8664} | |
31 | BuildRequires: /usr/lib/libc.so | |
32 | BuildRequires: gcc-multilib | |
33 | %endif | |
34 | BuildRequires: ncurses-devel | |
35 | BuildRequires: sed >= 4.0 | |
36 | %if %{with static} | |
37 | BuildRequires: glibc-static | |
38 | %ifarch %{ix86} %{x8664} | |
39 | BuildRequires: lzo-static | |
40 | %endif | |
41 | BuildRequires: ncurses-static | |
42 | %endif | |
43 | BuildRequires: rpmbuild(macros) >= 1.213 | |
44 | Provides: bootloader | |
45 | Conflicts: grub | |
46 | ExclusiveArch: %{ix86} %{x8664} ppc sparc64 | |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
48 | ||
49 | %define _sbindir /sbin | |
50 | %define _bindir %{_sbindir} | |
51 | %define _libdir /boot | |
52 | %define _datadir %{_libdir}/grub | |
53 | %define _legcdir %{_libdir}/grub | |
54 | %define _confdir /etc/grub.d/ | |
55 | ||
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 | ||
63 | %description -l de.UTF-8 | |
64 | GRUB (GRand Unified Boot-loader) ist ein Bootloader, der oft auf | |
65 | Rechnern eingesetzt wird, auf denen das freie Betriebssystem Linux | |
66 | läuft. GRUB löst den betagten LILO (Linux-Loader) ab. | |
67 | ||
68 | GRUB wurde innerhalb des GNU Hurd-Projektes als Boot-Loader entwickelt | |
69 | und wird unter der GPL vertrieben. Aufgrund seiner höheren | |
70 | Flexibilität verdrängt GRUB in vielen Linux-Distributionen den | |
71 | traditionellen Boot-Loader LILO. | |
72 | ||
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 | |
76 | operacionales libres - Linux, FreeBSD, NetBSD, GNU Mach, etc. como | |
77 | también en la mayoría de los sistemas operacionales comerciales para | |
78 | PC. | |
79 | ||
80 | El administrador GRUB puede ser una buena alternativa a LILO, para | |
81 | usuarios conmás experiencia y que deseen obtener más recursos de su | |
82 | cargador de inicialización (boot loader). | |
83 | ||
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). | |
90 | ||
91 | %description -l pt_BR.UTF-8 | |
92 | Esse é o GRUB - Grand Unified Boot Loader - um gerenciador de boot | |
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 | ||
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. | |
99 | ||
100 | %prep | |
101 | %setup -q -n %{name} | |
102 | ||
103 | %build | |
104 | cp -f /usr/share/automake/config.sub . | |
105 | %{__libtoolize} | |
106 | %{__aclocal} | |
107 | %{__autoheader} | |
108 | echo timestamp > stamp-h.in | |
109 | %{__autoconf} | |
110 | #for rmk in conf/*.rmk; do | |
111 | # ruby genmk.rb < $rmk > `echo $rmk | sed 's/\.rmk$/.mk/'` | |
112 | #done | |
113 | export CFLAGS="-Os %{?debug:-g}" | |
114 | ||
115 | # mawk stalls at ./genmoddep.awk, so force gawk | |
116 | AWK=gawk \ | |
117 | %configure \ | |
118 | %{!?_without_grubemu:--enable-grub-emu}\ | |
119 | BUILD_CFLAGS="$CFLAGS" | |
120 | %{__make} -j1 \ | |
121 | BUILD_CFLAGS="$CFLAGS" \ | |
122 | %if %{with static} | |
123 | %ifarch %{ix86} %{x8664} | |
124 | grub_setup_LDFLAGS="-s -static" \ | |
125 | grub_mkimage_LDFLAGS="-s -static -llzo" \ | |
126 | %else | |
127 | grub_mkimage_LDFLAGS="-s -static" \ | |
128 | %endif | |
129 | grub_emu_LDFLAGS="-s -static -lncurses -ltinfo" \ | |
130 | %endif | |
131 | pkgdatadir="%{_datadir}" | |
132 | ||
133 | %install | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
136 | %{__make} install \ | |
137 | DESTDIR=$RPM_BUILD_ROOT \ | |
138 | pkgdatadir="%{_datadir}" | |
139 | ||
140 | install docs/grub.cfg $RPM_BUILD_ROOT%{_datadir} | |
141 | ||
142 | %ifarch ppc | |
143 | install grubof $RPM_BUILD_ROOT%{_datadir} | |
144 | %endif | |
145 | ||
146 | # create -devel subpackage? | |
147 | rm -r $RPM_BUILD_ROOT%{_includedir}/grub $RPM_BUILD_ROOT%{_includedir}/*.h | |
148 | ||
149 | %clean | |
150 | rm -rf $RPM_BUILD_ROOT | |
151 | ||
152 | %files | |
153 | %defattr(644,root,root,755) | |
154 | %doc AUTHORS ChangeLog NEWS README THANKS TODO | |
155 | %attr(755,root,root) %{_sbindir}/grub-dumpbios | |
156 | %attr(755,root,root) %{_sbindir}/grub-mkimage | |
157 | %attr(755,root,root) %{_sbindir}/grub-install | |
158 | %attr(755,root,root) %{_sbindir}/grub-mkrescue | |
159 | %attr(755,root,root) %{_sbindir}/grub-editenv | |
160 | %attr(755,root,root) %{_sbindir}/grub-mkconfig | |
161 | %attr(755,root,root) %{_sbindir}/grub-mkelfimage | |
162 | %{_mandir}/man8/grub-dumpbios.8* | |
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* | |
169 | %if %{with grubemu} | |
170 | %attr(755,root,root) %{_sbindir}/grub-emu | |
171 | %{_mandir}/man8/grub-emu.8* | |
172 | %endif | |
173 | %config(noreplace) %verify(not md5 mtime size) %dir %{_datadir}/grub.cfg | |
174 | %dir %{_datadir} | |
175 | %{_datadir}/*-pc | |
176 | %attr(755,root,root) %{_legcdir}/*_lib | |
177 | %attr(755,root,root) %{_legcdir}/*.* | |
178 | %dir %{_confdir} | |
179 | %attr(755,root,root) %{_confdir}/00_header | |
180 | %attr(755,root,root) %{_confdir}/10_linux | |
181 | %attr(755,root,root) %{_confdir}/30_os-prober | |
182 | %attr(755,root,root) %{_confdir}/40_custom | |
183 | %doc %{_confdir}/README | |
184 | %ifarch %{ix86} %{x8664} | |
185 | %attr(755,root,root) %{_sbindir}/grub-mkdevicemap | |
186 | %attr(755,root,root) %{_sbindir}/grub-probe | |
187 | %attr(755,root,root) %{_sbindir}/grub-setup | |
188 | %{_mandir}/man8/grub-mkdevicemap.8* | |
189 | %{_mandir}/man8/grub-probe.8* | |
190 | %{_mandir}/man8/grub-setup.8* | |
191 | %endif |