]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - grub/grub.nm
59893e2bcc3bcf27e1c2b26b316465395950caf5
[people/ms/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.00
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/ ftp://alpha.gnu.org/gnu/grub/
24 sources = %{thisapp}.tar.xz
25
26 # Unifont
27 unifont = /usr/share/X11/fonts/misc/unifont.pcf.gz
28
29 build
30 requires
31 autoconf
32 autogen
33 automake
34 bison
35 bzip2-devel
36 dejavu-fonts-sans-fonts
37 flex
38 freetype-devel
39 gettext
40 libdevmapper-devel
41 ncurses-devel
42 paxctl
43 zlib-devel
44 %{unifont}
45 end
46
47 prepare_cmds
48 cp -vf %{unifont} unifont.pcf.gz
49 ./autogen.sh
50 end
51
52 # As the modules contain always 32 bit code, they
53 # should be living in /usr/lib.
54 libdir = %{prefix}/lib
55
56 configure_options += \
57 --target="i386" \
58 --with-platform=pc \
59 --program-transform-name=s,grub,grub, \
60 --disable-werror \
61 CFLAGS="$(echo %{CFLAGS} | sed \
62 -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' \
63 -e 's/-fstack-protector-all//g' \
64 -e 's/-fstack-protector//g' \
65 -e 's/-fPIC//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' )"
71
72 install_cmds
73 # Install empty configuration file.
74 mkdir -pv %{BUILDROOT}/boot/grub
75 touch %{BUILDROOT}/boot/grub/grub.cfg
76 ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg
77
78 # Don't ship the default theme, replace it by our own one.
79 rm -rfv %{BUILDROOT}/boot/grub/themes/starfield \
80 %{datadir}/grub/themes
81 mkdir -pv %{BUILDROOT}/boot/grub/themes/system
82 cp -rfv %{DIR_SOURCE}/theme/* \
83 %{BUILDROOT}/boot/grub/themes/system/
84
85 # Prepare the fonts.
86 mkdir -pv %{BUILDROOT}/boot/grub/themes/system
87 pushd %{BUILDROOT}/boot/grub/themes/system/
88 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-10.pf2 -s 10 \
89 %{datadir}/fonts/dejavu/DejaVuSans.ttf
90 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-12.pf2 -s 12 \
91 %{datadir}/fonts/dejavu/DejaVuSans.ttf
92 %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-Bold-14.pf2 \
93 -s 14 %{datadir}/fonts/dejavu/DejaVuSans-Bold.ttf
94 popd
95
96 # Disable hardening.
97 paxctl -mpes \
98 %{BUILDROOT}%{sbindir}/grub-bios-setup \
99 %{BUILDROOT}%{sbindir}/grub-probe
100 end
101
102 debuginfo_strict_build_id = false
103 end
104
105 quality-agent
106 whitelist_nx
107 %{bindir}/*|%{sbindir}/*
108 end
109 end
110
111 packages
112 package %{name}
113 requires
114 gettext
115 os-prober
116 system-logos >= 2
117 end
118
119 # An EFI version of grub does not exist any more.
120 obsoletes
121 grub-efi <= 2.0.0-2
122 end
123
124 configfiles
125 /boot/grub/grub.cfg
126 /etc/default/grub
127 end
128 end
129
130 package %{name}-debuginfo
131 template DEBUGINFO
132 end
133 end