]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - grub/grub.nm
ncurses: Package essential terminfo files in -base package.
[people/amarx/ipfire-3.x.git] / grub / grub.nm
CommitLineData
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 6name = grub
47bdaf55 7version = 1.99
34bacb2e 8release = 6
dc22ea77 9sup_arches = x86_64 i686
c36e4789 10
6cec16f1 11groups = System/Boot
802ea3af
MT
12url = http://www.gnu.org/software/grub/
13license = GPLv2+
14summary = Grand Unified Boot Loader.
c36e4789 15
802ea3af 16description
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
21end
22
47bdaf55 23source_dl = http://ftp.gnu.org/gnu/grub/
802ea3af
MT
24
25build
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
dc22ea77
MT
39 prepare_cmds
40 # Replace pkglib_DATA (automake 1.11.2 incompatibility)
41 sed -i -e "s/pkglib_DATA/pkgdata_DATA/g" \
42 -e "s/pkglib_SCRIPTS/pkgdata_SCRIPTS/g" \
5218f081 43 Makefile* */Makefile* \
dc22ea77
MT
44 gentpl.py util/grub-*.in
45
46 ./autogen.sh
47
48 # Create a copy of the source tree to build
49 # an EFI enabled version of grub.
50 cp -R . %{DIR_SRC}/%{thisapp}-efi
51 end
52
5218f081
MT
53 # As the modules contain always 32 bit code, they
54 # should be living in /usr/lib.
55 libdir = %{prefix}/lib
56
802ea3af 57 configure_options += \
5218f081 58 --target="i386" \
5218f081
MT
59 --datadir=%{libdir} \
60 --with-platform=pc \
61 --program-transform-name=s,grub,grub, \
62 --disable-werror \
63 CFLAGS="$(echo %{CFLAGS} | sed \
64 -e 's/-fstack-protector//g' \
65 -e 's/--param=ssp-buffer-size=4//g' \
66 -e 's/-mregparm=3/-mregparm=4/g' \
67 -e 's/-fexceptions//g' \
68 -e 's/-m64//g' \
69 -e 's/-fasynchronous-unwind-tables//g' )"
802ea3af 70
dc22ea77
MT
71 build_cmds
72 cd ../%{thisapp}-efi
5218f081
MT
73 ./configure \
74 %{configure_options} \
dc22ea77 75 --with-platform=efi \
5218f081
MT
76 --program-transform-name=s,grub,grub-efi, \
77 CFLAGS="$(echo %{CFLAGS} | sed \
78 -e 's/-O.//g' \
79 -e 's/-fstack-protector//g' \
80 -e 's/--param=ssp-buffer-size=4//g' \
81 -e 's/-mregparm=3/-mregparm=4/g' \
82 -e 's/-fexceptions//g' \
83 -e 's/-m64//g' \
84 -e 's/-fasynchronous-unwind-tables//g' )"
85
dc22ea77
MT
86 make %{PARALLELISMFLAGS}
87
88 ./grub-mkimage \
89 -O i386-efi \
90 -p /EFI/%{DISTRO_SNAME}/grub-efi \
91 -o grub.efi \
92 -d grub-core part_gpt hfsplus fat ext2 btrfs normal chain \
93 boot configfile linux appleldr minicmd loadbios reboot halt \
94 search font gfxterm echo video efi_gop efi_uga
95 end
96
5218f081 97 install
dc22ea77 98 cd ../%{thisapp}-efi
802ea3af
MT
99 make install DESTDIR=%{BUILDROOT}
100
dc22ea77 101 mv -v %{BUILDROOT}/etc/bash_completion.d/grub{,-efi}
dc22ea77 102 sed -e "s,grub/grub-mkconfig_lib,grub-efi/grub-mkconfig_lib," \
34bacb2e 103 -i %{BUILDROOT}%{sbindir}/grub-efi-mkconfig
dc22ea77
MT
104
105 install -m 755 -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/
106 install -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi
107 touch %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg
108 ln -svf ../boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg %{BUILDROOT}/etc/grub-efi.cfg
109 install -m 755 grub.efi %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.efi
110
5218f081
MT
111 cd -
112 make install DESTDIR=%{BUILDROOT}
113
802ea3af
MT
114 # Install theme file
115 install -m 0744 %{DIR_SOURCE}/05_theme %{BUILDROOT}/etc/grub.d/
116
117 # Install splash background
47bdaf55 118 mkdir -pv %{BUILDROOT}/boot/grub
802ea3af 119 install %{DIR_SOURCE}/splash.png %{BUILDROOT}/boot/grub
2af18b56
MT
120
121 # Install empty configuration file.
122 touch %{BUILDROOT}/boot/grub/grub.cfg
802ea3af
MT
123 end
124end
125
126quality-agent
127 whitelist_nx
47bdaf55 128 /sbin/*|/usr/bin/*
802ea3af
MT
129 end
130end
131
132packages
133 package %{name}
134 requires
135 gettext
136 os-prober
47bdaf55
MT
137 /usr/share/X11/fonts/misc/unifont.pcf.gz
138 end
139
2af18b56
MT
140 configfiles
141 /boot/grub/grub.cfg
142 /etc/default/grub
143 end
144
47bdaf55
MT
145 # Generate grub compatible font for graphical boot menu
146 # This only converts Latin-1, Latin Extended A+B, Arrows, Box and Block characters
147 script postin
148 /usr/bin/grub-mkfont --output /boot/grub/unifont.pf2 \
dc22ea77
MT
149 --range=0x0000-0x0241,0x2190-0x21FF,0x2500-0x259f \
150 /usr/share/X11/fonts/misc/unifont.pcf.gz
151 end
152 end
153
154 package %{name}-efi
155 description
156 EFI version of GRUB, the Grand Unified Boot Loader.
157 end
158 summary = %{description}
159
160 requires += grub = %{thisver}
161
162 configfiles
163 /boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg
164 end
165
166 files
167 /boot/efi
168 /etc/bash_completion.d/grub-efi
169 /etc/grub-efi.cfg
34bacb2e
MT
170 %{sbindir}/grub-efi-*
171 %{bindir}/grub-efi-*
172 %{prefix}/lib/grub-efi
802ea3af
MT
173 end
174 end
1f9bc2f0
MT
175
176 package %{name}-debuginfo
177 template DEBUGINFO
178 end
802ea3af 179end