]> git.pld-linux.org Git - packages/grub2.git/blob - grub2.spec
- include grub-mkrelpath
[packages/grub2.git] / grub2.spec
1 #
2 # TODO
3 # - subpackages? e.g. modules and utils
4 #
5 # Conditional build:
6 %bcond_with     static  # build static binaries
7 %bcond_without  grubemu # build grub-emu binary
8 #
9 Summary:        GRand Unified Bootloader
10 Summary(de.UTF-8):      GRUB2 - ein Bootloader für x86 und ppc
11 Summary(hu.UTF-8):      GRUB2 - rendszerbetöltő x86 és ppc gépekhez
12 Summary(pl.UTF-8):      GRUB2 - bootloader dla x86 i ppc
13 Summary(pt_BR.UTF-8):   Gerenciador de inicialização GRUB2
14 Name:           grub2
15 Version:        1.98
16 Release:        0.2
17 License:        GPL v2
18 Group:          Base
19 Source0:        http://alpha.gnu.org/gnu/grub/grub-%{version}.tar.gz
20 # Source0-md5:  c0bcf60e524739bb64e3a2d4e3732a59
21 Source1:        update-grub
22 Source2:        update-grub.8
23 Source3:        grub.sysconfig
24 Source4:        grub-custom.cfg
25 URL:            http://www.gnu.org/software/grub/grub-2.en.html
26 BuildRequires:  autoconf >= 2.53
27 Patch0:         pld-initrd.patch
28 Patch1:         pld-sysconfdir.patch
29 Patch2:         grub-garbage.patch
30 Patch3:         grub-shelllib.patch
31 Patch4:         grub-install.in.patch
32 Patch5:         grub-lvmdevice.patch
33 Patch6:         pld-mkconfigdir.patch
34 Patch7:         grub-mkconfig-diagnostics.patch
35 BuildRequires:  automake
36 BuildRequires:  bison
37 BuildRequires:  gawk
38 BuildRequires:  help2man
39 BuildRequires:  libtool
40 BuildRequires:  texinfo
41 %ifarch %{ix86} %{x8664}
42 BuildRequires:  lzo-devel >= 1.0.2
43 %endif
44 %ifarch %{x8664}
45 BuildRequires:  /usr/lib/libc.so
46 %if "%{pld_release}" == "ac"
47 BuildRequires:  libgcc32
48 %else
49 BuildRequires:  gcc-multilib
50 %endif
51 %endif
52 BuildRequires:  ncurses-devel
53 BuildRequires:  sed >= 4.0
54 %if %{with static}
55 BuildRequires:  glibc-static
56 %ifarch %{ix86} %{x8664}
57 BuildRequires:  lzo-static
58 %endif
59 BuildRequires:  ncurses-static
60 %endif
61 BuildRequires:  rpm >= 4.4.9-56
62 BuildRequires:  rpmbuild(macros) >= 1.213
63 Provides:       bootloader
64 Conflicts:      grub
65 ExclusiveArch:  %{ix86} %{x8664} ppc sparc64
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %define         _sbindir        /sbin
69 %define         _bindir         %{_sbindir}
70 %define         _libdir         /boot
71 %define         _libexecdir     %{_libdir}/grub
72
73 %description
74 GRUB is a GPLed bootloader intended to unify bootloading across x86
75 operating systems. In addition to loading the Linux and *BSD kernels,
76 it implements the Multiboot standard, which allows for flexible
77 loading of multiple boot images (needed for modular kernels such as
78 the GNU Hurd).
79
80 GRUB 2 is derived from PUPA which was a research project to
81 investigate the next generation of GRUB. GRUB 2 has been rewritten
82 from scratch to clean up everything for modularity and portability.
83
84 GRUB 2 targets at the following goals:
85 - Scripting support, such as conditionals, loops, variables and
86   functions.
87 - Graphical interface.
88 - Dynamic loading of modules in order to extend itself at the run time
89   rather than at the build time.
90 - Portability for various architectures.
91 - Internationalization. This includes support for non-ASCII character
92   code, message catalogs like gettext, fonts, graphics console, and so
93   on.
94 - Real memory management, to make GNU GRUB more extensible.
95 - Modular, hierarchical, object-oriented framework for file systems,
96   files, devices, drives, terminals, commands, partition tables and OS
97   loaders.
98 - Cross-platform installation which allows for installing GRUB from a
99   different architecture.
100 - Rescue mode saves unbootable cases. Stage 1.5 was eliminated.
101 - Fix design mistakes in GRUB Legacy, which could not be solved for
102   backward-compatibility, such as the way of numbering partitions.
103
104 %description -l de.UTF-8
105 GRUB (GRand Unified Boot-loader) ist ein Bootloader, der oft auf
106 Rechnern eingesetzt wird, auf denen das freie Betriebssystem Linux
107 läuft. GRUB löst den betagten LILO (Linux-Loader) ab.
108
109 GRUB wurde innerhalb des GNU Hurd-Projektes als Boot-Loader entwickelt
110 und wird unter der GPL vertrieben. Aufgrund seiner höheren
111 Flexibilität verdrängt GRUB in vielen Linux-Distributionen den
112 traditionellen Boot-Loader LILO.
113
114 %description -l hu.UTF-8
115 GRUB egy GPL liszenszű rendszerbetöltő. Linux és *BSD kernelek
116 betöltése mellett támogatja a Multiboot standard-ot, amely lehetővé
117 teszi boot képek betöltését (moduláris kerneleknek kell, mint pl. a
118 GNU Hurd).
119
120 GRUB2 céljai a következők:
121 - szkriptelés támogatása, úgymint feltételek, ciklusok, változók,
122   függvények.
123 - grafikus felület
124 - modulok dinamikus betöltése futási időben
125 - hordozhatóság több architektúrára
126 - többnyelvűség: nem-ASCII karakterek támogatása, üzenetkatalógusok,
127   mint gettext, betűtípusok, grafikus konzolon, és így tovább
128 - valós memória kezelés, amellyel még bővíthetőbbé tehetjük
129 - moduláris, hierarchikus, objektum-orientált keretrendszer
130   fájlrendszerekhez, fájlokhoz, eszközökhöz, meghajtókhoz,
131   terminálokhoz, parancsokhoz, partíciós táblákhoz és OS betöltőkhöz
132
133 %description -l es.UTF-8
134 Éste es GRUB - Grand Unified Boot Loader - un administrador de
135 inicialización capaz de entrar en la mayoría de los sistemas
136 operacionales libres - Linux, FreeBSD, NetBSD, GNU Mach, etc. como
137 también en la mayoría de los sistemas operacionales comerciales para
138 PC.
139
140 El administrador GRUB puede ser una buena alternativa a LILO, para
141 usuarios conmás experiencia y que deseen obtener más recursos de su
142 cargador de inicialización (boot loader).
143
144 %description -l pl.UTF-8
145 GRUB jest bootloaderem na licencji GNU, mającym na celu unifikację
146 procesu bootowania na systemach x86. Potrafi nie tylko ładować jądra
147 Linuksa i *BSD: posiada również implementacje standardu Multiboot,
148 który pozwala na elastyczne ładowanie wielu obrazów bootowalnych
149 (czego wymagają modułowe jądra, takie jak GNU Hurd).
150
151 %description -l pt_BR.UTF-8
152 Esse é o GRUB - Grand Unified Boot Loader - um gerenciador de boot
153 capaz de entrar na maioria dos sistemas operacionais livres - Linux,
154 FreeBSD, NetBSD, GNU Mach, etc. assim como na maioria dos sistemas
155 operacionais comerciais para PC.
156
157 O GRUB pode ser uma boa alternativa ao LILO, para usuários mais
158 avançados e que querem mais recursos de seu boot loader.
159
160 %prep
161 %setup -q -n grub-%{version}
162 %patch0 -p1
163 %patch1 -p1
164 %patch2 -p1
165 %patch3 -p1
166 %patch4 -p1
167 %patch5 -p1
168 %patch6 -p1
169 %patch7 -p1
170
171 %build
172 cp -f /usr/share/automake/config.sub .
173 %{__libtoolize}
174 %{__aclocal}
175 %{__autoheader}
176 echo timestamp > stamp-h.in
177 %{__autoconf}
178 export CFLAGS="-Os %{?debug:-g}"
179
180 # mawk stalls at ./genmoddep.awk, so force gawk
181 AWK=gawk \
182 %configure \
183 %if %{with grubemu}
184         --enable-grub-emu-usb \
185         --enable-grub-emu-sdl \
186         --enable-grub-emu-pci \
187 %endif
188         BUILD_CFLAGS="$CFLAGS"
189 %{__make} -j1 \
190         BUILD_CFLAGS="$CFLAGS" \
191 %if %{with static}
192 %ifarch %{ix86} %{x8664}
193         grub_setup_LDFLAGS="-s -static" \
194         grub_mkimage_LDFLAGS="-s -static -llzo" \
195 %else
196         grub_mkimage_LDFLAGS="-s -static" \
197 %endif
198         grub_emu_LDFLAGS="-s -static -lncurses -ltinfo" \
199 %endif
200         pkgdatadir=%{_libexecdir} \
201         pkglibdir=%{_libexecdir}
202
203 %install
204 rm -rf $RPM_BUILD_ROOT
205 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{_sysconfdir}/grub.d}
206
207 %{__make} install \
208         pkgdatadir=%{_libexecdir} \
209         pkglibdir=%{_libexecdir} \
210         DESTDIR=$RPM_BUILD_ROOT
211
212 cp -a docs/grub.cfg $RPM_BUILD_ROOT%{_libexecdir}
213 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/update-grub
214 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8/update-grub.8
215 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/grub
216 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/grub.d/custom.cfg
217 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
218
219 # deprecated. we don't need it
220 rm $RPM_BUILD_ROOT/lib/update-grub_lib
221
222 # no junk to /boot/grub (put to -devel?)
223 rm $RPM_BUILD_ROOT%{_libexecdir}/*.h
224 rm $RPM_BUILD_ROOT%{_libexecdir}/*.mk
225
226 # core.img - bootable image generated by grub-mkimage(1) via grub-install(1)
227 touch $RPM_BUILD_ROOT%{_libexecdir}/core.img
228 touch $RPM_BUILD_ROOT%{_libexecdir}/device.map
229
230 %clean
231 rm -rf $RPM_BUILD_ROOT
232
233 %post -p %{_sbindir}/postshell
234 -/usr/sbin/fix-info-dir -c %{_infodir}
235
236 %postun -p %{_sbindir}/postshell
237 -/usr/sbin/fix-info-dir -c %{_infodir}
238
239 %files
240 %defattr(644,root,root,755)
241 %doc AUTHORS ChangeLog NEWS README THANKS TODO
242 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/grub
243 %attr(755,root,root) %{_sbindir}/grub-fstest
244 %attr(755,root,root) %{_sbindir}/grub-install
245 %attr(755,root,root) %{_sbindir}/grub-mkfont
246 %attr(755,root,root) %{_sbindir}/grub-mkrescue
247 %attr(755,root,root) %{_sbindir}/grub-mkrelpath
248 %attr(755,root,root) %{_sbindir}/grub-editenv
249 %attr(755,root,root) %{_sbindir}/grub-mkconfig
250 %attr(755,root,root) %{_sbindir}/grub-mkelfimage
251 %attr(755,root,root) %{_sbindir}/update-grub
252 %ifarch %{ix86} %{x8664}
253 %attr(755,root,root) %{_sbindir}/grub-mkimage
254 %{_mandir}/man1/grub-mkimage.1*
255 %else
256 %attr(755,root,root) %{_sbindir}/grub-probe
257 %attr(755,root,root) %{_sbindir}/grub-mkdevicemap
258 %{_mandir}/man8/grub-probe.8*
259 %{_mandir}/man8/grub-mkdevicemap.8*
260 %endif
261 %{_mandir}/man1/grub-fstest.1*
262 %{_mandir}/man1/grub-mkfont.1*
263 %{_mandir}/man1/grub-mkrescue.1*
264 %{_mandir}/man1/grub-mkrelpath.1*
265 %{_mandir}/man1/grub-editenv.1*
266 %{_mandir}/man8/grub-mkconfig.8*
267 %{_mandir}/man1/grub-mkelfimage.1*
268 %{_mandir}/man8/update-grub.8*
269 %if %{with grubemu}
270 #%attr(755,root,root) %{_sbindir}/grub-emu
271 #%{_mandir}/man8/grub-emu.8*
272 %endif
273 /lib/grub-mkconfig_lib
274
275 %dir %{_libexecdir}
276 %config(noreplace) %verify(not md5 mtime size) %{_libexecdir}/grub.cfg
277 %{_libexecdir}/*.lst
278 %{_libexecdir}/*.mod
279 %ifarch %{x8664}
280 %{_libexecdir}/efiemu*.o
281 %endif
282 %ifarch %{ix86} %{x8664} sparc sparc64
283 %{_libexecdir}/boot.img
284 %{_libexecdir}/cdboot.img
285 %{_libexecdir}/diskboot.img
286 %{_libexecdir}/kernel.img
287 %{_libexecdir}/lnxboot.img
288 %{_libexecdir}/pxeboot.img
289 %endif
290
291 # generated by grub at runtime
292 %ghost %{_libexecdir}/device.map
293 %ghost %{_libexecdir}/core.img
294
295 %dir /lib/grub.d
296 %doc /lib/grub.d/README
297 %attr(755,root,root) /lib/grub.d/00_header
298 %attr(755,root,root) /lib/grub.d/10_linux
299 %attr(755,root,root) /lib/grub.d/30_os-prober
300 %attr(755,root,root) /lib/grub.d/40_custom
301
302 %dir %attr(750,root,root) /etc/grub.d
303 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/grub.d/custom.cfg
304
305 %ifarch %{ix86} %{x8664}
306 %attr(755,root,root) %{_sbindir}/grub-mkdevicemap
307 %attr(755,root,root) %{_sbindir}/grub-probe
308 %attr(755,root,root) %{_sbindir}/grub-setup
309 %{_mandir}/man8/grub-mkdevicemap.8*
310 %{_mandir}/man8/grub-probe.8*
311 %{_mandir}/man8/grub-setup.8*
312 %endif
313
314 %{_infodir}/grub*.info*
This page took 0.04348 seconds and 3 git commands to generate.