]> git.ipfire.org Git - ipfire-3.x.git/blame - grub/grub.nm
grub: Remove accidentially committed background image.
[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
ec89cb13 7version = 2.00
18db0a79 8release = 2
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
ec89cb13
MT
23source_dl = http://ftp.gnu.org/gnu/grub/ ftp://alpha.gnu.org/gnu/grub/
24sources = %{thisapp}.tar.xz
802ea3af 25
bc7a5ea8
MT
26# Unifont
27unifont = /usr/share/X11/fonts/misc/unifont.pcf.gz
28
802ea3af
MT
29build
30 requires
31 autoconf
dc22ea77 32 autogen
802ea3af
MT
33 automake
34 bison
ec89cb13 35 bzip2-devel
bc7a5ea8 36 dejavu-fonts-sans-fonts
802ea3af
MT
37 flex
38 freetype-devel
39 gettext
dc22ea77 40 libdevmapper-devel
802ea3af 41 ncurses-devel
802ea3af 42 zlib-devel
bc7a5ea8 43 %{unifont}
802ea3af
MT
44 end
45
dc22ea77 46 prepare_cmds
bc7a5ea8
MT
47 cp -vf %{unifont} unifont.pcf.gz
48 ./autogen.sh
49
dc22ea77
MT
50 # Create a copy of the source tree to build
51 # an EFI enabled version of grub.
ec89cb13 52 cp -pR . %{DIR_SRC}/%{thisapp}-efi
dc22ea77
MT
53 end
54
5218f081
MT
55 # As the modules contain always 32 bit code, they
56 # should be living in /usr/lib.
57 libdir = %{prefix}/lib
58
802ea3af 59 configure_options += \
5218f081 60 --target="i386" \
5218f081
MT
61 --with-platform=pc \
62 --program-transform-name=s,grub,grub, \
63 --disable-werror \
64 CFLAGS="$(echo %{CFLAGS} | sed \
65 -e 's/-fstack-protector//g' \
66 -e 's/--param=ssp-buffer-size=4//g' \
67 -e 's/-mregparm=3/-mregparm=4/g' \
68 -e 's/-fexceptions//g' \
69 -e 's/-m64//g' \
70 -e 's/-fasynchronous-unwind-tables//g' )"
802ea3af 71
dc22ea77
MT
72 build_cmds
73 cd ../%{thisapp}-efi
5218f081
MT
74 ./configure \
75 %{configure_options} \
dc22ea77 76 --with-platform=efi \
5218f081
MT
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 \
fee0d27e 94 search font gfxterm echo video all_video
dc22ea77
MT
95 end
96
5218f081 97 install
dc22ea77 98 cd ../%{thisapp}-efi
802ea3af
MT
99 make install DESTDIR=%{BUILDROOT}
100
dc22ea77
MT
101 install -m 755 -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/
102 install -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi
103 touch %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg
104 ln -svf ../boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg %{BUILDROOT}/etc/grub-efi.cfg
105 install -m 755 grub.efi %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.efi
106
5218f081
MT
107 cd -
108 make install DESTDIR=%{BUILDROOT}
109
2af18b56 110 # Install empty configuration file.
ec89cb13 111 mkdir -pv %{BUILDROOT}/boot/grub
2af18b56 112 touch %{BUILDROOT}/boot/grub/grub.cfg
ec89cb13 113 ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg
bc7a5ea8
MT
114
115 # Don't ship the default theme, replace it by our own one.
116 rm -rfv %{BUILDROOT}/boot/grub/themes/starfield \
117 %{datadir}/grub/themes
118 mkdir -pv %{BUILDROOT}/boot/grub/themes/system
119 cp -rfv %{DIR_SOURCE}/theme/* \
120 %{BUILDROOT}/boot/grub/themes/system/
121
122 # Prepare the fonts.
123 mkdir -pv %{BUILDROOT}/boot/grub/themes/system
124 pushd %{BUILDROOT}/boot/grub/themes/system/
125 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-10.pf2 -s 10 \
126 %{datadir}/fonts/dejavu/DejaVuSans.ttf
127 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-12.pf2 -s 12 \
128 %{datadir}/fonts/dejavu/DejaVuSans.ttf
129 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-Bold-14.pf2 \
130 -s 14 %{datadir}/fonts/dejavu/DejaVuSans-Bold.ttf
131 popd
802ea3af 132 end
ec89cb13
MT
133
134 debuginfo_strict_build_id = false
802ea3af
MT
135end
136
137quality-agent
138 whitelist_nx
70d7638a 139 /usr/bin/*|/usr/sbin/*
802ea3af
MT
140 end
141end
142
143packages
144 package %{name}
145 requires
146 gettext
147 os-prober
bc7a5ea8 148 system-logos >= 2
47bdaf55
MT
149 end
150
2af18b56
MT
151 configfiles
152 /boot/grub/grub.cfg
153 /etc/default/grub
154 end
dc22ea77
MT
155 end
156
157 package %{name}-efi
158 description
159 EFI version of GRUB, the Grand Unified Boot Loader.
160 end
161 summary = %{description}
162
163 requires += grub = %{thisver}
164
165 configfiles
166 /boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg
167 end
168
169 files
170 /boot/efi
dc22ea77 171 /etc/grub-efi.cfg
fee0d27e 172 /usr/lib/grub/i386-efi
802ea3af
MT
173 end
174 end
1f9bc2f0
MT
175
176 package %{name}-debuginfo
177 template DEBUGINFO
178 end
802ea3af 179end