]> git.pld-linux.org Git - packages/grub2.git/blob - grub2.spec
- find pld initrd images with grub-install; rel 2
[packages/grub2.git] / grub2.spec
1 # TODO:
2 #  - rewrite summary/desc ? GRUB2 has nothing to see with GRUB
3 #
4 # Conditional build:
5 %bcond_with     static  # build static binaries
6 %bcond_without  grubemu # build grub-emu binary
7 #
8 Summary:        GRand Unified Bootloader
9 Summary(de.UTF-8):      GRUB2 - ein Bootloader für x86 und ppc
10 Summary(pl.UTF-8):      GRUB2 - bootloader dla x86 i ppc
11 Summary(pt_BR.UTF-8):   Gerenciador de inicialização GRUB2
12 Name:           grub2
13 Version:        1.97.1
14 Release:        2
15 License:        GPL v2
16 Group:          Base
17 # svn export svn://svn.sv.gnu.org/grub/trunk/grub2
18 #Source0:       %{name}-%{snap}.tar.bz2
19 Source0:        http://alpha.gnu.org/gnu/grub/grub-%{version}.tar.gz
20 # Source0-md5:  66fe18cd9318e3d67a34d7b7a8e7b1f6
21 URL:            http://www.gnu.org/software/grub/grub-2.en.html
22 BuildRequires:  autoconf >= 2.53
23 Patch0:         pld-initrd.patch
24 BuildRequires:  automake
25 BuildRequires:  bison
26 BuildRequires:  gawk
27 BuildRequires:  libtool
28 %ifarch %{ix86} %{x8664}
29 BuildRequires:  lzo-devel >= 1.0.2
30 %endif
31 %ifarch %{x8664}
32 BuildRequires:  /usr/lib/libc.so
33 BuildRequires:  gcc-multilib
34 %endif
35 BuildRequires:  ncurses-devel
36 BuildRequires:  sed >= 4.0
37 %if %{with static}
38 BuildRequires:  glibc-static
39 %ifarch %{ix86} %{x8664}
40 BuildRequires:  lzo-static
41 %endif
42 BuildRequires:  ncurses-static
43 %endif
44 BuildRequires:  rpmbuild(macros) >= 1.213
45 Provides:       bootloader
46 Conflicts:      grub
47 ExclusiveArch:  %{ix86} %{x8664} ppc sparc64
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %define         _sbindir        /sbin
51 %define         _bindir         %{_sbindir}
52 %define         _libdir         /boot
53 %define         _datadir        %{_libdir}/grub
54 %define         _legcdir        %{_libdir}/grub
55 %define         _confdir        /etc/grub.d/
56
57 %description
58 GRUB is a GPLed bootloader intended to unify bootloading across x86
59 operating systems. In addition to loading the Linux and *BSD kernels,
60 it implements the Multiboot standard, which allows for flexible
61 loading of multiple boot images (needed for modular kernels such as
62 the GNU Hurd).
63
64 %description -l de.UTF-8
65 GRUB (GRand Unified Boot-loader) ist ein Bootloader, der oft auf
66 Rechnern eingesetzt wird, auf denen das freie Betriebssystem Linux
67 läuft. GRUB löst den betagten LILO (Linux-Loader) ab.
68
69 GRUB wurde innerhalb des GNU Hurd-Projektes als Boot-Loader entwickelt
70 und wird unter der GPL vertrieben. Aufgrund seiner höheren
71 Flexibilität verdrängt GRUB in vielen Linux-Distributionen den
72 traditionellen Boot-Loader LILO.
73
74 %description -l es.UTF-8
75 Éste es GRUB - Grand Unified Boot Loader - un administrador de
76 inicialización capaz de entrar en la mayoría de los sistemas
77 operacionales libres - Linux, FreeBSD, NetBSD, GNU Mach, etc. como
78 también en la mayoría de los sistemas operacionales comerciales para
79 PC.
80
81 El administrador GRUB puede ser una buena alternativa a LILO, para
82 usuarios conmás experiencia y que deseen obtener más recursos de su
83 cargador de inicialización (boot loader).
84
85 %description -l pl.UTF-8
86 GRUB jest bootloaderem na licencji GNU, mającym na celu unifikację
87 procesu bootowania na systemach x86. Potrafi nie tylko ładować jądra
88 Linuksa i *BSD: posiada również implementacje standardu Multiboot,
89 który pozwala na elastyczne ładowanie wielu obrazów bootowalnych
90 (czego wymagają modułowe jądra, takie jak GNU Hurd).
91
92 %description -l pt_BR.UTF-8
93 Esse é o GRUB - Grand Unified Boot Loader - um gerenciador de boot
94 capaz de entrar na maioria dos sistemas operacionais livres - Linux,
95 FreeBSD, NetBSD, GNU Mach, etc. assim como na maioria dos sistemas
96 operacionais comerciais para PC.
97
98 O GRUB pode ser uma boa alternativa ao LILO, para usuários mais
99 avançados e que querem mais recursos de seu boot loader.
100
101 %prep
102 %setup -q -n grub-%{version}
103 %patch0 -p1
104
105 %build
106 cp -f /usr/share/automake/config.sub .
107 %{__libtoolize}
108 %{__aclocal}
109 %{__autoheader}
110 echo timestamp > stamp-h.in
111 %{__autoconf}
112 #for rmk in conf/*.rmk; do
113 #  ruby genmk.rb < $rmk > `echo $rmk | sed 's/\.rmk$/.mk/'`
114 #done
115 export CFLAGS="-Os %{?debug:-g}"
116
117 # mawk stalls at ./genmoddep.awk, so force gawk
118 AWK=gawk \
119 %configure \
120 %{!?_without_grubemu:--enable-grub-emu}\
121         BUILD_CFLAGS="$CFLAGS"
122 %{__make} -j1 \
123         BUILD_CFLAGS="$CFLAGS" \
124 %if %{with static}
125 %ifarch %{ix86} %{x8664}
126         grub_setup_LDFLAGS="-s -static" \
127         grub_mkimage_LDFLAGS="-s -static -llzo" \
128 %else
129         grub_mkimage_LDFLAGS="-s -static" \
130 %endif
131         grub_emu_LDFLAGS="-s -static -lncurses -ltinfo" \
132 %endif
133         pkgdatadir="%{_datadir}"
134
135 %install
136 rm -rf $RPM_BUILD_ROOT
137
138 %{__make} install \
139         DESTDIR=$RPM_BUILD_ROOT \
140         pkgdatadir="%{_datadir}"
141
142 cp -a docs/grub.cfg $RPM_BUILD_ROOT%{_datadir}
143 rm $RPM_BUILD_ROOT%{_infodir}/dir
144
145 %clean
146 rm -rf $RPM_BUILD_ROOT
147
148 %post -p %{_sbindir}/postshell
149 -/usr/sbin/fix-info-dir -c %{_infodir}
150
151 %postun -p %{_sbindir}/postshell
152 -/usr/sbin/fix-info-dir -c %{_infodir}
153
154 %files
155 %defattr(644,root,root,755)
156 %doc AUTHORS ChangeLog NEWS README THANKS TODO
157 %attr(755,root,root) %{_sbindir}/grub-fstest
158 %attr(755,root,root) %{_sbindir}/grub-install
159 %attr(755,root,root) %{_sbindir}/grub-mkfont
160 %attr(755,root,root) %{_sbindir}/grub-mkrescue
161 %attr(755,root,root) %{_sbindir}/grub-editenv
162 %attr(755,root,root) %{_sbindir}/grub-mkconfig
163 %attr(755,root,root) %{_sbindir}/grub-mkelfimage
164 %ifarch %{ix86} %{x8664}
165 %attr(755,root,root) %{_sbindir}/grub-mkimage
166 %{_mandir}/man1/grub-mkimage.1*
167 %else
168 %attr(755,root,root) %{_sbindir}/grub-probe
169 %attr(755,root,root) %{_sbindir}/grub-mkdevicemap
170 %{_mandir}/man8/grub-probe.8*
171 %{_mandir}/man8/grub-mkdevicemap.8*
172 %endif
173 %{_mandir}/man1/grub-fstest.1*
174 %{_mandir}/man1/grub-mkfont.1*
175 %{_mandir}/man1/grub-mkrescue.1*
176 %{_mandir}/man1/grub-editenv.1*
177 %{_mandir}/man8/grub-mkconfig.8*
178 %{_mandir}/man1/grub-mkelfimage.1*
179 %if %{with grubemu}
180 %attr(755,root,root) %{_sbindir}/grub-emu
181 %{_mandir}/man8/grub-emu.8*
182 %endif
183 %config(noreplace) %verify(not md5 mtime size) %dir %{_datadir}/grub.cfg
184 %dir %{_datadir}
185 %ifarch %{ix86} %{x8664}
186 %{_datadir}/i386-pc
187 %endif
188 %ifarch ppc ppc64
189 %{_datadir}/powerpc-*
190 %endif
191 %attr(755,root,root) %{_legcdir}/*_lib
192 %dir %{_confdir}
193 %attr(755,root,root) %{_confdir}/00_header
194 %attr(755,root,root) %{_confdir}/10_linux
195 %attr(755,root,root) %{_confdir}/30_os-prober
196 %attr(755,root,root) %{_confdir}/40_custom
197 %doc %{_confdir}/README
198 %ifarch %{ix86} %{x8664}
199 %attr(755,root,root) %{_sbindir}/grub-mkdevicemap
200 %attr(755,root,root) %{_sbindir}/grub-probe
201 %attr(755,root,root) %{_sbindir}/grub-setup
202 %{_mandir}/man8/grub-mkdevicemap.8*
203 %{_mandir}/man8/grub-probe.8*
204 %{_mandir}/man8/grub-setup.8*
205 %endif
206 %{_infodir}/grub*.info*
This page took 0.045486 seconds and 3 git commands to generate.