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