]> git.ipfire.org Git - ipfire-3.x.git/blame - grub/grub.nm
kernel: udpate to 5.2
[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
72471688 7version = 2.02
edd9febb 8release = 2
fd0c6b65 9
0f28973c 10sup_arches = aarch64 x86_64 i686
fd0c6b65 11thisapp = %{name}-%{version}
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 27
bc7a5ea8
MT
28# Unifont
29unifont = /usr/share/X11/fonts/misc/unifont.pcf.gz
30
802ea3af
MT
31build
32 requires
33 autoconf
dc22ea77 34 autogen
802ea3af
MT
35 automake
36 bison
ec89cb13 37 bzip2-devel
0f28973c 38 debugedit >= 5.3.5-2
bc7a5ea8 39 dejavu-fonts-sans-fonts
802ea3af
MT
40 flex
41 freetype-devel
42 gettext
dc22ea77 43 libdevmapper-devel
802ea3af 44 ncurses-devel
802ea3af 45 zlib-devel
bc7a5ea8 46 %{unifont}
802ea3af
MT
47 end
48
72471688
MT
49 # Don't leak our CFLAGS to boot code
50 export HOST_CFLAGS = %{CFLAGS}
51 export HOST_LDFLAGS = %{LDFLAGS}
52
53 platforms = efi
54
55 if "%{DISTRO_PLATFORM}" == "x86"
56 platforms += pc
57 end
58
dc22ea77 59 prepare_cmds
bc7a5ea8
MT
60 cp -vf %{unifont} unifont.pcf.gz
61 ./autogen.sh
72471688
MT
62
63 for platform in %{platforms}; do
64 cp -r %{DIR_APP} %{DIR_APP}-${platform}
65 done
dc22ea77
MT
66 end
67
5218f081
MT
68 # As the modules contain always 32 bit code, they
69 # should be living in /usr/lib.
70 libdir = %{prefix}/lib
71
72471688
MT
72 build
73 for platform in %{platforms}; do
74 pushd %{DIR_APP}-${platform}
75 ./configure \
76 %{configure_options} \
77 --with-platform=${platform} \
78 --disable-werror \
79 CFLAGS= LDFLAGS=
80
81 make %{PARALLELISMFLAGS}
82 popd
83 done
84 end
85
86 install
87 for platform in %{platforms}; do
88 pushd %{DIR_APP}-${platform}
89 make install DESTDIR=%{BUILDROOT}
90 popd
91 done
92
2af18b56 93 # Install empty configuration file.
ec89cb13 94 mkdir -pv %{BUILDROOT}/boot/grub
2af18b56 95 touch %{BUILDROOT}/boot/grub/grub.cfg
ec89cb13 96 ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg
bc7a5ea8
MT
97
98 # Don't ship the default theme, replace it by our own one.
99 rm -rfv %{BUILDROOT}/boot/grub/themes/starfield \
100 %{datadir}/grub/themes
101 mkdir -pv %{BUILDROOT}/boot/grub/themes/system
102 cp -rfv %{DIR_SOURCE}/theme/* \
103 %{BUILDROOT}/boot/grub/themes/system/
104
105 # Prepare the fonts.
106 mkdir -pv %{BUILDROOT}/boot/grub/themes/system
107 pushd %{BUILDROOT}/boot/grub/themes/system/
108 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-10.pf2 -s 10 \
109 %{datadir}/fonts/dejavu/DejaVuSans.ttf
110 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-12.pf2 -s 12 \
111 %{datadir}/fonts/dejavu/DejaVuSans.ttf
112 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-Bold-14.pf2 \
113 -s 14 %{datadir}/fonts/dejavu/DejaVuSans-Bold.ttf
114 popd
802ea3af 115 end
ec89cb13
MT
116
117 debuginfo_strict_build_id = false
802ea3af
MT
118end
119
802ea3af
MT
120packages
121 package %{name}
122 requires
123 gettext
bc7a5ea8 124 system-logos >= 2
47bdaf55
MT
125 end
126
ed1822cd
MT
127 # An EFI version of grub does not exist any more.
128 obsoletes
129 grub-efi <= 2.0.0-2
2af18b56 130 end
dc22ea77
MT
131
132 configfiles
ed1822cd
MT
133 /boot/grub/grub.cfg
134 /etc/default/grub
802ea3af
MT
135 end
136 end
1f9bc2f0
MT
137
138 package %{name}-debuginfo
139 template DEBUGINFO
140 end
802ea3af 141end