[3970] | 1 | %define efi_support 0 |
---|
| 2 | |
---|
[521] | 3 | %ifarch %{ix86} |
---|
| 4 | %define _host_cpu i386 |
---|
| 5 | %else |
---|
| 6 | %define _host_cpu %{_arch} |
---|
| 7 | %endif |
---|
| 8 | |
---|
| 9 | %define defshell defaultmenu.sh |
---|
| 10 | |
---|
| 11 | Summary: grub - a Multiboot boot loader. |
---|
| 12 | Summary(ja): grub - マルチブートローダ |
---|
| 13 | Name: grub |
---|
| 14 | Version: 0.97 |
---|
[3970] | 15 | Release: 4%{?_dist_release} |
---|
[521] | 16 | License: GPL |
---|
| 17 | Group: System Environment/Base |
---|
| 18 | URL: http://www.gnu.org/software/grub/ |
---|
| 19 | |
---|
| 20 | Source0: ftp://alpha.gnu.org/gnu/grub/%{name}-%{version}.tar.gz |
---|
| 21 | Source1: %{defshell} |
---|
| 22 | |
---|
[3970] | 23 | # http://git.kernel.org/?p=boot/grub-fedora/grub-fedora.git;a=summary |
---|
| 24 | Patch1: grub-fedora-15.patch |
---|
[521] | 25 | |
---|
[3970] | 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 | |
---|
[521] | 32 | ExclusiveArch: %{ix86} x86_64 |
---|
| 33 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
[3083] | 34 | Requires(post): install-info, sed, grep, coreutils |
---|
| 35 | Requires(preun): install-info |
---|
[521] | 36 | Requires: mktemp |
---|
[3083] | 37 | BuildRequires: ncurses-devel >= 5.6 |
---|
| 38 | BuildRequires: glibc-static |
---|
[521] | 39 | %ifarch x86_64 |
---|
| 40 | BuildRequires: compat32-glibc-devel |
---|
[3083] | 41 | BuildRequires: compat32-glibc-static |
---|
[521] | 42 | %endif |
---|
| 43 | |
---|
| 44 | %description |
---|
| 45 | GNU GRUB is a Multiboot boot loader. |
---|
| 46 | It was derived from GRUB, GRand Unified Bootloader, which was |
---|
| 47 | originally designed and implemented by Erich Stefan Boleyn. |
---|
| 48 | |
---|
| 49 | Briefly, bootloader is the first software program that runs when |
---|
| 50 | a computer starts. It is responsible for loading and transferring |
---|
| 51 | control to the operating system kernel software (such as the Hurd |
---|
| 52 | or the Linux). The kernel, in turn, initializes the rest of the |
---|
| 53 | operating system (usually GNU). |
---|
| 54 | |
---|
| 55 | %description -l ja |
---|
| 56 | GNU 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 |
---|
[3970] | 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 |
---|
[521] | 75 | |
---|
[3970] | 76 | # Modify grub to show the full version number |
---|
| 77 | sed -i 's/0\.97/%{version}-%{release}/' configure.in |
---|
| 78 | |
---|
[521] | 79 | %build |
---|
[3970] | 80 | autoreconf |
---|
| 81 | autoconf |
---|
[521] | 82 | GCCVERS=$(gcc --version | head -1 | cut -d\ -f3 | cut -d. -f1) |
---|
[3970] | 83 | CFLAGS="-Os -g -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused" |
---|
[521] | 84 | if [ "$GCCVERS" == "4" ]; then |
---|
| 85 | CFLAGS="$CFLAGS -Wno-pointer-sign" |
---|
| 86 | fi |
---|
| 87 | export CFLAGS |
---|
[3970] | 88 | |
---|
| 89 | %if %{efi_support} |
---|
| 90 | %configure --sbindir=/sbin \ |
---|
| 91 | --disable-auto-linux-mem-opt |
---|
| 92 | --with-platform=efi |
---|
[521] | 93 | %__make |
---|
[3970] | 94 | mv efi/grub.efi . |
---|
| 95 | make clean |
---|
| 96 | %endif |
---|
[521] | 97 | |
---|
[3970] | 98 | CFLAGS="$CFLAGS -static" |
---|
| 99 | %configure --sbindir=/sbin \ |
---|
| 100 | --disable-auto-linux-mem-opt |
---|
| 101 | %__make |
---|
| 102 | |
---|
| 103 | |
---|
[521] | 104 | %install |
---|
| 105 | rm -rf $RPM_BUILD_ROOT |
---|
[3970] | 106 | %makeinstall sbindir=${RPM_BUILD_ROOT}/sbin |
---|
| 107 | mkdir -p ${RPM_BUILD_ROOT}/boot/grub |
---|
| 108 | %if %{efi_support} |
---|
| 109 | mkdir -m 0755 -p ${RPM_BUILD_ROOT}/boot/efi/EFI/vine/ |
---|
| 110 | install -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} |
---|
[521] | 114 | |
---|
[3970] | 115 | # create compat links |
---|
| 116 | mkdir -p ${RPM_BUILD_ROOT}/%{_sbindir} |
---|
| 117 | for i in grub grub-install grub-set-default grub-md5-crypt grub-terminfo ;do |
---|
| 118 | ln -sf ../../sbin/$i ${RPM_BUILD_ROOT}/%{_sbindir}/$i |
---|
| 119 | done |
---|
| 120 | mkdir -p ${RPM_BUILD_ROOT}/%{_libdir} |
---|
| 121 | mv ${RPM_BUILD_ROOT}/%{_datadir}/grub ${RPM_BUILD_ROOT}/%{_libdir}/grub |
---|
| 122 | ln -sf ../%{_lib}/grub ${RPM_BUILD_ROOT}/%{_datadir}/grub |
---|
| 123 | |
---|
| 124 | rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir |
---|
| 125 | |
---|
[521] | 126 | %clean |
---|
| 127 | rm -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 |
---|
[3970] | 132 | %{_datadir}/grub/%{_host_cpu}-%{_target_vendor}/%{defshell} |
---|
[521] | 133 | |
---|
| 134 | %preun |
---|
| 135 | if [ $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 |
---|
| 138 | fi |
---|
| 139 | |
---|
| 140 | %files |
---|
| 141 | %defattr(-,root,root) |
---|
| 142 | %doc COPYING INSTALL README AUTHORS BUGS ChangeLog NEWS THANKS TODO MAINTENANCE |
---|
[3970] | 143 | /boot/grub |
---|
| 144 | %if %{efi_support} |
---|
| 145 | %attr(0755,root,root) /boot/efiu/EFI/vine |
---|
| 146 | %endif |
---|
| 147 | %{_syssbindir}/* |
---|
| 148 | %{_sbindir}/* |
---|
[521] | 149 | %{_bindir}/* |
---|
[3970] | 150 | %{_datadir}/grub |
---|
[521] | 151 | %{_libdir}/grub |
---|
| 152 | %{_infodir}/*.info* |
---|
| 153 | %{_mandir}/man*/* |
---|
| 154 | |
---|
| 155 | %changelog |
---|
[3970] | 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 | |
---|
[3083] | 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 | |
---|
[521] | 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 |
---|