source: projects/specs/trunk/g/grub/grub-vl.spec @ 12210

Revision 12210, 9.3 KB checked in by tomop, 5 years ago (diff)

grub-0.97-7

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