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