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