]> git.pld-linux.org Git - packages/grub2.git/blob - grub2.spec
- efiemu32.o/efiemu64.o on x86_64 only
[packages/grub2.git] / grub2.spec
1 # Conditional build:
2 %bcond_with     static  # build static binaries
3 %bcond_without  grubemu # build grub-emu binary
4 #
5 Summary:        GRand Unified Bootloader
6 Summary(de.UTF-8):      GRUB2 - ein Bootloader für x86 und ppc
7 Summary(pl.UTF-8):      GRUB2 - bootloader dla x86 i ppc
8 Summary(pt_BR.UTF-8):   Gerenciador de inicialização GRUB2
9 Name:           grub2
10 Version:        1.97.1
11 Release:        4
12 License:        GPL v2
13 Group:          Base
14 # svn export svn://svn.sv.gnu.org/grub/trunk/grub2
15 #Source0:       %{name}-%{snap}.tar.bz2
16 Source0:        http://alpha.gnu.org/gnu/grub/grub-%{version}.tar.gz
17 # Source0-md5:  66fe18cd9318e3d67a34d7b7a8e7b1f6
18 Source1:        update-grub
19 Source2:        update-grub.8
20 Source3:        grub.sysconfig
21 URL:            http://www.gnu.org/software/grub/grub-2.en.html
22 BuildRequires:  autoconf >= 2.53
23 Patch0:         pld-initrd.patch
24 Patch1:         pld-sysconfdir.patch
25 Patch2:         grub-garbage.patch
26 Patch3:         grub-shelllib.patch
27 Patch4:         grub-install.in.patch
28 Patch5:         grub-lvmdevice.patch
29 BuildRequires:  automake
30 BuildRequires:  bison
31 BuildRequires:  gawk
32 BuildRequires:  libtool
33 BuildRequires:  texinfo
34 %ifarch %{ix86} %{x8664}
35 BuildRequires:  lzo-devel >= 1.0.2
36 %endif
37 %ifarch %{x8664}
38 BuildRequires:  /usr/lib/libc.so
39 BuildRequires:  gcc-multilib
40 %endif
41 BuildRequires:  ncurses-devel
42 BuildRequires:  sed >= 4.0
43 %if %{with static}
44 BuildRequires:  glibc-static
45 %ifarch %{ix86} %{x8664}
46 BuildRequires:  lzo-static
47 %endif
48 BuildRequires:  ncurses-static
49 %endif
50 BuildRequires:  rpmbuild(macros) >= 1.213
51 Provides:       bootloader
52 Conflicts:      grub
53 ExclusiveArch:  %{ix86} %{x8664} ppc sparc64
54 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56 %define         _sbindir        /sbin
57 %define         _bindir         %{_sbindir}
58 %define         _libdir         /boot
59 %define         _libexecdir     %{_libdir}/grub
60
61 %description
62 GRUB is a GPLed bootloader intended to unify bootloading across x86
63 operating systems. In addition to loading the Linux and *BSD kernels,
64 it implements the Multiboot standard, which allows for flexible
65 loading of multiple boot images (needed for modular kernels such as
66 the GNU Hurd).
67
68 GRUB 2 is derived from PUPA which was a research project to
69 investigate the next generation of GRUB. GRUB 2 has been rewritten
70 from scratch to clean up everything for modularity and portability.
71
72 GRUB 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
92 %description -l de.UTF-8
93 GRUB (GRand Unified Boot-loader) ist ein Bootloader, der oft auf
94 Rechnern eingesetzt wird, auf denen das freie Betriebssystem Linux
95 läuft. GRUB löst den betagten LILO (Linux-Loader) ab.
96
97 GRUB wurde innerhalb des GNU Hurd-Projektes als Boot-Loader entwickelt
98 und wird unter der GPL vertrieben. Aufgrund seiner höheren
99 Flexibilität verdrängt GRUB in vielen Linux-Distributionen den
100 traditionellen Boot-Loader LILO.
101
102 %description -l es.UTF-8
103 Éste es GRUB - Grand Unified Boot Loader - un administrador de
104 inicialización capaz de entrar en la mayoría de los sistemas
105 operacionales libres - Linux, FreeBSD, NetBSD, GNU Mach, etc. como
106 también en la mayoría de los sistemas operacionales comerciales para
107 PC.
108
109 El administrador GRUB puede ser una buena alternativa a LILO, para
110 usuarios conmás experiencia y que deseen obtener más recursos de su
111 cargador de inicialización (boot loader).
112
113 %description -l pl.UTF-8
114 GRUB jest bootloaderem na licencji GNU, mającym na celu unifikację
115 procesu bootowania na systemach x86. Potrafi nie tylko ładować jądra
116 Linuksa i *BSD: posiada również implementacje standardu Multiboot,
117 który pozwala na elastyczne ładowanie wielu obrazów bootowalnych
118 (czego wymagają modułowe jądra, takie jak GNU Hurd).
119
120 %description -l pt_BR.UTF-8
121 Esse é o GRUB - Grand Unified Boot Loader - um gerenciador de boot
122 capaz de entrar na maioria dos sistemas operacionais livres - Linux,
123 FreeBSD, NetBSD, GNU Mach, etc. assim como na maioria dos sistemas
124 operacionais comerciais para PC.
125
126 O GRUB pode ser uma boa alternativa ao LILO, para usuários mais
127 avançados e que querem mais recursos de seu boot loader.
128
129 %prep
130 %setup -q -n grub-%{version}
131 %patch0 -p1
132 %patch1 -p1
133 %patch2 -p1
134 %patch3 -p1
135 %patch4 -p1
136 %patch5 -p1
137
138 %build
139 cp -f /usr/share/automake/config.sub .
140 %{__libtoolize}
141 %{__aclocal}
142 %{__autoheader}
143 echo timestamp > stamp-h.in
144 %{__autoconf}
145 export CFLAGS="-Os %{?debug:-g}"
146
147 # mawk stalls at ./genmoddep.awk, so force gawk
148 AWK=gawk \
149 %configure \
150 %{!?without_grubemu:--enable-grub-emu} \
151         BUILD_CFLAGS="$CFLAGS"
152 %{__make} -j1 \
153         BUILD_CFLAGS="$CFLAGS" \
154 %if %{with static}
155 %ifarch %{ix86} %{x8664}
156         grub_setup_LDFLAGS="-s -static" \
157         grub_mkimage_LDFLAGS="-s -static -llzo" \
158 %else
159         grub_mkimage_LDFLAGS="-s -static" \
160 %endif
161         grub_emu_LDFLAGS="-s -static -lncurses -ltinfo" \
162 %endif
163         pkgdatadir=%{_libexecdir} \
164         pkglibdir=%{_libexecdir}
165
166 %install
167 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT/etc/sysconfig
169
170 %{__make} install \
171         pkgdatadir=%{_libexecdir} \
172         pkglibdir=%{_libexecdir} \
173         DESTDIR=$RPM_BUILD_ROOT
174
175 cp -a docs/grub.cfg $RPM_BUILD_ROOT%{_libexecdir}
176 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/update-grub
177 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8/update-grub.8
178 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/grub
179 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
180 # deprecated. we don't need it
181 rm $RPM_BUILD_ROOT/lib/update-grub_lib
182
183 # no junk to /boot/grub (put to -devel?)
184 rm $RPM_BUILD_ROOT%{_libexecdir}/*.h
185 rm $RPM_BUILD_ROOT%{_libexecdir}/*.mk
186
187 # core.img - bootable image generated by grub-mkimage(1) via grub-install(1)
188 touch $RPM_BUILD_ROOT%{_libexecdir}/core.img
189 touch $RPM_BUILD_ROOT%{_libexecdir}/device.map
190
191 %clean
192 rm -rf $RPM_BUILD_ROOT
193
194 %post -p %{_sbindir}/postshell
195 -/usr/sbin/fix-info-dir -c %{_infodir}
196
197 %postun -p %{_sbindir}/postshell
198 -/usr/sbin/fix-info-dir -c %{_infodir}
199
200 %files
201 %defattr(644,root,root,755)
202 %doc AUTHORS ChangeLog NEWS README THANKS TODO
203 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/grub
204 %attr(755,root,root) %{_sbindir}/grub-fstest
205 %attr(755,root,root) %{_sbindir}/grub-install
206 %attr(755,root,root) %{_sbindir}/grub-mkfont
207 %attr(755,root,root) %{_sbindir}/grub-mkrescue
208 %attr(755,root,root) %{_sbindir}/grub-editenv
209 %attr(755,root,root) %{_sbindir}/grub-mkconfig
210 %attr(755,root,root) %{_sbindir}/grub-mkelfimage
211 %attr(755,root,root) %{_sbindir}/update-grub
212 %ifarch %{ix86} %{x8664}
213 %attr(755,root,root) %{_sbindir}/grub-mkimage
214 %{_mandir}/man1/grub-mkimage.1*
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
221 %{_mandir}/man1/grub-fstest.1*
222 %{_mandir}/man1/grub-mkfont.1*
223 %{_mandir}/man1/grub-mkrescue.1*
224 %{_mandir}/man1/grub-editenv.1*
225 %{_mandir}/man8/grub-mkconfig.8*
226 %{_mandir}/man1/grub-mkelfimage.1*
227 %{_mandir}/man8/update-grub.8*
228 %if %{with grubemu}
229 %attr(755,root,root) %{_sbindir}/grub-emu
230 %{_mandir}/man8/grub-emu.8*
231 %endif
232 /lib/grub-mkconfig_lib
233
234 %dir %{_libexecdir}
235 %config(noreplace) %verify(not md5 mtime size) %{_libexecdir}/grub.cfg
236 %{_libexecdir}/*.lst
237 %{_libexecdir}/*.mod
238 %ifarch %{x8664}
239 %{_libexecdir}/efiemu*.o
240 %endif
241 %ifarch %{ix86} %{x8664} sparc sparc64
242 %{_libexecdir}/boot.img
243 %{_libexecdir}/cdboot.img
244 %{_libexecdir}/diskboot.img
245 %{_libexecdir}/kernel.img
246 %{_libexecdir}/lnxboot.img
247 %{_libexecdir}/pxeboot.img
248 %endif
249
250 # generated by grub at runtime
251 %ghost %{_libexecdir}/device.map
252 %ghost %{_libexecdir}/core.img
253
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
259 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/grub.d/40_custom
260
261 %ifarch %{ix86} %{x8664}
262 %attr(755,root,root) %{_sbindir}/grub-mkdevicemap
263 %attr(755,root,root) %{_sbindir}/grub-probe
264 %attr(755,root,root) %{_sbindir}/grub-setup
265 %{_mandir}/man8/grub-mkdevicemap.8*
266 %{_mandir}/man8/grub-probe.8*
267 %{_mandir}/man8/grub-setup.8*
268 %endif
269
270 %{_infodir}/grub*.info*
This page took 0.08655 seconds and 4 git commands to generate.