]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blame - grub/grub.nm
strongswan: Update to 5.0.0.
[people/stevee/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
MT
7version = 2.00
8prerelease = beta5
fee0d27e 9release = 0.3.%{prerelease}
ec89cb13 10thisapp = %{name}-%{version}~%{prerelease}
dc22ea77 11sup_arches = x86_64 i686
c36e4789 12
6cec16f1 13groups = System/Boot
802ea3af
MT
14url = http://www.gnu.org/software/grub/
15license = GPLv2+
16summary = Grand Unified Boot Loader.
c36e4789 17
802ea3af 18description
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
23end
24
ec89cb13
MT
25source_dl = http://ftp.gnu.org/gnu/grub/ ftp://alpha.gnu.org/gnu/grub/
26sources = %{thisapp}.tar.xz
802ea3af
MT
27
28build
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 \
fee0d27e 89 search font gfxterm echo video all_video
dc22ea77
MT
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
112end
113
114quality-agent
115 whitelist_nx
70d7638a 116 /usr/bin/*|/usr/sbin/*
802ea3af
MT
117 end
118end
119
120packages
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
fee0d27e 158 /usr/lib/grub/i386-efi
802ea3af
MT
159 end
160 end
1f9bc2f0
MT
161
162 package %{name}-debuginfo
163 template DEBUGINFO
164 end
802ea3af 165end