source: projects/specs/branches/6/g/grub/grub-vl.spec @ 3970

Revision 3970, 8.0 KB checked in by daisuke, 13 years ago (diff)

grub: update to grub-fedora.git master (fedora-15)

Line 
1%define efi_support 0
2
3%ifarch %{ix86}
4%define _host_cpu i386
5%else
6%define _host_cpu %{_arch}
7%endif
8
9%define defshell defaultmenu.sh
10
11Summary: grub - a Multiboot boot loader.
12Summary(ja): grub - マルチブートローダ
13Name: grub
14Version: 0.97
15Release: 4%{?_dist_release}
16License: GPL
17Group: System Environment/Base
18URL: http://www.gnu.org/software/grub/
19
20Source0: ftp://alpha.gnu.org/gnu/grub/%{name}-%{version}.tar.gz
21Source1: %{defshell}
22
23# http://git.kernel.org/?p=boot/grub-fedora/grub-fedora.git;a=summary
24Patch1: grub-fedora-15.patch
25
26#Patch10: grub-0.97-prototypes.patch
27#Patch100: ext3_256byte_inode.diff
28#Patch110: grub-0.97-ext4-support.patch
29#Patch120: grub-0.97-build-id=none.patch
30#Patch130: grub-0.97-tinfo.patch
31
32ExclusiveArch: %{ix86} x86_64
33BuildRoot: %{_tmppath}/%{name}-%{version}-root
34Requires(post): install-info, sed, grep, coreutils
35Requires(preun): install-info
36Requires: mktemp
37BuildRequires: ncurses-devel >= 5.6
38BuildRequires: glibc-static
39%ifarch x86_64
40BuildRequires: compat32-glibc-devel
41BuildRequires: compat32-glibc-static
42%endif
43
44%description
45GNU GRUB is a Multiboot boot loader.
46It was derived from GRUB, GRand Unified Bootloader, which was
47originally designed and implemented by Erich Stefan Boleyn.
48
49Briefly, bootloader is the first software program that runs when
50a computer starts. It is responsible for loading and transferring
51control to the operating system kernel software (such as the Hurd
52or the Linux). The kernel, in turn, initializes the rest of the
53operating system (usually GNU).
54
55%description -l ja
56GNU GRUB はマルチブートローダです。
57この名前は GRand Unified Bootloader (壮大な 統一されたブート
58ローダ) に由来し、元来は Erich Stefan Boleyn によって、設計・
59実装されたものです。
60
61手短に言えば、ブートローダとはコンピュータが起動する際に最初
62に実行されるプログラムで、(Hurd や Linux のような) オペレー
63ティングシステムのカーネルをディスクから読み込んで制御を渡す
64作業を担当します。カーネルは、それを受けて、オペレーティング
65システムの他の部分 (通常は GNU) を初期化します。
66
67%prep
68%setup -q
69%patch1 -p1 -b .fedora
70#%patch10 -p1 -b .prototypes
71#%patch100 -p1 -b .ext3_256byte_inode
72#%patch110 -p1 -b .ext4
73#%patch120 -p1 -b .build-id
74#%patch130 -p1 -b .ncurses5
75
76# Modify grub to show the full version number
77sed -i 's/0\.97/%{version}-%{release}/' configure.in
78
79%build
80autoreconf
81autoconf
82GCCVERS=$(gcc --version | head -1 | cut -d\  -f3 | cut -d. -f1)
83CFLAGS="-Os -g -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused"
84if [ "$GCCVERS" == "4" ]; then
85  CFLAGS="$CFLAGS -Wno-pointer-sign"
86fi
87export CFLAGS
88
89%if %{efi_support}
90%configure --sbindir=/sbin \
91  --disable-auto-linux-mem-opt
92  --with-platform=efi
93%__make
94mv efi/grub.efi .
95make clean
96%endif
97
98CFLAGS="$CFLAGS -static"
99%configure --sbindir=/sbin \
100  --disable-auto-linux-mem-opt
101%__make
102
103
104%install
105rm -rf $RPM_BUILD_ROOT
106%makeinstall sbindir=${RPM_BUILD_ROOT}/sbin
107mkdir -p ${RPM_BUILD_ROOT}/boot/grub
108%if %{efi_support}
109mkdir -m 0755 -p ${RPM_BUILD_ROOT}/boot/efi/EFI/vine/
110install -m 755 grub.efi ${RPM_BUILD_ROOT}/boot/efi/EFI/vine/grub.efi
111%endif
112%{__install} -p -m 644 docs/menu.lst %{buildroot}%{_datadir}/grub/%{_host_cpu}-%{_target_vendor}
113%{__install} -p -m 744 %{SOURCE1} %{buildroot}%{_datadir}/grub/%{_host_cpu}-%{_target_vendor}
114
115# create compat links
116mkdir -p ${RPM_BUILD_ROOT}/%{_sbindir}
117for i in grub grub-install grub-set-default grub-md5-crypt grub-terminfo ;do
118  ln -sf ../../sbin/$i ${RPM_BUILD_ROOT}/%{_sbindir}/$i
119done
120mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}
121mv ${RPM_BUILD_ROOT}/%{_datadir}/grub ${RPM_BUILD_ROOT}/%{_libdir}/grub
122ln -sf ../%{_lib}/grub ${RPM_BUILD_ROOT}/%{_datadir}/grub
123
124rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir
125
126%clean
127rm -rf $RPM_BUILD_ROOT
128
129%post
130/sbin/install-info %{_infodir}/grub.info.gz %{_infodir}/dir
131/sbin/install-info %{_infodir}/multiboot.info.gz %{_infodir}/dir
132%{_datadir}/grub/%{_host_cpu}-%{_target_vendor}/%{defshell}
133
134%preun
135if [ $1 = 0 ]; then
136        /sbin/install-info --delete %{_infodir}/grub.info.gz %{_infodir}/dir
137        /sbin/install-info --delete %{_infodir}/multiboot.info.gz %{_infodir}/dir
138fi
139
140%files
141%defattr(-,root,root)
142%doc COPYING INSTALL README AUTHORS BUGS ChangeLog NEWS THANKS TODO MAINTENANCE
143/boot/grub
144%if %{efi_support}
145%attr(0755,root,root) /boot/efiu/EFI/vine
146%endif
147%{_syssbindir}/*
148%{_sbindir}/*
149%{_bindir}/*
150%{_datadir}/grub
151%{_libdir}/grub
152%{_infodir}/*.info*
153%{_mandir}/man*/*
154
155%changelog
156* Fri May 27 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-4
157- switch to grub-fedora.git to support new features (ext4/efi/...)
158
159* Wed Mar 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-3
160- add Patch110 to support ext4 filesystem
161- add Patch120 to build with current binutils
162- add Patch130 to build with ncurses-5.6
163- add R(post): install-info, grep, sed, coreutils
164- add R(preun): install-info
165- add BR: compat32-glibc-{devel,static} for x86_64
166- add BR: glibc-static
167
168* Wed Jan 21 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-2
169- add patch100 to support newer e2fsprogs
170
171* Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 0.97-1vl5
172- applied new versioning policy, spec in utf-8
173
174* Tue May 22 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-0vl8
175- fix _host_cpu trick
176
177* Tue May 22 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-0vl7
178- add x86_64 to ExclusiveArch:
179- add BuildRequires: compat32-glibc-devel for x86_64
180- add "-static" to CFLAGS for x86_64
181- use special CFLAGS
182- add Patch10 to run configure with new binutils
183
184* Thu Sep 07 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-0vl6
185- add PreReq: grep, sed for defaultmenu.sh
186
187* Tue Sep 5 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.97-0vl5
188- add initrd in menu.lst file created by defaultmenu.sh
189
190* Thu Jun 26 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.97-0vl4
191- fix date of previous changelog entry
192- escape macro of past changelog entries
193- change Source1: menu.lst.vine to defautmenu.sh
194- invoke defaultmenu.sh on %%post scriptlet
195
196* Thu Jun 21 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.97-0vl3
197- remove Requires: ncurses, gpm, bash
198
199* Thu May 12 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.97-0vl2
200- upstream release
201- add MAINTENANCE to %%doc
202- drop Patch0 (merged in upstream source)
203
204* Sun Mar 20 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.96-0vl3
205- savedefault patch from upstream CVS: http://savannah.gnu.org/cgi-bin/viewcvs/grub/grub/stage2/stage2.c.diff?r1=1.45&r2=1.46&diff_format=u
206  stage2/stage2.c (cmain): Initialize DEFAULT_FILE to an empty
207  string. Reported by NATORI Shin <natori@adm.s.u-tokyo.ac.jp>.
208
209* Sun Feb 20 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.96-0vl2
210- upstream release
211- drop Patch0 (merged)
212- added sample file /usr/lib/grub/i386-pc/menu.lst.vine
213- change installation destination of menu.lst from %%datadir to %%libdir
214
215* Wed Jan 19 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.95-0vl3
216- applied Patch0 from upstream CVS:
217  http://savannah.gnu.org/cgi-bin/viewcvs/grub/grub/util/grub-install.in.diff?r1=1.46&r2=1.47&diff_format=u
218  util/grub-install.in (convert): Fix the sed statement for
219  Linux. The expression was ambigious in some cases.
220
221* Wed Aug 18 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.95-0vl2
222- catch up to upstream release
223- delete %%_target_platform macro
224- delete gzip info files from %%install macro
225- add BuildRequires: ncurses-devel
226- add Requires: ncurses, gpm, mktemp, bash
227- add PreReq: install-info
228- %%configure with --disable-auto-linux-mem-opt option
229
230* Thu Jul 12 2001 <sagami@vinelinux.org>
231- 0.90-0vl1: %%configure with a trick for _host_cpu, %%makeinstall
232
233* Tue Apr 24 2001 <sagami@vinelinux.org>
234- 0.5.96-0vl1: use some macros
235
236* Wed Oct 11 2000 Yoshihiro Kajiki <kajiki@ylug.org> [0vl2]
237- build for Vine 2.1beta
238
239* Tue Oct 10 2000 Yoshihiro Kajiki <kajiki@ylug.org> [0vl1]
240- update to 0.5.95 and build for Vine 2.0
241- add Japanese summary and description
242- based on grub-0.5.94-2, Kondara Zoo
243
244* Sun Jun  4 2000 AYUHANA Tomonori <l@kondara.org>
245* /usr/doc/grub-*/menu.lst -> /usr/share/grub/i386-pc/menu.lst
246
247* Thu May 18 2000 AYUHANA Tomonori <l@kondara.org>
248- upgrade to 0.5.93.1 to 0.5.94
Note: See TracBrowser for help on using the repository browser.