]>
Commit | Line | Data |
---|---|---|
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 = 5.1 | |
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-strong//g' \ | |
64 | -e 's/-fstack-protector-all//g' \ | |
65 | -e 's/-fstack-protector//g' \ | |
66 | -e 's/-fPIC//g' \ | |
67 | -e 's/--param=ssp-buffer-size=4//g' \ | |
68 | -e 's/-mregparm=3/-mregparm=4/g' \ | |
69 | -e 's/-fexceptions//g' \ | |
70 | -e 's/-m64//g' \ | |
71 | -e 's/-fasynchronous-unwind-tables//g' )" | |
72 | ||
73 | install_cmds | |
74 | # Install empty configuration file. | |
75 | mkdir -pv %{BUILDROOT}/boot/grub | |
76 | touch %{BUILDROOT}/boot/grub/grub.cfg | |
77 | ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg | |
78 | ||
79 | # Don't ship the default theme, replace it by our own one. | |
80 | rm -rfv %{BUILDROOT}/boot/grub/themes/starfield \ | |
81 | %{datadir}/grub/themes | |
82 | mkdir -pv %{BUILDROOT}/boot/grub/themes/system | |
83 | cp -rfv %{DIR_SOURCE}/theme/* \ | |
84 | %{BUILDROOT}/boot/grub/themes/system/ | |
85 | ||
86 | # Prepare the fonts. | |
87 | mkdir -pv %{BUILDROOT}/boot/grub/themes/system | |
88 | pushd %{BUILDROOT}/boot/grub/themes/system/ | |
89 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-10.pf2 -s 10 \ | |
90 | %{datadir}/fonts/dejavu/DejaVuSans.ttf | |
91 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-12.pf2 -s 12 \ | |
92 | %{datadir}/fonts/dejavu/DejaVuSans.ttf | |
93 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-Bold-14.pf2 \ | |
94 | -s 14 %{datadir}/fonts/dejavu/DejaVuSans-Bold.ttf | |
95 | popd | |
96 | ||
97 | # Disable hardening. | |
98 | paxctl -mpes \ | |
99 | %{BUILDROOT}%{sbindir}/grub-bios-setup \ | |
100 | %{BUILDROOT}%{sbindir}/grub-probe | |
101 | ||
102 | paxctl -mpex \ | |
103 | %{BUILDROOT}%{bindir}/grub-script-check | |
104 | end | |
105 | ||
106 | debuginfo_strict_build_id = false | |
107 | end | |
108 | ||
109 | quality-agent | |
110 | whitelist_nx | |
111 | %{bindir}/*|%{sbindir}/* | |
112 | end | |
113 | end | |
114 | ||
115 | packages | |
116 | package %{name} | |
117 | requires | |
118 | gettext | |
119 | os-prober | |
120 | system-logos >= 2 | |
121 | end | |
122 | ||
123 | # An EFI version of grub does not exist any more. | |
124 | obsoletes | |
125 | grub-efi <= 2.0.0-2 | |
126 | end | |
127 | ||
128 | configfiles | |
129 | /boot/grub/grub.cfg | |
130 | /etc/default/grub | |
131 | end | |
132 | end | |
133 | ||
134 | package %{name}-debuginfo | |
135 | template DEBUGINFO | |
136 | end | |
137 | end |