]>
Commit | Line | Data |
---|---|---|
c36e4789 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
c36e4789 MT |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = grub |
47bdaf55 | 7 | version = 1.99 |
dc22ea77 MT |
8 | release = 4 |
9 | sup_arches = x86_64 i686 | |
c36e4789 | 10 | |
6cec16f1 | 11 | groups = System/Boot |
802ea3af MT |
12 | url = http://www.gnu.org/software/grub/ |
13 | license = GPLv2+ | |
14 | summary = Grand Unified Boot Loader. | |
c36e4789 | 15 | |
802ea3af | 16 | description |
dc22ea77 MT |
17 | GRUB (Grand Unified Boot Loader) is an experimental boot loader |
18 | capable of booting into most free operating systems - Linux, FreeBSD, | |
19 | NetBSD, GNU Mach, and others as well as most commercial operating | |
c36e4789 | 20 | systems. |
802ea3af MT |
21 | end |
22 | ||
47bdaf55 | 23 | source_dl = http://ftp.gnu.org/gnu/grub/ |
802ea3af MT |
24 | |
25 | build | |
26 | requires | |
27 | autoconf | |
dc22ea77 | 28 | autogen |
802ea3af MT |
29 | automake |
30 | bison | |
31 | flex | |
32 | freetype-devel | |
33 | gettext | |
dc22ea77 | 34 | libdevmapper-devel |
802ea3af | 35 | ncurses-devel |
802ea3af MT |
36 | zlib-devel |
37 | end | |
38 | ||
47bdaf55 | 39 | # Can only use very basic CFLAGS. |
dc22ea77 | 40 | export CFLAGS = -Os -pipe |
47bdaf55 | 41 | export CXXFLAGS = %{CFLAGS} |
802ea3af | 42 | |
dc22ea77 MT |
43 | prepare_cmds |
44 | # Replace pkglib_DATA (automake 1.11.2 incompatibility) | |
45 | sed -i -e "s/pkglib_DATA/pkgdata_DATA/g" \ | |
46 | -e "s/pkglib_SCRIPTS/pkgdata_SCRIPTS/g" \ | |
47 | Makefile.am conf/Makefile.common \ | |
48 | gentpl.py util/grub-*.in | |
49 | ||
50 | ./autogen.sh | |
51 | ||
52 | # Create a copy of the source tree to build | |
53 | # an EFI enabled version of grub. | |
54 | cp -R . %{DIR_SRC}/%{thisapp}-efi | |
55 | end | |
56 | ||
802ea3af | 57 | configure_options += \ |
47bdaf55 MT |
58 | --sbindir=/sbin \ |
59 | --with-platform=pc | |
802ea3af | 60 | |
dc22ea77 MT |
61 | build_cmds |
62 | cd ../%{thisapp}-efi | |
63 | #./autogen.sh | |
64 | ./configure %{configure_options} \ | |
65 | --with-platform=efi \ | |
66 | --program-transform-name=s,grub,grub-efi, | |
67 | make %{PARALLELISMFLAGS} | |
68 | ||
69 | ./grub-mkimage \ | |
70 | -O i386-efi \ | |
71 | -p /EFI/%{DISTRO_SNAME}/grub-efi \ | |
72 | -o grub.efi \ | |
73 | -d grub-core part_gpt hfsplus fat ext2 btrfs normal chain \ | |
74 | boot configfile linux appleldr minicmd loadbios reboot halt \ | |
75 | search font gfxterm echo video efi_gop efi_uga | |
76 | end | |
77 | ||
78 | install_cmds | |
79 | cd ../%{thisapp}-efi | |
802ea3af MT |
80 | make install DESTDIR=%{BUILDROOT} |
81 | ||
dc22ea77 MT |
82 | mv -v %{BUILDROOT}/etc/bash_completion.d/grub{,-efi} |
83 | mv -v %{BUILDROOT}/usr/lib/grub{,-efi} | |
84 | sed -e "s,grub/grub-mkconfig_lib,grub-efi/grub-mkconfig_lib," \ | |
85 | -i %{BUILDROOT}/sbin/grub-efi-mkconfig | |
86 | ||
87 | install -m 755 -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/ | |
88 | install -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi | |
89 | touch %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg | |
90 | ln -svf ../boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg %{BUILDROOT}/etc/grub-efi.cfg | |
91 | install -m 755 grub.efi %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.efi | |
92 | ||
802ea3af MT |
93 | # Install theme file |
94 | install -m 0744 %{DIR_SOURCE}/05_theme %{BUILDROOT}/etc/grub.d/ | |
95 | ||
96 | # Install splash background | |
47bdaf55 | 97 | mkdir -pv %{BUILDROOT}/boot/grub |
802ea3af | 98 | install %{DIR_SOURCE}/splash.png %{BUILDROOT}/boot/grub |
2af18b56 MT |
99 | |
100 | # Install empty configuration file. | |
101 | touch %{BUILDROOT}/boot/grub/grub.cfg | |
802ea3af MT |
102 | end |
103 | end | |
104 | ||
105 | quality-agent | |
106 | whitelist_nx | |
47bdaf55 | 107 | /sbin/*|/usr/bin/* |
802ea3af MT |
108 | end |
109 | end | |
110 | ||
111 | packages | |
112 | package %{name} | |
113 | requires | |
114 | gettext | |
115 | os-prober | |
47bdaf55 MT |
116 | /usr/share/X11/fonts/misc/unifont.pcf.gz |
117 | end | |
118 | ||
2af18b56 MT |
119 | configfiles |
120 | /boot/grub/grub.cfg | |
121 | /etc/default/grub | |
122 | end | |
123 | ||
47bdaf55 MT |
124 | # Generate grub compatible font for graphical boot menu |
125 | # This only converts Latin-1, Latin Extended A+B, Arrows, Box and Block characters | |
126 | script postin | |
127 | /usr/bin/grub-mkfont --output /boot/grub/unifont.pf2 \ | |
dc22ea77 MT |
128 | --range=0x0000-0x0241,0x2190-0x21FF,0x2500-0x259f \ |
129 | /usr/share/X11/fonts/misc/unifont.pcf.gz | |
130 | end | |
131 | end | |
132 | ||
133 | package %{name}-efi | |
134 | description | |
135 | EFI version of GRUB, the Grand Unified Boot Loader. | |
136 | end | |
137 | summary = %{description} | |
138 | ||
139 | requires += grub = %{thisver} | |
140 | ||
141 | configfiles | |
142 | /boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg | |
143 | end | |
144 | ||
145 | files | |
146 | /boot/efi | |
147 | /etc/bash_completion.d/grub-efi | |
148 | /etc/grub-efi.cfg | |
149 | /sbin/grub-efi-* | |
150 | /usr/bin/grub-efi-* | |
151 | /usr/lib/grub-efi | |
802ea3af MT |
152 | end |
153 | end | |
1f9bc2f0 MT |
154 | |
155 | package %{name}-debuginfo | |
156 | template DEBUGINFO | |
157 | end | |
802ea3af | 158 | end |