]>
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 |
ec89cb13 MT |
7 | version = 2.00 |
8 | prerelease = beta5 | |
70d7638a | 9 | release = 0.2.%{prerelease} |
ec89cb13 | 10 | thisapp = %{name}-%{version}~%{prerelease} |
dc22ea77 | 11 | sup_arches = x86_64 i686 |
c36e4789 | 12 | |
6cec16f1 | 13 | groups = System/Boot |
802ea3af MT |
14 | url = http://www.gnu.org/software/grub/ |
15 | license = GPLv2+ | |
16 | summary = Grand Unified Boot Loader. | |
c36e4789 | 17 | |
802ea3af | 18 | description |
dc22ea77 MT |
19 | GRUB (Grand Unified Boot Loader) is an experimental boot loader |
20 | capable of booting into most free operating systems - Linux, FreeBSD, | |
21 | NetBSD, GNU Mach, and others as well as most commercial operating | |
c36e4789 | 22 | systems. |
802ea3af MT |
23 | end |
24 | ||
ec89cb13 MT |
25 | source_dl = http://ftp.gnu.org/gnu/grub/ ftp://alpha.gnu.org/gnu/grub/ |
26 | sources = %{thisapp}.tar.xz | |
802ea3af MT |
27 | |
28 | build | |
29 | requires | |
30 | autoconf | |
dc22ea77 | 31 | autogen |
802ea3af MT |
32 | automake |
33 | bison | |
ec89cb13 | 34 | bzip2-devel |
802ea3af MT |
35 | flex |
36 | freetype-devel | |
37 | gettext | |
dc22ea77 | 38 | libdevmapper-devel |
802ea3af | 39 | ncurses-devel |
802ea3af MT |
40 | zlib-devel |
41 | end | |
42 | ||
dc22ea77 | 43 | prepare_cmds |
dc22ea77 MT |
44 | # Create a copy of the source tree to build |
45 | # an EFI enabled version of grub. | |
ec89cb13 | 46 | cp -pR . %{DIR_SRC}/%{thisapp}-efi |
dc22ea77 MT |
47 | end |
48 | ||
5218f081 MT |
49 | # As the modules contain always 32 bit code, they |
50 | # should be living in /usr/lib. | |
51 | libdir = %{prefix}/lib | |
52 | ||
802ea3af | 53 | configure_options += \ |
5218f081 | 54 | --target="i386" \ |
5218f081 MT |
55 | --datadir=%{libdir} \ |
56 | --with-platform=pc \ | |
57 | --program-transform-name=s,grub,grub, \ | |
58 | --disable-werror \ | |
59 | CFLAGS="$(echo %{CFLAGS} | sed \ | |
60 | -e 's/-fstack-protector//g' \ | |
61 | -e 's/--param=ssp-buffer-size=4//g' \ | |
62 | -e 's/-mregparm=3/-mregparm=4/g' \ | |
63 | -e 's/-fexceptions//g' \ | |
64 | -e 's/-m64//g' \ | |
65 | -e 's/-fasynchronous-unwind-tables//g' )" | |
802ea3af | 66 | |
dc22ea77 MT |
67 | build_cmds |
68 | cd ../%{thisapp}-efi | |
5218f081 MT |
69 | ./configure \ |
70 | %{configure_options} \ | |
dc22ea77 | 71 | --with-platform=efi \ |
5218f081 MT |
72 | CFLAGS="$(echo %{CFLAGS} | sed \ |
73 | -e 's/-O.//g' \ | |
74 | -e 's/-fstack-protector//g' \ | |
75 | -e 's/--param=ssp-buffer-size=4//g' \ | |
76 | -e 's/-mregparm=3/-mregparm=4/g' \ | |
77 | -e 's/-fexceptions//g' \ | |
78 | -e 's/-m64//g' \ | |
79 | -e 's/-fasynchronous-unwind-tables//g' )" | |
80 | ||
dc22ea77 MT |
81 | make %{PARALLELISMFLAGS} |
82 | ||
83 | ./grub-mkimage \ | |
84 | -O i386-efi \ | |
85 | -p /EFI/%{DISTRO_SNAME}/grub-efi \ | |
86 | -o grub.efi \ | |
87 | -d grub-core part_gpt hfsplus fat ext2 btrfs normal chain \ | |
88 | boot configfile linux appleldr minicmd loadbios reboot halt \ | |
89 | search font gfxterm echo video efi_gop efi_uga | |
90 | end | |
91 | ||
5218f081 | 92 | install |
dc22ea77 | 93 | cd ../%{thisapp}-efi |
802ea3af MT |
94 | make install DESTDIR=%{BUILDROOT} |
95 | ||
dc22ea77 MT |
96 | install -m 755 -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/ |
97 | install -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi | |
98 | touch %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg | |
99 | ln -svf ../boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg %{BUILDROOT}/etc/grub-efi.cfg | |
100 | install -m 755 grub.efi %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.efi | |
101 | ||
5218f081 MT |
102 | cd - |
103 | make install DESTDIR=%{BUILDROOT} | |
104 | ||
2af18b56 | 105 | # Install empty configuration file. |
ec89cb13 | 106 | mkdir -pv %{BUILDROOT}/boot/grub |
2af18b56 | 107 | touch %{BUILDROOT}/boot/grub/grub.cfg |
ec89cb13 | 108 | ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg |
802ea3af | 109 | end |
ec89cb13 MT |
110 | |
111 | debuginfo_strict_build_id = false | |
802ea3af MT |
112 | end |
113 | ||
114 | quality-agent | |
115 | whitelist_nx | |
70d7638a | 116 | /usr/bin/*|/usr/sbin/* |
802ea3af MT |
117 | end |
118 | end | |
119 | ||
120 | packages | |
121 | package %{name} | |
122 | requires | |
123 | gettext | |
124 | os-prober | |
47bdaf55 | 125 | /usr/share/X11/fonts/misc/unifont.pcf.gz |
ec89cb13 | 126 | system-logos |
47bdaf55 MT |
127 | end |
128 | ||
2af18b56 MT |
129 | configfiles |
130 | /boot/grub/grub.cfg | |
131 | /etc/default/grub | |
132 | end | |
133 | ||
47bdaf55 MT |
134 | # Generate grub compatible font for graphical boot menu |
135 | # This only converts Latin-1, Latin Extended A+B, Arrows, Box and Block characters | |
136 | script postin | |
137 | /usr/bin/grub-mkfont --output /boot/grub/unifont.pf2 \ | |
dc22ea77 MT |
138 | --range=0x0000-0x0241,0x2190-0x21FF,0x2500-0x259f \ |
139 | /usr/share/X11/fonts/misc/unifont.pcf.gz | |
140 | end | |
141 | end | |
142 | ||
143 | package %{name}-efi | |
144 | description | |
145 | EFI version of GRUB, the Grand Unified Boot Loader. | |
146 | end | |
147 | summary = %{description} | |
148 | ||
149 | requires += grub = %{thisver} | |
150 | ||
151 | configfiles | |
152 | /boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg | |
153 | end | |
154 | ||
155 | files | |
156 | /boot/efi | |
dc22ea77 | 157 | /etc/grub-efi.cfg |
802ea3af MT |
158 | end |
159 | end | |
1f9bc2f0 MT |
160 | |
161 | package %{name}-debuginfo | |
162 | template DEBUGINFO | |
163 | end | |
802ea3af | 164 | end |