]> git.ipfire.org Git - ipfire-3.x.git/blob - grub/grub.nm
json-c: Update to version 0.17-20230812
[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 = 2.02
8 release = 2
9
10 sup_arches = aarch64 x86_64 i686
11 thisapp = %{name}-%{version}
12
13 groups = System/Boot
14 url = http://www.gnu.org/software/grub/
15 license = GPLv2+
16 summary = Grand Unified Boot Loader.
17
18 description
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
22 systems.
23 end
24
25 source_dl = http://ftp.gnu.org/gnu/grub/ ftp://alpha.gnu.org/gnu/grub/
26 sources = %{thisapp}.tar.xz
27
28 # Unifont
29 unifont = /usr/share/X11/fonts/misc/unifont.pcf.gz
30
31 build
32 requires
33 autoconf
34 autogen
35 automake
36 bison
37 bzip2-devel
38 debugedit >= 5.3.5-2
39 dejavu-fonts-sans-fonts
40 flex
41 freetype-devel
42 gettext
43 libdevmapper-devel
44 ncurses-devel
45 zlib-devel
46 %{unifont}
47 end
48
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
59 prepare_cmds
60 cp -vf %{unifont} unifont.pcf.gz
61 ./autogen.sh
62
63 for platform in %{platforms}; do
64 cp -r %{DIR_APP} %{DIR_APP}-${platform}
65 done
66 end
67
68 # As the modules contain always 32 bit code, they
69 # should be living in /usr/lib.
70 libdir = %{prefix}/lib
71
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
93 # Install empty configuration file.
94 mkdir -pv %{BUILDROOT}/boot/grub
95 touch %{BUILDROOT}/boot/grub/grub.cfg
96 ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg
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
115 end
116
117 debuginfo_strict_build_id = false
118 end
119
120 packages
121 package %{name}
122 requires
123 gettext
124 system-logos >= 2
125 end
126
127 # An EFI version of grub does not exist any more.
128 obsoletes
129 grub-efi <= 2.0.0-2
130 end
131
132 configfiles
133 /boot/grub/grub.cfg
134 /etc/default/grub
135 end
136 end
137
138 package %{name}-debuginfo
139 template DEBUGINFO
140 end
141 end