]> git.ipfire.org Git - ipfire-3.x.git/blob - grub/grub.nm
Merge remote-tracking branch 'stevee/sqlite'
[ipfire-3.x.git] / grub / grub.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = grub
7 version = 1.99
8 release = 4
9 sup_arches = x86_64 i686
10
11 groups = System/Boot
12 url = http://www.gnu.org/software/grub/
13 license = GPLv2+
14 summary = Grand Unified Boot Loader.
15
16 description
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
20 systems.
21 end
22
23 source_dl = http://ftp.gnu.org/gnu/grub/
24
25 build
26 requires
27 autoconf
28 autogen
29 automake
30 bison
31 flex
32 freetype-devel
33 gettext
34 libdevmapper-devel
35 ncurses-devel
36 zlib-devel
37 end
38
39 # Can only use very basic CFLAGS.
40 export CFLAGS = -Os -pipe
41 export CXXFLAGS = %{CFLAGS}
42
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
57 configure_options += \
58 --sbindir=/sbin \
59 --with-platform=pc
60
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
80 make install DESTDIR=%{BUILDROOT}
81
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
93 # Install theme file
94 install -m 0744 %{DIR_SOURCE}/05_theme %{BUILDROOT}/etc/grub.d/
95
96 # Install splash background
97 mkdir -pv %{BUILDROOT}/boot/grub
98 install %{DIR_SOURCE}/splash.png %{BUILDROOT}/boot/grub
99
100 # Install empty configuration file.
101 touch %{BUILDROOT}/boot/grub/grub.cfg
102 end
103 end
104
105 quality-agent
106 whitelist_nx
107 /sbin/*|/usr/bin/*
108 end
109 end
110
111 packages
112 package %{name}
113 requires
114 gettext
115 os-prober
116 /usr/share/X11/fonts/misc/unifont.pcf.gz
117 end
118
119 configfiles
120 /boot/grub/grub.cfg
121 /etc/default/grub
122 end
123
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 \
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
152 end
153 end
154
155 package %{name}-debuginfo
156 template DEBUGINFO
157 end
158 end