grub-vl.spec 8.0 KB

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